I need to export the object animation as a .gltf and/or .fbx. I imagine I need to bake the animation but as this is a modifier, I’m not sure if it’s possible.
.fbx can’t ( that I know of) record mesh cache data, which is what you require.
I can’t get .gltf to do so either ( but that might be a limitation of Blenders implementation not of the format itself.)
However, if you can use Alembic ( .abc files ) in your work flow, this is perfect and will do exactly what you require. Exporting to the Alembic format seems to be built into Blender as it doesn’t show up in the Add-Ons, but does appear in the Import/Export tab.
After some more testing that’s the conclusion I’ve also come to. If anyone does know how to export as .gltf I’d be grateful to hear more. I’d certainly prefer a Blender to .gltf workflow.
But after exporting to glTF, the animation is very glitchy. Exporting to FBX currently fails with an error. I’ve added more details in a bug report on the glTF exporter here: https://github.com/KhronosGroup/glTF-Blender-IO/issues/176. The glTF animates correctly if you enable the Always Sample Animations option at export.
Actually here we go – if you select Animation --> Always Sample Animations in the glTF exporter options, after the steps above, you’ll get a working result. Note that this contains one shape key for every frame of the animation, so the file could get big quickly.
Thank you for this Don. I’m going to give it a go.
For this project there are a lot of animations so I think this method will result in a huge file. For future projects with less animations it looks like a good workaround.
I would like to have a ‘belt’ move along a bezier curve/circle exported to GLTF in Blender 2.8. I have had success with the strategy @donmccurdy outlines above in the past when using hook modifiers, but am running into issues with it for a simple ‘conveyer belt’ animation where I’m just transforming an object along the Y using a curve modifier.
(For example):
The .mdd export error is:
Traceback (most recent call last):
File "/Applications/blender2.8.app/Contents/Resources/2.80/scripts/addons/io_shape_mdd/__init__.py", line 152, in execute
return export_mdd.save(context, **keywords)
File "/Applications/blender2.8.app/Contents/Resources/2.80/scripts/addons/io_shape_mdd/export_mdd.py", line 72, in save
me = obj_eval.to_mesh()
AttributeError: 'bpy_func' object has no attribute 'to_mesh'
location: <unknown location>:-1
As an alternative strategy I tried baking all key frames but that didn’t seem to help.
I wouldn’t know how to debug a .mdd export unfortunately.
This particular example could also work with separate objects for each panel and TRS keyframes though. Not sure if there’s a quicker way to set that up than one-by-one.
Did anyone come up with a better solution? My file size is exploding using the “bake every frame to shapekey solution”. Maybe generating a bone for each chain link? Maybe using Geometry Nodes to animate the instances and later bake them?