Game Development Community

Fog problems

by Howard Dortch · in Torque Game Engine · 03/11/2006 (9:45 am) · 9 replies

I turn on fog in my mission and the buildings have what I call tearing or artifacting on some of the triangles. I just looks horrible. Didn't do this with 1.3.
I changed to map2dif_plus got the same thing so it's not the exporter it's in the engine. It doesn't seem to do it on the demo mission but the buildings are small.
Updated drivers for ati 9600 same thing.
Anyone have some hints?

#1
03/12/2006 (9:20 am)
Are you running OS X or Windows? Also try running the debugger to see which interior rendering method Torque is using (renderARB_FC, renderARB, ...). That should help identify the problem - I know I've seen this on OS X in certain instances using TGE 1.3 and 1.4.
#2
03/12/2006 (9:41 am)
Windows, 4 different computers all same results. My version of 1.4 wont run in debug mode. still trying to track that one down.
#3
03/12/2006 (7:27 pm)
Can you post your prefs file, that should give me an idea of the interior rendering path being used.
#4
03/13/2006 (6:42 am)
$pref::Interior::detailAdjust = "0.3";
$pref::Interior::DynamicLights = "1";
$pref::Interior::LightUpdatePeriod = "66";
$pref::Interior::lockArrays = "1";
$pref::Interior::sgDetailMaps = "1";
$pref::interior::showdetailmaps = 0;
$pref::Interior::ShowEnvironmentMaps = "1";
$pref::Interior::TexturedFog = "0";
$pref::Interior::VertexLighting = "0";

I noticed when I set the vertexlighting to 1 it gets better.
#5
03/13/2006 (7:13 am)
Those are the same settings I'm using here and I cant get the z-fighting to happen.

Can you pack up a simple example folder with a mission that shows the problem, and host it or send it over via fileshack, so I can see if it happens here too and whats going on?
#6
03/13/2006 (8:22 am)
Sent you mail.
#7
03/13/2006 (9:28 am)
Cool, thanks - that helped.

This is the same issue I mentioned I saw on the mac and is caused by one of TGE's interior rendering pathways. If the mission has fog, TexturedFog is disabled, and the video card doesn't support the GL fog coord extension, then the rendering will have z-fighting (due to problems in TGE's interior rendering).

Most video cards support fog coords so it is rarely a problem, and in this case the extension was disabled in Torque's prefs:

$pref::OpenGL::disableEXTFogCoord = "1";

Just set that to "0" and you should be ok.
#8
03/13/2006 (9:49 am)
And thats why yer (BobTheCBuilder) and I'm not... thanks man works fine now. /em ponders John = Bob
#9
03/13/2006 (1:35 pm)
Hopefully these rendering issues will be resolved in the future, or I'll have the time to look into them (they're outside the scope of TLK, but I can still take a look), because these issues also cause the TGE dynamic lights have the weird glow/outlines where surfaces intersect. :/

It would be cool to get these all fixed. :)