Exporting assets and scenes from Blender

AnimEngine is designed around the open glTF 2.0 format, and is not designed around any particular 3D content creation software or animation tool. However, as a free and open source 3D creation suite Blender is commonly used to create scenes and assets for AnimEngine. This page acts as a tutorial and best practices references for using Blender in with glTF and AnimEngine.

Feature Mapping Blender, glTF, and AnimEngine

Common Features table

Feature

Blender

glTF 2.0

AnimEngine

Notes

Mesh Objects

Yes

Yes

Yes

No metaballs, curves, or other non-triangle mesh geometry.

Camera Objects

Yes

Yes

Yes

Supports cameras as animatable objects. Respects camera FOV value, but cannot animate FOV

Empty Objects

Yes

Yes

Yes

Basic Transforms

Yes

Yes

Yes

[Location, Rotation, Scale] Rotation is in quaternions see Quaternion Compatibility

Parenting / Scene Graph

Yes

Yes

Yes

glTF is strongly based around a hierarchical scene graph. Parenting in Blender should carry nicely into glTF and AnimEngine.

Armatures

Yes

Yes

Yes

  • Simple rigging VIA armatures is supported. Bone constraints and drivers are not.

  • Rig generating tools are advised against as they may produce incompatible rigs.

  • At this time, a maximum of 26 bones can be supported by AnimEngine.

Keyframes

Yes

Partial

Partial

  • Only location, rotation, and scale can be key framed through AnimEngine and glTF

  • glTF supports linear, step, and cubic spline interpolation.

Non-Linear Animation (NLA)

Yes

Partial

Partial

Strips in Blender NLA editor will be exported as separate glTF actions

Modifiers

Yes

No

No

Modifiers are only useful if they are permanently applied to objects before export.

Materials

Yes

Partial

Partial

glTF supports physically based materials, and reads material info from Blender Principled BSDF nodes only. Textures plugged into this node are also exported. Material properties not from Principled BSDF nodes are not exported

Shape Keys

Yes

Yes

No

Shape keys are supported by glTF and Blender, but not AnimEngine.

Constraints

Yes

No

No

Lattices

Yes

NO

No

Warning

It should be assumed that features not on the table above are not supported.

Note

Quaternion Compatibility

glTF only supports rotations as quaternion values. While quaternions are excellent for many things, they can’t capture certain rotations for the sake of animation.

Blender allows rotations to be kept and animated in a variety of formats. Often objects are use XYZ Euler rotations by default and are key framed on these values. This makes it easy to animate an object spinning more than 360° along an axis. For example:

A cube spinning 9 times in a second might be key framed to transition from 0° to 3240° on the Z-Axis over a duration of 1 second. This type of action is supported by Blender but is not supported by glTF.

This is because quaternions represent a rotational pose not a arbitrary amount of rotation around an axis. Be wary when animating objects which rotate more than a full revolution between any two keyframes.

A further quaternion concern is with interpolation between quaternion values. glTF supports linear, and cubic spline interpolation. The Blender glTF exporter defaults to cubic spline.

When quaternions are interpolated by cubic splines it often results in overshooting or jittery motion. We recommend that objects with animated rotation have their interpolation mode for rotations set to linear before export. This can be done as shown below:

In the graph editor view, search for Quaternion in the channel name search bar. Then select all F-Curves and set interpolation mode to linear using the interpolation mode menu T or Key Interpolation Mode.

Do and Don’t

Do:

  • Use parenting of objects and bones wherever possible to create the rigging for your characters.

  • Use the Principled BSDF material node to create your materials.

  • Animate your scene using simple key framing on location, rotation, and scale.

Don’t:

  • Use delta transforms

  • Use metaballs, curves, surfaces, or other non-mesh geometry

  • Animate objects using constraints or curve following. (Unless you can bake the action to keyframes)

  • Use lattices or other non-armature rigging tools

  • Use inverse kinematics

  • Use shape keys

Armature Rigged Assets

Characters rigged using armatures are essential for creating scenes for AnimEngine. However, there are many opportunities for incompatibility between a valid Blender rigged character, glTF, and AnimEngine. Some of these issues can be resolved after an asset is created using the Blender AnimEngine companion add-on’s Normalize Armature Relationships Operator, however it is always better to avoid them in the first place. Here are some tips.

  1. ALWAYS test your rig before you animate it

    An incorrect rig can usually be fixed fairly quickly. However animations that have been created on an incorrect rig are usually uncorrectable. To avoid needing to completely re-animate scenes or actions be sure to test your rig being animated and exported to glTF before moving forward.

  2. Objects parented to bones should have no scaling or rotation value of their own.

    Objects can be parented to bones in both glTF and Blender, even if that object does not use skinning. However, when these objects have rotation and scaling at the time of parenting that transform information is accounted for by Blender, but not exported into the glTF. This causes major breaks in the rigging when loaded from glTF.

    To be safe, objects parented to bones should have their rotation and scaling transforms pre-applied using the Apply Transforms operator in Blender.

  3. Armature objects (not bones) should have no scaling

    Armatures that have been scaled apply incorrectly through glTF, resulting in assets which are warped and offset incorrectly in space.

  4. Prefer animating a bone rather than an object

    When using an armature to control one or more objects, it is preferable that you animate the rigged asset using bones rather than object transforms. Attempting to transform both the object and it’s parent during animation will likely result in very incorrect results and be difficult to fix.