Closed stukowski closed 2 years ago
Thanks for reporting. That code is currently not used in OSPRay (because curves are directly intersected by Embree now), but this will change. The correct way to check for the cylinder caps is to project the hits to the axis (instead of projecting the caps to the ray).
v2.8 has a reworked intersectCylinder()
.
Hi! I just want to make you aware of an issue in the
intersectCylinder()
function of OSPRay. More specifically, in this section of the code:https://github.com/ospray/ospray/blob/release-2.6.x/ospray/common/Intersect.ih#L114-L129
If the ray direction
d
is exactly perpendicular to the cylinder axiss
,sd
becomes zero and a division-by-zero follows and no hit is recorded. In my rendering application this leads to cylinder primitives disappearing if the camera uses a parallel projection and a cylinder is oriented exactly parallel to the camera's projection plane.