Terrain shadow resolution
by Jaimi McEntire · in Torque Game Engine · 11/14/2004 (2:41 pm) · 4 replies
I'd like to increase the resolution of the shadows on the terrain. There appear to be a few constants that need to be modified:
terrdata.h:
LightmapSize = 512,
LightmapShift = 9,
blender.cc:
#define LUMELS_PER_TILE_EDGE_LOG2 9
I modify these, and turn off the ASM blender, but I get an assert that the "fast blender requires a 512 lightmap".
A few questions:
Can I safely ignore this assertion if I am using the C Blender?
Is this creating a texture that is uploaded to the video card -- ie, will this cause problems if I increase the size to 2048x2048?
Has anyone successfully increased the shadow resolution?
When i first started, I assumed that shadows were burned into the terrain textures at the same resolution as the terrain texture, but this doesn't appear to be the case. Am I mistaken?
Any answers/thoughts would be greatly appreciated.
terrdata.h:
LightmapSize = 512,
LightmapShift = 9,
blender.cc:
#define LUMELS_PER_TILE_EDGE_LOG2 9
I modify these, and turn off the ASM blender, but I get an assert that the "fast blender requires a 512 lightmap".
A few questions:
Can I safely ignore this assertion if I am using the C Blender?
Is this creating a texture that is uploaded to the video card -- ie, will this cause problems if I increase the size to 2048x2048?
Has anyone successfully increased the shadow resolution?
When i first started, I assumed that shadows were burned into the terrain textures at the same resolution as the terrain texture, but this doesn't appear to be the case. Am I mistaken?
Any answers/thoughts would be greatly appreciated.
#2
Yes but it requires a rewrite to the C++ blender.
-John
11/16/2004 (8:30 pm)
"Has anyone successfully increased the shadow resolution? "Yes but it requires a rewrite to the C++ blender.
-John
#3
11/26/2004 (6:18 pm)
Thats good news. Would you be willing to share the modifications you have made? Or perhaps these are in your upcoming lighting pack update?
#4
12/02/2004 (8:44 pm)
The light map size can be changed, but it requires ripping the C++ blender to shreds. The change can also lower blender's performance. Generally I recommend designing your content around the terrain light map size, it will save you a lot of time and keep Torque running efficiently.
Associate Kyle Carter
Probably.
No.
Yes, in TSE we have a higher shadow resolution.
The terrain lightmap is the size of one terrain block, and it is fairly low res compared to the blended textures.
The change is trivial, but modifying the blender code correctly is not, since it's so complex. There's not much I can say there except that you're probably going to learn a lot about it if you try this change. :)