Game Development Community

No Shadow On Atlas

by Cai Yundong · in Artist Corner · 05/29/2009 (3:58 am) · 2 replies

Hi, i'm using TGEA 1.71 and i seem to have some problems with atlas.
When using atlas, my main character which i'm controling is able to have shadow,
But any other object, trees etc, are unable to produce shadows.

I'm using the default oak2 with polysoup enabled. In the console, there is an error
stating that alternative lighting is only available for blended terrains. What does this mean ?

#1
05/29/2009 (4:51 am)
Atlas terrains come in two variants: blended and unique. Blended terrain uses multiple texture tiles combined with opacity maps to dynamically generate the terrain texture. Unique terrain uses a single big texture stretched across the terrain.

With the current implementation, SG lighting is only supported on blended terrain. With unique terrain, you need to pre-bake the lighting into the terrain outside of the engine.

Changing this would not require drastic changes. I think the SG lighting code is oblivious to whether it is blended or unique terrain and it's just the rendering that needs extending. The blended clipmap cache can use the lightmap as just another texture source. For unique terrain, one basically has to mix the diffuse and shadow texture in the clipmap cache like the blended version does. One can probably extend ClipMapBlenderCache for that purpose. I remember going in that direction with Atlas.
#2
05/30/2009 (9:31 pm)
Thanks for your reply ! I'll give it a try ! :D