Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

picklejuice

carmack's reverse

This topic is 5225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve googled this subject many times, even read through the article on gamedev, but I''m still kind of in the dark here; could somebody explain carmack''s reverse to me?

Share this post


Link to post
Share on other sites
Advertisement
When determining whether or not a pixel is in shadow, you can compare the number of shadow volume front and back faces that are in front of the pixel ("zpass"), or you can compare the number of shadow volume front and back faces that are not in front of it ("zfail"). The results are the same.

There are serious complications. The zpass result will be wrong if the near-plane clips a shadow volume. The zfail result will be wrong if the far-plane clips a shadow volume. The errors are especially difficult to correct using the zpass technique.

The advantage of zfail is that it is much easier to overcome the far-plane clipping problem than the near-plane clipping problem.

The zfail technique is also called "Carmack's Reverse" because of a widely circulated email by John Carmack where he explains how he realized an advantage of zfail -- the far-plane clipping problem can be overcome by capping the shadow volumes. Though capping the shadow volumes is not perfect and not trivial to implement, it is much easier and more effective than any solution for overcoming the near-plane clipping problem of zpass.

In 2002, Everitt and Kilgard demonstrated how moving the far plane to infinity also elminates the far-plane clipping problem and removes the need to cap the shadow volumes.

[edited by - JohnBolton on February 29, 2004 3:28:00 PM]

Share this post


Link to post
Share on other sites
Just a side note, Carmak is a genious, dont get me wrong, but ive heard taht many equasions and such that have been attributed to him, really arent his

Share this post


Link to post
Share on other sites
@Ademan555:
that is true, in a "slightly different way":
no one of all those "great developer", who you do know nowadays, are such geniouses - because they are only applying techniques, which would rotten on university server''s and research laboratories, if they won''t use it in computer games - nearly 90% of all those "cutting edge features", as you will call them, have been available since a long time on the internet - you only need to know, how to search...
(e.g. Blinn''s bumpmapping, around ~1975; but it was not used before 2 years)


DJSnow
---
this post is manually created and therefore legally valid without a signature

Share this post


Link to post
Share on other sites
quote:
Original post by JohnBolton
When determining whether or not a pixel is in shadow, you can compare the number of shadow volume front and back faces that are in front of the pixel ("zpass"), or you can compare the number of shadow volume front and back faces that are [u]not[/u] in front of it ("zfail"). The results are the same.

There are serious complications. The zpass result will be wrong if the near-plane clips a shadow volume. The zfail result will be wrong if the far-plane clips a shadow volume. The errors are especially difficult to correct using the zpass technique.

The advantage of zfail is that it is much easier to overcome the far-plane clipping problem than the near-plane clipping problem.

The zfail technique is also called "Carmack's Reverse" because of a widely circulated email by John Carmack where he explains how he realized an advantage of zfail -- the far-plane clipping problem can be overcome by capping the shadow volumes. Though capping the shadow volumes is not perfect and not trivial to implement, it is much easier and more effective than any solution for overcoming the near-plane clipping problem of zpass.

In 2002, Everitt and Kilgard demonstrated how moving the far plane to infinity also elminates the far-plane clipping problem and removes the need to cap the shadow volumes.


this post was rather hard for me to understand so I had to use the gamedev dictionary, however, some things are not listed so I'll try to explain what I don't understand here;
what I do think to understand is that the shadow calculation can easily be done when images are loaded nearby, by comparing to the existing shadow pixels (?? I don't really grasp this part though, how does that work?), but this can't be done when images are loaded far away, that can be solved by "capping" (which I don't understand either)


thanks for the info anyway, if you could explain the above things that would be a great help, thx!

edit: far is easy, close is hard, sorry

[edited by - picklejuice on February 29, 2004 10:38:50 AM]

Share this post


Link to post
Share on other sites
Sorry. I assumed that because you asked specifically about "Carmack''s Reverse" that you knew what it applies to.

Here is the background:

There are several methods for rendering shadows. One category of methods is called "stenciled shadow volumes" (or just "shadow volumes"). "zpass" and "zfail" are two methods in that category. "Carmack''s Reverse" is another name for "zfail".

Share this post


Link to post
Share on other sites
thanks! edit: anyone care to elaborate a little on the above 3 methods? I'd really appreciate it

[edited by - picklejuice on March 3, 2004 5:19:09 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!