mujoco icon indicating copy to clipboard operation
mujoco copied to clipboard

API function on Python Viewer to inject textures independently from mjModel

Open vikashplus opened this issue 1 year ago • 3 comments

The feature, motivation and pitch

The ability to add a new geom to the user_scn in the Python viewer is quite powerful in building and updating all sort of visualization needs -- from annotation to sensor data viz. We have been using this functionality extensively.

For a newly added geom, we also want to add and use a new user texture & material. This feature is currently not supported. This is a missed opportunity as it can unlock a wide variety of cool visualization features on top on simulation which should be lean and thin.

After discussion with @yuvaltassa and @saran-t, it was proposed that we use "a new API function to inject textures and materials independently from mjModel".

Starting this request to track the developments.

Alternatives

No response

Additional context

No response

vikashplus avatar Jan 15 '25 17:01 vikashplus

Also, allow uploading mesh independently from mjModel would be helpful to my use case.

jjyyxx avatar Jan 16 '25 01:01 jjyyxx

@yuvaltassa - Im curious about your thoughts on this proposal.

vikashplus avatar Mar 12 '25 02:03 vikashplus

Obviously this is much harder since textures and meshes live on the GPU rather than mjvScene.

This is certainly possible, but doing it with the current backend would probably be a wasted effort, since we are hoping to revise out entire visualization/rendering solution. I'd love to give you a timeline for this, but we're still in the early planning stages.

yuvaltassa avatar Mar 15 '25 11:03 yuvaltassa