Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Samuel Hornus, posted on February 22, 2005

Image Description, by Samuel Hornus

Hi everyone, This image demonstrates ZP+ which, as the name implies ;-), improves on Z-pass, the good-old method for real-time stencil shadows.

As you all know, I'm sure, Z-pass fails when the near rectangle (the visible part of the near plane) is (partly) shadowed, as holes are created on the near plane that locally break the counting argument that makes stencil shadows work. This new method, dubbed ZP+ for "Z-Pass Plus", simply corrects this defect of Z-pass. Using a skewed frustum with the light source as apex, we are able to fill these holes exactly. The positioning of this frustum is depicted on the bottom-right figure. As a result, we obtain a robust version of the Z-pass method, that can take advantage of triangle-strips and VBO since the mesh need not be cut into a light-cap and a dark-cap anymore. Thus, we get frame-rates faster than Z-fail in most cases. And stencil shadows become more applicable to large meshes. There are some subtle problems to deal with when implementing ZP+ but they are all adressed in details in our paper.

If you are interested, please take a look at it! If you implement the method into your application, I'd be happy to hear from you. Thanks for reading!

Samuel Hornus

Image of the Day Gallery


Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
Joakim Hårsman

February 22, 2005, 06:53 AM

Neat trick! I hate to be asking this but how's the patent status on this idea?

Samuel Hornus

February 22, 2005, 09:18 AM

Indeed, I am surprised nobody thought about that earlier (Z-pass was invented in 1991).

As for the patent status, needless to say, we are aware of the drama between iD and Creative. ZP+ is not patented, and *I* feel very uncomfortable with the idea of patenting a simple use of perspective projection. If, despite my will, ZP+ ever get patented, this will be by a university (where we did this work). And universities are not (I hope) using patents to force people giving them money.

What I'd love to hear (read), is feedback from people, to know if ZP+ is truly usefull in real video-games (or the likes)



February 22, 2005, 09:43 AM

What's the drama between id and Creative? I must be out of the loop - has something come up regarding Zfail stencil shadows?


February 22, 2005, 10:07 AM

I think it probably *has* been invented many times and rejected because of cracks.

Section 5 is the real gem of the paper, which discusses how to identify cases where numerical errors will lead to cracks and squash them. Nice job!


Samuel Hornus

February 22, 2005, 11:54 AM

Morgan wrote: I think it probably *has* been invented many times and rejected because of cracks. -m

Yes probably, although I have not seen any piece of text dealing with this projection (have you ? This is strange, because the artifacts are so small (except in one rare case) that it is usable even without section 5. The appearance of vertex programs finally made some corections feasible in hardware :-)

Jared Hoberock

February 22, 2005, 04:26 PM

Seems like the published work that was most like the technique was Kilgard's near ledge stuff. He used almost the same projection, but performed all the computations in object space.

This thread contains 7 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.