Skip to content
Discussion options

You must be logged in to vote

Mesh BVHs are built like this: https://github.com/google-deepmind/mujoco_warp/blob/render/mujoco_warp/_src/bvh.py#L300

Static meshes need to only be built once. When you build the mesh you should calculate the canonical size of the mesh.

Then when you update your lowers/uppers (which you would do every frame since geometry is moving), you can use the original size calculated, update it based on the new position/rotation, and update lowers/uppers for that mesh: https://github.com/google-deepmind/mujoco_warp/blob/render/mujoco_warp/_src/bvh.py#L210

As you mentioned, there is no smarter way to do this, other than streamlining your example to make sure you create the meshes in advance and sto…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tueboesen
Comment options

@StafaH
Comment options

StafaH Jan 30, 2026
Collaborator

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