# Ray Tracing with Cones: coverage, overlapping and abutting triangles

In his classic paper Ray Tracing with Cones, 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.

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?

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") 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.

• 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? Commented Sep 3, 2015 at 19:07
• 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. Commented Sep 4, 2015 at 9:55