Clipping issue using 'infinite' P matrix ( Radeon 8500 )

I’ve noticed what might be a clipping bug on Radeon 8500. I’m using the 6043 drivers on Win2000 ( the only drivers that work with Tomohide’s fur demo ).
The clipping “bug” appears when using the Pinf matrix as descriped in this paper .

NVIDIA’s new infinite shadows demo demonstrates the bug ( the code needs to be modified so that polygon offset is not used ).

Has anyone with Radeons noticed this ? Humus ?

PH,

Can you post an image of the possible bug?

Thanks -
Cass

I haven’t checked the demo out too deeply, but I did notice some artefacting in it.

The model seams kinda broken, shadows worked just fine mainly, except for some small occasional glitches .

Exactly like that. Yes, those are caused by the Pinf matrix on Radeon 8500 hardware ( not just this demo ). The artifacts on the model are caused by using polygon offset, here my shot of it,
http://www.geocities.com/SiliconValley/Pines/8553/Pinf.html

I’ve also noticed some of these problems actually on the model, like at one angle it would be fine, but rotate the model a bit and all of a sudden, one or a few polys would all of a sudden go black from the shadow. Maybe this wouldnt happen if the model had more polys, it is pretty low poly.

-SirKnight

[This message has been edited by SirKnight (edited 04-07-2002).]

I did a few more tests and it seems that the possible clipping bug, is caused by using vertices with W = 0 ( and not neccessarily the Pinf matrix ).

One thing to try. There’s a slop factor I use to nudge infinity slightly less than 1.0. Here’s the code in infinite_frustum():

// nudge infinity in just slightly for lsb slop
float nudge = 1 - 1.0 / (1<<23);

m(2,2) = -1 * nudge;
m(2,3) = -2*zNear * nudge;

You might try setting nudge = 0.9 to see if it’s some sort of LSB issue with the clipper.

Also, polygon offset shouldn’t be causing any problems since it’s only used when drawing the model (and not the shadow volume).

Thanks -
Cass

[This message has been edited by cass (edited 04-08-2002).]

Cass,

Well, I removed the nugde altogether and it works now ( I tried 0.9 but that failed too ). The strange thing is, I ran the wireframe test I posted a screenshot of some time ago ( regarding the scissor box ) and I noticed the lines jumping around ( it didn’t do that on my GeForce3 ). That combined with your shadow demo made me thing it was a possible bug.

Interestingly, there are now some artifacts on GeForce DDR ( without the nudge ). Is this the case with GeForce3 too ? Not a big problem since we’ll “soon” have NV_depth_clamp or similar.

Last thing, is the technique still robust ?

Paul

[This message has been edited by PH (edited 04-08-2002).]

Paul,

It’s odd that taking the nudge out makes it work for Radeon. Its purpose is to allow some margin for numerical error in the computation. The fact that you can have a “fudge factor” is one thing that makes the technique robust (the other is depth clamp).
Otherwise infinity is really on the razor’s edge of what should be clipped.

The reason the fudge factor is in there is that GeForce4 Ti required it. GeForce3 did not (in any of my testing).

Thanks -
Cass

Cass,

Instead of using the nugde, would it be possible to use a ledge at the far plane ? Like the one described by Mark Kilgard for the near plane and still use the ordinary Pinf matrix. I haven’t given it a lot of thought, so I may be wrong ( I have previously used Kilgards near plane ledge which seemed to work fine ).

How did you manage to download the demo from http://developer.nvidia.com/view.asp?IO=inf_shadow_volumes ?

The server is always busy(I tried from home and from work)

can somebody post the demo and the src, please ?

Paul,

You really don’t need a special ledge when capping at infinity with the zfail approach.

The ledge is useful when you have to introduce capping geometry in object space and you need some room (both in front and behind it) to make sure it doesn’t get clipped. Nudging infinity in essentially does the same thing for the infinite zfail approach. You just want to make sure things that shouldn’t be clipped aren’t.

Thanks -
Cass

Cass,

So the nudge and the ledge would accomplish the same thing ?

And I got the nudge to work on Radeon 8500 by using 0.9 and 0.995. I’m not sure what I did wrong the first time. Strange that it’s required on GF4Ti/GeForce DDR and not GeForce3 / Radeon 8500…

Paul

Sorry but what the hell is slop? Also i guess there is something about clipping i didnt know about cuz all of this talk about nudge is kinda confusing me. Im not sure why this nudge thing is needed. For one thing its not mentioned in the paper.

-SirKnight

SirKnight,

You know about epsilon values, right ? Such as Abs(A-B) <= Epsilon. This says that A and B may differ by a small +/- Epsilon value and be considered equal.

Slop is almost the same - it’s just one-sided.

I’m not sure why it wasn’t mentioned in the paper - maybe it’s another technical point ( something similar to rendering the caps twice ).

Paul

Oh ok, i never heard of slop before and i was like what the heck, sounds like something pigs eat. What im wondering now, is why was the nudge computed like that. I know what 1<<23 does but why is it being done like this? If you want to nudge -1 to, well be sloppy i guess , then why go through the trouble of computing that and just multiply by some value that will make it close to -1 but not exact, so that way it will be nice and sloppy. I guess.

-SirKnight

[This message has been edited by SirKnight (edited 04-08-2002).]

Originally posted by opla:
[b]How did you manage to download the demo from http://developer.nvidia.com/view.asp?IO=inf_shadow_volumes ?

The server is always busy(I tried from home and from work)

can somebody post the demo and the src, please ?[/b]

Yeah, I tried for the last 4 days, and I tried very late, very early, early, and basically left a download manager try to get it, and no matter what, the server was always busy. So your not alone in this.

Opla & Elixer,

Cass mirrored the files on his personal server, look in this thread,
http://www.opengl.org/discussion_boards/ubb/Forum3/HTML/006086.html

Both links work ( just tried them ).

Ok nm about my last question in my last post, i pluged all that into my calc and i see it gets a number thats very close to 1, its like .99999999blahbalh which makes sence.

-SirKnight

Just to clarify, there may be a more formal definition of “slop” that I’m not aware of. My usage of the term is just “some error” - either positive or negative.

Thanks -
Cass