Game Development Community

Terrain planets

by Entr0py · 12/07/2006 (3:05 am) · 9 comments

I have been experimenting with taking terrain textures and applying them to spheres, to create planet objects. So far I have done this completely with shaders, but I will probably have to do some C++ before it's all said and done. These are the actual terrain textures applied to the planets, just to be clear.

Here is what I want to do:

A sphere is created with a shader representing the terrain object. When the player zooms into the terrain, at some point the sphere is hidden, the terrain becomes unhidden. A raycast is made to find the pixel directly between eyepos and the center of the sphere to find where the camera needs to be hanging above the terrain. At this point the player begins zooming into the actual terrain. Upon zooming out, the reverse should happen, invoking the planet object and hiding the terrain.

Hopefully all this can happen fast enough to make a smooth transition. If not, I can probably use a seperate camera and fade from one to the other to smooth it a bit.

Screenshots of how I am doing so far:

i138.photobucket.com/albums/q260/ebortion/TSE_planet2.jpgi138.photobucket.com/albums/q260/ebortion/TSE_planet3.jpgi138.photobucket.com/albums/q260/ebortion/TSE_planet.jpg

#1
12/07/2006 (3:35 am)
Screens are not working...

Would like to see them :)
#2
12/07/2006 (3:57 am)
You must have looked in the approximately 10 minutes it took to move them over to photobucket :D
#3
12/07/2006 (7:03 am)
Good stuff for a TGEA space pak.
#4
12/07/2006 (7:26 am)
I would love to see the spheremap setup.
#5
12/07/2006 (7:53 am)
Wouldn't it be easier to use LOD spheres with separate materials ? The only problem might be smooth transition between states I guess.
#6
12/07/2006 (9:35 am)
Very nice. Can you give some explanation on the shader you are using for rendering spheres? I also need to render planets, so I believe I am going to need to write a custom shader to get the smooth spherical shape. (I believe GG did the same thing in Marble Blast Ultra, to get really perfect looking spheres.)

Also, I relly like your idea for zooming in out and of the planet. Very nice.
#7
12/07/2006 (11:10 am)
I'm not sure i understand what you are doing here, or why.
#8
12/07/2006 (12:26 pm)
hes talking about a smooth transition from a spherical planet to basic terrain. in particular, I think entropy is experimenting with matching up the orientation of the planet texture at approach with the corresponding terrain texture when the terrain becomes visible.

personally, I dont think this is the proper way to go about it. switching between sphere and terrain visibility is a good idea but I dont think you need to worry about matching the textures. since you're using shaders, you may be able to implement a bit of volumetric fog to act as an atmosphere when approaching the planet. I think this would be more accurate as well. the fog would be able to hide the transition from large sphere to eventual terrain.
#9
12/07/2006 (12:39 pm)
William: "Very nice. Can you give some explanation on the shader you are using for rendering spheres? "

I am just using a dts shape for now, but yeah I would like to use procedural spheres. (When I said completely I didn't mean COMPLETELY ).

Sean: "you may be able to implement a bit of volumetric fog to act as an atmosphere when approaching the planet. "

You are right, the only problem is that many planets do not have atmosphere.