

To delete an animation that has been stashed (and thus referenced by the NLA editor), remove the Fake User flag and also open the NLA editor and delete any reference to the animation by pointing with the mouse on a track and pressing X or Del. If you rename the item, that won't work anymore.

You will then see this reference show up in the scene outline/hierarchy window.ĭon't rename the stashed item! Every animation should be stashed only once, and if you keep the auto-generated name, Blender won't create another stash reference, if you push the stash button multiple times on the same animation. The way to do this, is to push the Stash button in the action editor on every animation. The fix is to fake reference every animation in Blenders NLA editor. This is because Blender thinks those animations are unused and won't export such unreferenced animations.

Once you add more animations, seemingly random ones won't be exported. Now it gets weird: If you add multiple animations in Blender, usually 4 to 6 of them will be exported in the GLTF file.

Be sure to set the Fake User flag on all of them to not lose any work. Use the Action Editor in Blender to create and manage multiple animations in a single file. So set the animation range in Blender to start at index 0 and put the first keyframe there. EZ expects the first keyframe to be at index 0, though. The preview window of an animation has no effect on the exported animation data.īlender always sets the first keyframe of all animations to index 1 and that is also how the data is exported. This won't have a positive effect in EZ though.īe aware that Blender exports ALL keyframes of an animation. By default Blender's GLTF export already restricts vertex weights to 4 bones, though there is an option to allow more influences. To fix this, select your scaled object and use Mesh > Apply > Scaling to bake the object scaling into the vertex positions and get rid of the scaling in the bone transforms.ĮZ uses a maximum of 4 bones per vertex. If you have an object scaled in object mode and attached to a bone, the scaling will be represented by the bone, so even if your animation keyframes do not use scaling, the exported animation track does. Use the Vertex Group Weights visualization in Blender to inspect which vertices are set up properly and which aren't.ĮZ does not support scaling of bones. Blender can move entire objects through bone animations, but if they are only parented to a bone, and don't use vertex skinning (vertex weights), EZ will not show those objects as animated. That means every vertex in the mesh needs to have a bone assigned via vertex weights. If there are flipped triangles, they will show up incorrectly in EZ.ĮZ only supports skeletal animations via skinned meshes. Use Blender's Face Orientation viewport option to see whether there are flipped triangles. Make sure all triangles face into the same direction.If you export such a mesh to a GLB and enable Y UP convention, you need to configure the mapping this way: This also means that the right side of the character will be along the -X axis. In Blender it is common to have a character look along the -Y axis so that it faces the user when pressing Numpad 1. For example AI nodes move characters forwards along the +X axis, spot lights and cameras "look" into the +X direction and so on.
#Export blender animation code
For animated models, the mapping is chosen on the root node of the corresponding skeleton asset.īy default all code uses +X as its main direction. For static meshes, this is configure on the mesh asset. You may need to change the mapping, to get the desired result. When importing a mesh, EZ remaps the model space to its own convention. Enable Export Deformation Bones Only to strip IK pole targets and other unnecessary bones from the file.You can set Blender to use 25 or 50 frames per second to make this calculation easier. If you want to only use a sub-range of an animation in EZ, you will need to re-calculate the frame indices accordingly. Blender, by default, uses 24 frames per second. Be aware that GLTF uses 1000 frames per second for all exported animation clips.Don't disable animation sampling on export.Make sure that the GLTF export contains Animations and Skinning information.In both cases you need to adjust the transformation on the skeleton asset. To get animated meshes out of Blender and into ezEngine, export the animated mesh to a binary GLTF file (.It is assumed that you know Blender well enough to create animated meshes. This page contains various pieces of information that are good to know when one uses Blender to build and export animated meshes. Authoring and Exporting Animations with Blender
