Trouble with flat terrain, and moving a mission file
by Steve Lamperti · in Torque Game Engine · 10/08/2004 (12:24 pm) · 2 replies
My project is using a mission file with completely flat terrain. On my machine it is working fine, but when I move the mission file to another machine, I'm seeing an effect where the terrain textures are just not being drawn on the flat terrain. As soon as I add a little height to the terrain on these other machines, the textures start drawing.
This sounds a little like some problems that I have seen described on other threads, i.e. problems with textures and flat terrain. If anyone has any light to shed on this question, I would appreciate hearing about it.
This sounds a little like some problems that I have seen described on other threads, i.e. problems with textures and flat terrain. If anyone has any light to shed on this question, I would appreciate hearing about it.
#2
Just posting this in case anyone else runs into the problem, or in case anyone has a better fix for the BuildFogTexture routine.
10/12/2004 (8:19 am)
I asked the Stump the Experts panel at IGC this question this weekend, and Ben Garney came up with an answer that has helped me. In SceneGraph::BuildFogTexture the totally flat terrain causes a zero for the heightRange variable, which makes the fog distance infinate. This means no fog, which blows away the low end cards on which I am seeing this problem. I added the following code, which is probably too simple, but works around the problem successfully for now:// JSL - if heightRange == 0 (Totally flat terrain,) use 10.0 as a HeightRange if (heightRange == 0) heightRange = 10.0;
Just posting this in case anyone else runs into the problem, or in case anyone has a better fix for the BuildFogTexture routine.
Torque Owner Steve Lamperti
Imagine That!