A 3D model can contain animations: a door that opens, a lid that lifts, a folding chair that folds. With 3D Premium you can play them in the configurator. An animation can run when the customer switches to a camera view, or when they click a hotspot.
The animations themselves are made in your 3D software and exported inside the model file. The configurator plays them. It can't create or edit them.
How it fits together
Two pieces are involved:
- An animation controller, a 3D item that says what plays: which clips, from which model, and how they loop.
- A trigger, which says when it plays and what to do: play, stop, pause, resume or reverse. Triggers are set on camera views and on hotspots, and they point at an animation controller.
One controller can be used by any number of triggers. For example, one camera view can Play the "doors open" controller when the customer enters it, and Reverse it when they leave.
Preparing the model
- Export the animations with the model. In Blender's glTF exporter, keep Animation enabled. Each action becomes a named clip in the file.
- Name your clips. Clips are chosen by name in the configurator, so
Door_Openis much easier to work with thanAction.003. - Make one clip per movement you want to control. One clip that opens both doors can only be played as one piece. To open them separately, export two clips.
After uploading the model, check that its clips show up in an animation controller's Clip list. If the list is empty, the file has no named animations.
Adding an animation controller
- Open 3D Objects and press Add 3D item.
- Under Animation, choose Animation controller.
- Give it a Label. Triggers list controllers by this name, so describe the movement: Doors open, Lid lift.
- Under Animation clips, add a row for each clip that should play:
- Target object: the model that contains the clip. Only models with animations are listed.
- Clip: the animation to play.
- Loop mode: Once, Repeat (loops forever), or Ping pong (plays forwards then backwards, forever).
- Clamp when finished: on by default. The model stays on the last frame when a Once animation ends. Turn it off and the model snaps back to its first frame.
- Save the configurator.
All the clips in one controller play together. Use several rows to open both doors at once, or to play a movement across two models.
Screenshot needed: an animation controller in the 3D Objects details panel with two Animation clips rows filled in.
If you see No animated 3D objects available, none of the product's models contain animations.
Triggering it
When the customer switches view
Each camera view can run animations when the customer arrives on it, and when they leave it.
- Open the Views section of the configurator and select the view.
- In its 3D group, add rows to Animation triggers (enter angle) or Animation triggers (leave angle).
- For each row, pick the Animation object (the controller) and the Command.
Screenshot needed: a view's settings with the 3D group open, showing an enter trigger and a leave trigger.
The enter triggers of the view the product opens on also run when the configurator first loads. To have the product start in its open state, set a Play trigger on the default view.
When the customer clicks a hotspot
Add a Play animation action to the hotspot's Click actions, and pick the controller and the command. See Hotspots.
When the customer selects a choice or opens a layer
There is no animation setting on choices or layers. To tie an animation to a selection, combine two features:
- Set a view's enter trigger to play the animation.
- Use the automatic view switch on the choice or layer to switch to that view. See Setting up different angles.
Selecting the choice then moves the camera to the view, and the animation plays.
Commands
| Command | What it does |
|---|---|
| Play | Plays the clips from the start, using the controller's loop mode. |
| Stop | Stops the clips and returns the model to its pose before they played. |
| Pause | Freezes the clips where they are. |
| Resume | Continues paused clips from where they stopped. |
| Reverse | Plays the clips backwards, always starting from their last frame. |
Play and Reverse make a matching pair for anything that opens and closes. Set the controller to Once with Clamp when finished on, Play it to open, and Reverse it to close.
Because Reverse always starts from the last frame, reversing a clip that hasn't finished playing makes it jump to the end first. Give a view enough time to finish its opening animation, or keep clips short.
Things to know
- Lazy-loaded models are loaded when needed. If a trigger plays a clip from a model set to Loading: Lazy, the model is loaded first, and then the clip plays.
- Repeated copies aren't animated. On a model repeated by a layout, animations play on the first copy only.
- Don't move an animated object with placement. Move the group that contains it instead. See Positions, anchors and layouts.
- The admin preview doesn't play animations. Check them on the product page.
- Hotspots can lag behind a moving part. Hotspot positions are updated when the camera moves, not on every frame of an animation. A hotspot attached to an animated part catches up as soon as the customer rotates the view.
If something looks wrong
- The Clip list is empty: the selected model has no named animations. Re-export it with animations included.
- A clip shows as "(missing)": the model was replaced, and the new file has no clip with that name. Pick the clip again, or restore its name in your 3D software.
- Nothing happens when the view changes: check that the trigger is on the right view, in the right list (enter or leave), and points at the right controller.
- The animation snaps back when it ends: turn Clamp when finished on.
For developers
Custom commands and trigger types can be registered from JavaScript. See 3D Premium hooks.