You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test whether a bigger mesh is blocked by a small mesh and I found that ray test results are weird in some cases.
I compared results of intersects_any and intersects_id in both of ray_pyembree and ray_triangle. Results by ray_pyembree does not match while results by ray_triangle do match as expected. Meanwhile in some case ray_pyembree.intersects_any also gives incorrect result.
I don't know whether this bug is from pyembree or trimesh.ray.ray_pyembree. But it seems that all rays mis-checked by ray_pyembree pass through some vertices or edges of the small mesh. So I guess the bug may be a precision issue.
I tried this code below to reproduce my issue. Every ray passes through some vertices or edges of the small mesh and still some rays are mis-checked in intersects_id.
Visual small mesh, big mesh, filtered1 mesh(by intersects_id) and rays:
Visual small mesh, big mesh, filtered2 mesh(intersects_any) and rays:
The text was updated successfully, but these errors were encountered:
YuanWenqing
changed the title
ray test results do not match by ray_pyembree.intersects_any and ray_pyembree.intersects_id
ray_pyembree.intersects_any and ray_pyembree.intersects_id produce incorrect results
Feb 15, 2022
I'm trying to test whether a bigger mesh is blocked by a small mesh and I found that ray test results are weird in some cases.
I compared results of intersects_any and intersects_id in both of ray_pyembree and ray_triangle. Results by ray_pyembree does not match while results by ray_triangle do match as expected. Meanwhile in some case ray_pyembree.intersects_any also gives incorrect result.
I don't know whether this bug is from pyembree or trimesh.ray.ray_pyembree. But it seems that all rays mis-checked by ray_pyembree pass through some vertices or edges of the small mesh. So I guess the bug may be a precision issue.
I tried this code below to reproduce my issue. Every ray passes through some vertices or edges of the small mesh and still some rays are mis-checked in intersects_id.
Results:
Visual small mesh, big mesh, filtered1 mesh(by intersects_id) and rays:
Visual small mesh, big mesh, filtered2 mesh(intersects_any) and rays:
The text was updated successfully, but these errors were encountered: