<p>I did implement a ray tracer based on Amantides' work but, as that was  years ago, my memory of the paper is a little rusty.</p>

<p>However, ignoring this particular case, in general when it comes to working with fractional coverage e.g. Alpha compositing, (see <a href="https://en.wikipedia.org/wiki/Alpha_compositing#Description" rel="nofollow">"A over B"</a>) my understanding is that the usual assumption is that the items being composited are uncorrelated.</p>

<p>Thus if A with X% coverage is on top of B with Y% coverage and C in the background, then it's assumed that one will see<br>
    X%*A + (100-X%)*Y% * B + (100-X%)(100-Y%)*C</p>

<p>Does that make sense? Obviously this will give "leaks" in the case where A and B are strongly correlated.</p>

<p>I <em>think</em> I might have put a small bit mask on the rays to avoid these problems, but it was a very long time ago.</p>

CC BY-SA 3.0
2015-09-03T19:07:57.057Z
With that explanation it totally makes sense, thank you! In case you remember, how was your experience with cone tracing in comparison to normal ray tracing? Of course it's an approximation, but does it achieve a considerable speedup at acceptable quality?
David Kuri
CC BY-SA 3.0
2015-09-04T09:55:20.113Z
Oh, gosh, it was a long time ago.  Actually, I only implemented the cone tracing. Whether I actually tried turning off the radius part I simply can't recall but, if I get time, I'll try to remember the pros and cons of going down the cone-tracing route.
Simon F
CC BY-SA 3.0
2015-09-03T16:11:42.543Z
2015-09-05T10:03:50.143Z
2015-09-05T10:03:50.143Z
Simon F
<p>In his classic paper <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.6170" rel="noreferrer">Ray Tracing with Cones</a>, John Amanatides describes a variation on classical ray tracing. By extending the concept of a <em>ray</em> by an <em>aperture angle</em>, making it a cone, aliasing effects (including those originating from too few Monte Carlo samples) can be reduced.</p>

<p>During cone-triangle intersection, a scalar coverage value is calculated. This value represents the fraction of the cone that is covered by the triangle. If it is less than $1$, it means that the triangle doesn't fully cover the cone. Further tests are required. Without the usage of more advanced techniques however, we only know how much of the cone is covered, but not which parts.</p>

<p>Amanatides states:</p>

<blockquote>
  <p>Since at present only the fractional coverage value is used in mixing
  the contributions from the various objects, overlapping surfaces will
  be calculated correctly but abutting surfaces will not.</p>
</blockquote>

<p>This does not make sense to me. From my point of view it is the other way around. Let's take an example: We have two <em>abutting</em> triangles, a green and a blue one, each of which covers exactly 50% of our cone. They are at the same distance from the viewer.</p>

<p><a href="https://i.sstatic.net/n5JTo.png" rel="noreferrer"><img src="https://i.sstatic.net/n5JTo.png" alt="Green and blue triangle"></a></p>

<p>The green triangle is tested first. It has a coverage value of 0.5, so the blue triangle is tested next. With the blue one's coverage value of 0.5 our cone is fully covered, so we're done and end up with a 50:50 green-blue mixture. Great!</p>

<p>Now imagine that we kill the blue triangle and add a red one some distance behind the green one - <em>overlapping</em>. Greeny gives us a coverage value of 0.5 again. Since we don't have the blue one to test anymore we look further down the cone and soon find the red one. This too returns some coverage value greater than 0, which it shouldn't because it is <em>behind</em> the green one.</p>

<p>So, from this I conclude that abutting triangles work fine, while overlapping triangles would need some more magic like coverage masks to be correct. This is the opposite of what Amanatides says. Did I misunderstand something or is this a slip in the paper?</p>

<raytracing>
Ray Tracing with Cones: coverage, overlapping and abutting triangles
David Kuri
# Ray Tracing with Cones: coverage, overlapping and abutting triangles

(Asked by: username_0 on 2015-09-03)

In his classic paper [Ray Tracing with Cones](http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.6170), John Amanatides describes a variation on classical ray tracing. By extending the concept of a *ray* by an *aperture angle*, making it a cone, aliasing effects (including those originating from too few Monte Carlo samples) can be reduced.

During cone-triangle intersection, a scalar coverage value is calculated. This value represents the fraction of the cone that is covered by the triangle. If it is less than $1$, it means that the triangle doesn't fully cover the cone. Further tests are required. Without the usage of more advanced techniques however, we only know how much of the cone is covered, but not which parts.

Amanatides states:

> Since at present only the fractional coverage value is used in mixing
> the contributions from the various objects, overlapping surfaces will
> be calculated correctly but abutting surfaces will not.

This does not make sense to me. From my point of view it is the other way around. Let's take an example: We have two *abutting* triangles, a green and a blue one, each of which covers exactly 50% of our cone. They are at the same distance from the viewer.

[![Green and blue triangle](https://i.sstatic.net/n5JTo.png)](https://i.sstatic.net/n5JTo.png)

The green triangle is tested first. It has a coverage value of 0.5, so the blue triangle is tested next. With the blue one's coverage value of 0.5 our cone is fully covered, so we're done and end up with a 50:50 green-blue mixture. Great!

Now imagine that we kill the blue triangle and add a red one some distance behind the green one - *overlapping*. Greeny gives us a coverage value of 0.5 again. Since we don't have the blue one to test anymore we look further down the cone and soon find the red one. This too returns some coverage value greater than 0, which it shouldn't because it is *behind* the green one.

So, from this I conclude that abutting triangles work fine, while overlapping triangles would need some more magic like coverage masks to be correct. This is the opposite of what Amanatides says. Did I misunderstand something or is this a slip in the paper?

**Tags:** raytracing


---

## 1 answers

### Answer by username_1 on 2015-09-03. Score: 3 | Accepted answer

I did implement a ray tracer based on Amantides' work but, as that was years ago, my memory of the paper is a little rusty.

However, ignoring this particular case, in general when it comes to working with fractional coverage e.g. Alpha compositing, (see ["A over B"](https://en.wikipedia.org/wiki/Alpha_compositing#Description)) my understanding is that the usual assumption is that the items being composited are uncorrelated.

Thus if A with X% coverage is on top of B with Y% coverage and C in the background, then it's assumed that one will see  
X%\*A + (100-X%)\*Y% \* B + (100-X%)(100-Y%)\*C

Does that make sense? Obviously this will give "leaks" in the case where A and B are strongly correlated.

I *think* I might have put a small bit mask on the rays to avoid these problems, but it was a very long time ago.

> **Comments:**
> **username_0**: With that explanation it totally makes sense, thank you! In case you remember, how was your experience with cone tracing in comparison to normal ray tracing? Of course it's an approximation, but does it achieve a considerable speedup at acceptable quality?  
> **username_1**: Oh, gosh, it was a long time ago.  Actually, I only implemented the cone tracing. Whether I actually tried turning off the radius part I simply can't recall but, if I get time, I'll try to remember the pros and cons of going down the cone-tracing route.  

---

