POV-Ray / povray

The Persistence of Vision Raytracer (POV-Ray)
https://www.povray.org/
GNU Affero General Public License v3.0
1.37k stars 282 forks source link

Leaving mesh inside_vector untouched on transforms. #361

Closed wfpokorny closed 5 years ago

wfpokorny commented 6 years ago

Formally, both the ray origin and the direction derived from the inside_vector for the inside mesh test would see an inverse transform into the mesh's coordinate space. This would sometimes result in a change in the inside_vector/ray direction with respect to the mesh. Such direction changes are problematic given test ray directions roughly perpendicular to a triangle's normal are noisy with respect to ray-triangle intersections.

Running the attached test scene we correctly get the attached image where a planes texture is controlled by an object pattern based upon the mesh. The star mesh has a flat back very set just inside the plane surface. If the scene is run against the current master, the inside of the star mesh is missed.

meshinisidevect MeshInisideVect.pov.txt

wfpokorny commented 5 years ago

Branch at closing still exists and is occasionally re-based to master.