Multiple LOD textures on a sphere (rendering planets)
by Jay Crossler · in Artist Corner · 07/12/2009 (4:07 pm) · 7 replies
Hi, can someone assist me? I'm building a planet pack and am having trouble getting the shapes looking good.
I'd like to be able to render planets both far away and up-close, ideally even able to show extremely high quality imagery on a sphere (up to 8192x8192 pixels or more). If I want to have many planets, each with different textures, should I just swap out the skin texture?
Is this the right thought process?
1) Make multiple spheres in a render tool (maybe 4 levels of detail)
2) Map textures onto spheres with spherical projection style
-- Should this use different textures for each LOD? A 32x32 pixel for low LODs, 1024x1024 for larger, etc.
-- Name the texture base.planetsurface32.png or base.planetsurface1024.png for each?
3) In code, previously I would have called %obj.setSkinName() - now, I think I should be using a materials.cs.
-- Any suggestions of how do do it with an earth.surface.png? and switch it to saturn.surface.png?
4) How would I call in code to switch these textures?
5) Any suggestions on how to have multiple "shells" of textures, so if I had one of ground, another slightly larger of clouds (that can rotate at different rates)?
6) Any ideas on how to have items on the sphere that can be selected using code (like continents, or craters, or mountains)?
And, any chance someone wants to help out in making such a thing? I've got all the math down and moving planets for the planet pack, so we could collaborate on the resource.
Thanks in advance!
I'd like to be able to render planets both far away and up-close, ideally even able to show extremely high quality imagery on a sphere (up to 8192x8192 pixels or more). If I want to have many planets, each with different textures, should I just swap out the skin texture?
Is this the right thought process?
1) Make multiple spheres in a render tool (maybe 4 levels of detail)
2) Map textures onto spheres with spherical projection style
-- Should this use different textures for each LOD? A 32x32 pixel for low LODs, 1024x1024 for larger, etc.
-- Name the texture base.planetsurface32.png or base.planetsurface1024.png for each?
3) In code, previously I would have called %obj.setSkinName() - now, I think I should be using a materials.cs.
-- Any suggestions of how do do it with an earth.surface.png? and switch it to saturn.surface.png?
4) How would I call in code to switch these textures?
5) Any suggestions on how to have multiple "shells" of textures, so if I had one of ground, another slightly larger of clouds (that can rotate at different rates)?
6) Any ideas on how to have items on the sphere that can be selected using code (like continents, or craters, or mountains)?
And, any chance someone wants to help out in making such a thing? I've got all the math down and moving planets for the planet pack, so we could collaborate on the resource.
Thanks in advance!
#2
Here's my implementation of it running in T3D
07/21/2009 (8:51 am)
You could always implement Sean O'Neil's light scattering shader from GPU GemsHere's my implementation of it running in T3D
#3
07/21/2009 (2:17 pm)
Very very cool! Would love to see how you did that. Is it as simple as dropping a shader into a directory? Can you talk me through the process?
#4
use only textures of 512x512, 2x 512px is better that 1 x1024px
07/21/2009 (7:24 pm)
www.garagegames.com/community/forums/viewthread/25650use only textures of 512x512, 2x 512px is better that 1 x1024px
#5
@Javier
2 512x512 textures will take up less memory than 1 1024x1024 because it's half the number of pixels. It takes 4 512x512 textures to equal 1 1024x1024, not 2.
07/22/2009 (6:50 am)
It's not quite as simple as dropping it in a directory since you need to pass parameters to the shader from the engine. Actually, the T3D scatter sky implementation does this (it's basically the same thing except it's doing the calculations for atmosphere from the ground rather than the sky) and is a good place to look and see how it's done.@Javier
2 512x512 textures will take up less memory than 1 1024x1024 because it's half the number of pixels. It takes 4 512x512 textures to equal 1 1024x1024, not 2.
#6
Any other suggestions on planet texturing? Most of the NASA images are released at 1024x512, so I stretched them up to 1024x1024 so that they map well when using sphere mapping.
Ideally, I'd like to have a better mapping approach... not simply mapping onto a sphere. Any suggestions?
07/22/2009 (8:24 am)
Thanks, Gary. I'll check out that example - I've started looking at: http://www.garagegames.com/community/forums/viewthread/92443 (I'm using a mac, so I don't think that's yet supported - I'll start playing with it on a PC, I guess).Any other suggestions on planet texturing? Most of the NASA images are released at 1024x512, so I stretched them up to 1024x1024 so that they map well when using sphere mapping.
Ideally, I'd like to have a better mapping approach... not simply mapping onto a sphere. Any suggestions?
#7
Here's an updated implementation of the Orrery code - adds a number of features, works faster, and is Object Oriented. http://wecreategames.com/blog/?p=237
I hope someone can get some cool use out of it.
08/02/2009 (12:00 am)
Gary, I love your planets and ships in Biomass. I'd love to borrow parts of your world as the basis of this future work (especially getting ships to move well and go between planets). :)Here's an updated implementation of the Orrery code - adds a number of features, works faster, and is Object Oriented. http://wecreategames.com/blog/?p=237
I hope someone can get some cool use out of it.
Torque 3D Owner Jay Crossler
Currently, my planets are looking a bit... flat. I'm just wrapping a texture onto a sphere.
Any suggestions on how to add some oompf? Some lighting effects or shaders that anyone can suggest?