Previous Blog Next Blog
Prev/Next Blog
by date

Terrain planets

Terrain planets
Name:Entr0py
Date Posted:Dec 07, 2006
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Entr0py

Blog post
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:




Recent Blog Posts
List:12/07/06 - Terrain planets
08/16/05 - Plan for Entr0py
06/24/04 - Plan for Entr0py

Submit ResourceSubmit your own resources!

Mads Laumann   (Dec 07, 2006 at 11:35 GMT)
Screens are not working...

Would like to see them :)

Entr0py   (Dec 07, 2006 at 11:57 GMT)   Resource Rating: 5
You must have looked in the approximately 10 minutes it took to move them over to photobucket :D

Vashner   (Dec 07, 2006 at 15:03 GMT)
Good stuff for a TGEA space pak.

Dreamer   (Dec 07, 2006 at 15:26 GMT)   Resource Rating: 5
I would love to see the spheremap setup.

Radoslaw Marcin Kurczewski   (Dec 07, 2006 at 15:53 GMT)
Wouldn't it be easier to use LOD spheres with separate materials ? The only problem might be smooth transition between states I guess.

William Todd Scott   (Dec 07, 2006 at 17:35 GMT)
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.

Allyn "Mr_Bloodworth" Mcelrath   (Dec 07, 2006 at 19:10 GMT)
I'm not sure i understand what you are doing here, or why.
Edited on Dec 07, 2006 19:11 GMT

Sean H.   (Dec 07, 2006 at 20:26 GMT)
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.

Entr0py   (Dec 07, 2006 at 20:39 GMT)   Resource Rating: 5
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.

You must be a member and be logged in to either append comments or rate this resource.