-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export Mesh Sequence Cache modifier #1327
Comments
for the cloth modifiers would be useful to have that feature for alembic files "MeshSequenceCache" or the ideal would be to add support for convert alembic mesh cache directly as an animation with blend shapes frame by frame in a gltf file |
Once there is a MeshCache animation, you can convert it to blend shapes. Requirement requires same vertex count. https://gist.github.com/fire/495fb6a35168500df53c002695a1f5fe |
I think I've done this workflow in the past by exporting to MDD, re-importing as shape key sequence, and then exporting to glTF. An automatic workflow would be nice... I would say this would require that "Apply Modifiers" be enabled, but that option prevents exporting shape keys. :/ If the shapes do not have the same vertex count, technically you could export each as a distinct mesh and animate through them (e.g. setting scale at 1 or 0). I've written a script to create an animation sequence like that offline but I'm not sure it's a good idea to put that sort of animation into the Blender exporter, it is pretty inefficient. So maybe we just require the same vertex count as suggested above. |
For the different every frame case, I think it's also possible to avoid scaling to zero and use a blend shape that collapses the mesh to a point so that the blend weight means zero volume. |
An engine may be able to optimize by not rendering a mesh with |
What does your framework do for each case? I wanted to pick a random framework. |
For an animation with N meshes for N keyframes, I would expect any framework to have N draw calls if the mechanism hiding a mesh is collapsed morph targets. Detecting the net effect of some morph targets, and dynamically hiding a mesh when every vertex is collapsed, would be expensive, I've never heard of a framework doing that. If the |
That makes sense to scale to 0 then. What can I do to make this part of this addon? |
Does applying a Mesh Sequence Modifier ordinarily create an animated Shape Key sequence? If so, I don't think there would be any objections to fixing support for the shape keys when the "Apply Modifiers" option is enabled. That would handle the case where the vertex counts are the same. If you need to also support the case where vertex counts are not the same, I am unsure what Mesh Sequence Modifier normally does when applied, or whether it is reasonable for this addon to use the "flipboard" scaling technique automatically. Perhaps a series of morph targets could also be used here, deforming unused triangles to |
Is your feature request related to a problem? Please describe.
I have an blend file which is using the Mesh Sequence Cache modifier and I want it as a gltf.
Describe the solution you'd like
The solution is an ability to convert Mesh Sequence Cache modifier to shape keys, we assume same vertex counts. If the vertex count is different we have to split the blend shape into a different mesh.
Each animation frame is the mesh existing or collapsed to zero volume or a blend shape weight.
Describe alternatives you've considered
I don't have any other way of implementing this. Alembic is not an option.
Additional context
https://sketchfab.com/3d-models/alembic-cloth-d2303eebe3724b7080071e1f02d66692
Sketchfab has a way of doing this.
cloth_sim.zip Contains blend, abc and gltf.
See also #717
The text was updated successfully, but these errors were encountered: