I build a cylinder model use 3dsmax with a radius of 10 and a height of 50(height divede 100,circle divide 100), and then export it as .obj file. I change the sample “optixMeshViewer” to build rays from the shaft of a cylinder, and direction from D = (sin(x),0,cos(x)) while x from[0,2*pi]. I just find that not all of the rays hit the model. Such as position(0,5,0), some of rays from this point will miss. So I wonder to know if I do something wrong when changing the sample. Thanks
The triangle intersection routines provided by the OptiX SDK, for example the intersect_triangle() code in optixu_math_namespace.h, are not watertight for performance reasons. Means you can actually miss two adjacent triangles when shooting directly onto the shared edge due to limited floating point precision. If this happens for very few of the shot ray then that is expected behaviour.
If you need a watertight triangle intersection for your algorithm, you could implement that instead.