Skip to content
Discussion options

You must be logged in to vote

Hello @Chartist-1,

If you know which shape (mesh) represents the terrain in your scene, I think it should be able to directly perform ray intersection against it with Shape.ray_intersect(): https://mitsuba.readthedocs.io/en/stable/src/api_reference.html#mitsuba.Shape.ray_intersect

If that doesn't directly work, two possible workarounds would be:

  • Create a small Mitsuba scene with mi.load_dict() containing only your terrain mesh and call Scene.ray_intersect() (this one should work for sure)
  • Repeatedly call Mesh.ray_intersect_triangle(). But I don't recommend this since it will not scale well with the number of triangles in your terrain mesh.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Chartist-1
Comment options

Answer selected by Chartist-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants