Projecting 2D Coordinates onto Non-Flat Terrain to Obtain Z-Coordinate Using Sionna #865
-
Hello, Currently, I’ve implemented this process in Blender, where I can successfully project the points onto the terrain mesh and retrieve the z-coordinate. However, I’m looking for a more efficient and programmatic solution that doesn’t rely on Blender. I’ve been exploring Sionna , if there are any tools or utilities within the library that could help me achieve this task. Specifically: Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
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 If that doesn't directly work, two possible workarounds would be:
|
Beta Was this translation helpful? Give feedback.
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_intersectIf that doesn't directly work, two possible workarounds would be:
mi.load_dict()
containing only your terrain mesh and callScene.ray_intersect()
(this one should work for sure)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.