Rendering Problem: "swimming verticies" ?

I don’t know if anyone has seen this and knows what it is…

First: I am using a voodoo3 with 3dfx’s latest drivers…

Now: when I render a model I have loaded in - when I render it close up so that it takes up most of the screen it renders fine… but as I move the camera back… the verticies and polygons at the edges, ie where 2 polys cross, seem to “wave” or “swim” back and forth…! Is this a depth buffer problem or a voodoo specific problem? it looks really ugly… anyone seen/fixed this before?!

thanks

jdm

My guess is that its a precision problem. The closer the model is to the viewer the more precision there will be, but as you move away you have less precision. Try making your zfar parameter smaller.

Nate http://nate.scuzzy.net

Well may be I am wrong, but I have seen something else like that on a different board as well.

It was quiet simple. The card was over heating, it only had a heatsink (without fan) and the card went HOT after a short period of time. After attaching a fan to the heatsink everythink was fine.

As far as I recall very Voodoo I have seen before was a HOT card too. If your system case can’t absorb that heat it may cause that effect.

But honestly I’m not sure if this is happening to you, it could also be a driver related problem.

Regards,

LG

Nate’s right - decrease your far Z vaule and see if it still happens.

Paul

Yes - farz was very high, 1900 - reduced it to 400 and that helped a lot - still not perfect but it does look a lot better - thanks!

so here’s a follow up question:

is there a difference in precision between having a farz of 2000 and drawing a about 1000 away from the camera
-or-
having a farz of 200 and drawing the same model 1/10 scale 100 away from the camera?

will there be a difference in precision between how those two? If there is a difference, which one will look better, do less of the ‘vertex’ swimming…

also - would buying a different card, say, for the sake of argument, a GeForce2 card, improve the precision of models drawn with a high farz ?

thanks again!

jdm

I think simple rescaling (both clipping planes and model size) would be the same.

Getting another card might help, you want
higher precision in the Z-buffer. Go for
one with more bits/pixel. Possibly you
can try to request more z-buffer pixels
and loose colour precision. (can one do that on a PC low-end card?)

/ plg

I read somewhere that the way some cards store the Z buffer vaules is non-linear. So having a near clip plane of 0.0 or 0.1 is also a very bad thing. The recommended near clip plane value is 1.0

Try that too.

Paul.

[This message has been edited by Pauly (edited 06-12-2000).]

In various docs, you’ll see that the ratio of zFar/zNear affects depth-buffer precision.

MSDN docs = roughly log (base2) (zFar/zNear) bits of depth buffer prescision are lost.

So - on the Voodoo3, 16 bit Z-Buffer…

2000/1 =roughly 11-bits of precision lost, so you have an effective 5 bit Z-Buffer.

At 400/1, you’re better, doing roughly 9-bits of precsion lost… so you have a 6 bit Z.

Ideally, you want to scale all of your vertices to a normal form. Say, you want a depth buffer of roughly 12-bit precision. That means you can afford 4 bits of loss.

The caluclation (inverse math) is 2^4 or your zFar should be 16, and you vertices should be scaled to between 1 and 16 to fit the screen.

Hope this helps!

Siwko