Planetside Software Forums

General => Terragen Discussion => Topic started by: MilitarySector on January 11, 2009, 06:45:47 PM

Title: Baking final shaders to one texture.
Post by: MilitarySector on January 11, 2009, 06:45:47 PM
Hello,

Is there a way to bake the shaders down to a horizontal texture to output along with a hightmap so game engines can use Terragen generated imagery inside their engines?  All some engines need are a texture map and a heightmap, it creates the 3d geometry and displacement inside the applications Then the game engines add detail by applying splatting textures based on either terrain color or heightmap sloping. 

Attached is an example of two images brought into Visual3d.NET www.visual3d.net to form a terrain using this method.

Thanks,

Robert Francis

Director of Art
Realmware Corporation
www.visual3d.net

Title: Re: Baking final shaders to one texture.
Post by: JimB on January 12, 2009, 05:25:17 AM
Take an orthographic camera and point it minus 90 degrees down, and position it so it matches the heightfield you want to output at the borders. Then render that. As baking is technically a render anyway IMHO, it's essentially the same thing, but with a manual bit inbetween that won't cause anyone to break into a sweat. You should also switch off the Atmosphere in the planet to get a true RGB render of the terrain colours. If you want to get an albedo colours render so you can light it in-game instead, copy the diffuse colours to the Luminous colours of the Surface Shaders, and switch off any lights..... theoretically.
Title: Re: Baking final shaders to one texture.
Post by: MilitarySector on January 12, 2009, 11:48:56 AM
JimB,

Thanks for the advice!

Robert-
Title: Re: Baking final shaders to one texture.
Post by: MilitarySector on January 12, 2009, 11:51:16 AM
I'd imagine matching it to the Height Map would be the biggest challenge.  It would be nice if John and Team could have a preset to do this automatically. :D

Robert-
Title: Re: Baking final shaders to one texture.
Post by: Oshyan on January 16, 2009, 02:41:09 AM
Presumably you mean Matt and team. ;) But yes, direct texture output would be a good thing to support in the future.

- Oshyan