pbrt-v3 icon indicating copy to clipboard operation
pbrt-v3 copied to clipboard

incorrect self-intersections with cone and paraboloid shapes

Open mmp opened this issue 10 years ago • 1 comments

The unit tests for incorrect re-intersections with spawned rays for Cone and Paraboloid fail (currently commented out in src/tests/shapes.cpp). This should be chased down; could be related to a bug in the EFloat class, since those lean heavily on that (vs the other shapes where the re-intersection tests all pass.)

mmp avatar Oct 25 '15 20:10 mmp

One issue is that the variant of Quadratic() for EFloats computes the discriminant using double precision, completely ignoring the inbound error bounds with the A, B, and C parameters. If instead this is implemented to use EFloats with double-precision values (and then the < 0 test is done with the interval's LowerBound(), results are... interesting.

The good news is that the incorrect self-intersections seem to be fixed; the tops of cones in particular look great. The bad news is that as they go farther from the origin, quadrics start to shrink--for example, for a unit sphere 10000 units from the origin (with the camera right next to it), what looks like the outer 15% or so of the sphere just disappears.

Further investigation is warranted...

mmp avatar Apr 07 '16 00:04 mmp