Game Development Community

Spherized Terrains (i.e. planets)

by Entr0py · in Torque Game Engine Advanced · 12/05/2006 (11:12 am) · 5 replies

In your opinion, would it be better/easier to use shaders to spherize atlas terrains, or to just create a new Atlas class that works on spheres instead of planes?

I am new to HLSL and still in the preliminary stages or familiarizing myself with atlas code. I am already aware of the physics issues, and plan on using physx to simulate space and planet gravity.

#1
12/05/2006 (3:33 pm)
One way of doing it would be rendering the terrain as a texture on a sphere (with a shader). The problem with that is at some point upon zooming into the planet's surface, it would have to be swapped with an actual view of the terrain (if you want the player to interact with it).

Another problem is that doing this might take several passes.
#2
12/07/2006 (2:38 am)
Some progress with the planet shaders. I have more screenshots and information about this in my current blog.

(Note this is an actual texture taken right from the terrain object's registers and placed on a sphere).
i138.photobucket.com/albums/q260/ebortion/TSE_planet.jpg
#3
12/07/2006 (6:56 am)
Wow thats really, really nice looking.
Would mind showing the sphere map shader?
#4
12/07/2006 (2:57 pm)
I will post it when it is ready. I was just using $cubemap to test the shaders for those shots.
#5
04/16/2007 (11:42 pm)
Entr0py, please post progress if you have any! Would love to have this in a resource. What sort of approach are you going to do for gravity in PhysX?