-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Is your feature request related to a problem? Please describe.
Meshcat is currently capable of recording transformations (Meshcat::SetTransform
) and properties (Meshcat::SetProperty
) into animations. However, it lacks the capability to record entire objects (Meshcat::SetObject
). Therefore, we cannot record animations for deformable bodies.
Describe the solution you'd like
I propose entending to Meshcat API to support recording entire objects. I have taken a spin at it, and this is what is looks like [example1] [example2]. The idea is to append the object data (including meshes, vertex positions, and materials) to the set_animation
command, and dynamically setting the object based on the best matching time-stamp when the animation is playing.
Describe alternatives you've considered
A small problem is that when the user downloads the static HTML file, because the set_animation
command is bundled into the HTML file, the file can get very big, and browsers would refuse to open it. For example, for a complex scene with many triangle meshes as follows, the static HTML file is 1.3GB.
entangling_filament_gripper.webm
One possible solution is to pass only the vertex position for each time-stamp instead of the entire object for each time-stamp. But this would complicate the implementation and is not as general if the animation somehow changes the mesh topology mid-animation.
Additional context
If this proposal is sound, perhaps we could merge this PR first.