Game Development Community

T3D Beta 2 Bug: Road Z Buffer Issues, renders above items it shouldn't.

by Tim Dix (Raverix) · in Torque 3D Professional · 05/24/2009 (8:35 am) · 6 replies

The road when viewed from above renders above even deep water, as well as renders on top of player / vehicles / any other geometry.


#1
05/24/2009 (1:16 pm)
I have also noticed that when my AI run over a road it look like they are running through it knee deep.
#2
05/25/2009 (4:11 pm)
@Tim - You have this change applied right? If you revert that then it goes away right?
#3
05/25/2009 (5:52 pm)
@Tom - This is in stock T3D Beta 2, no modifications.

Edit: Looking at the source, the value for Beta 1 was 0.000132f, the fix suggested a value of 0.001f, and Beta 2 is using a value of 0.005. I'm currently compiling Beta 2 and will test out the previous values and report the results.

Results:

Yes, as suspected, that line of code is to blame. 001f provides much better results, even at a distance, at least on my hardware.
#4
05/25/2009 (6:16 pm)
And I've just been messing around with this as well...

0.005 = no Z fighting at all but from distance road is over all other materials and objects. The camera has to get pretty high for the road to go over water, but it does happen. Players however can disappear under the road from a couple of hundred metres.

0.001 = no Z fighting, road stays under water even from great height. Players slightly obscured over long distance, though they are already a very small model (more blob size than stick figure)

0.000132 = Z fighting in-game and in-editor.
#5
05/25/2009 (6:20 pm)
@Steve - Yeah, identical results on all accounts.
#6
05/25/2009 (8:45 pm)
Ok... thanks for the feedback guys. I'll see what else we can do there to fix that issue.