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
For some context, I don't think MuJoCo supports material_index mechanism to associate different faces of a mesh to multiple materials (colors) as some more dedicated renderers do. Two workarounds are:
UV unwrap the whole mesh, assign different colors to different parts of the texture;
Split the mesh into multiple sub-meshes, then one material each sub-mesh.
I go for the second approach, then encounter several strange bugs related to planar mesh (in <= 3.2.7). In 3.2.8, setting inertia="shell" resolves this issue. But even in upcoming 3.2.8, all meshes are forced to compute inertia, re-centering, and compute BVH, which is wasteful for sole visualization purpose. So, I hope MuJoCo could implement a flag to skip such process for certain meshes.
As a generalization, currently MuJoCo supports mjr_uploadMesh to update mesh dynamically for visualization. But it only takes the meshid-th mesh from the associated mjModel. Since MuJoCo stores meshes in a memory-efficient flat format, adding new meshes or adding / removing vertices from a mesh is very difficult. I think, mesh for sole visualization purpose could safely skip the whole MuJoCo core engine, and be supplied directly to the render context or visual struct.
Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
The feature, motivation and pitch
For some context, I don't think MuJoCo supports
material_index
mechanism to associate different faces of a mesh to multiple materials (colors) as some more dedicated renderers do. Two workarounds are:I go for the second approach, then encounter several strange bugs related to planar mesh (in <= 3.2.7). In 3.2.8, setting
inertia="shell"
resolves this issue. But even in upcoming 3.2.8, all meshes are forced to compute inertia, re-centering, and compute BVH, which is wasteful for sole visualization purpose. So, I hope MuJoCo could implement a flag to skip such process for certain meshes.As a generalization, currently MuJoCo supports
mjr_uploadMesh
to update mesh dynamically for visualization. But it only takes themeshid
-th mesh from the associatedmjModel
. Since MuJoCo stores meshes in a memory-efficient flat format, adding new meshes or adding / removing vertices from a mesh is very difficult. I think, mesh for sole visualization purpose could safely skip the whole MuJoCo core engine, and be supplied directly to the render context or visual struct.Alternatives
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: