From Clo3D to Hubs using Blender  - Preparing the Avatar or Mannequin using an Armature
This article walks you through the process of optimizing Clo 3D cloth simulations for usage in Hubs using Blender
Featured

From Clo3D to Hubs using Blender - Preparing the Avatar or Mannequin using an Armature

While a cloth simulation needs to be stored as a mesh-based animation, that would be overkill for the underlying character model. For the mannequin, a skeleton based approach is saving lots of space and thus bandwidth. To get this kind of animation into Blender, use the FBX format to export the avatar from Clo 3D.

When imported into Blender, the character should show up with an armature, but the animation might not neccessarily match. In case there are issues, go to the animation workspace to investigate. Make sure you have the armature selected and that the editor space at the bottom of the workspace, the Dope Sheet area, is set to Acion Editor.

Animation Workspace in Blender with Action Editor
Change the editor type of the area at the bottom of the Animation Workspace to Action Editor.

Depending on how many animation strips you have used in Cro 3D, there can be multiple actions available now. Most likely there is a main action and a kind of intro action that works as a transition from A-pose to the first frame of the main action. In the middle of the header of the Action Editor there is a drop down to select the current action. Select the one that corresponds to the movement of the imported cloth.

The animation might not start on the correct frame and might even play at the wrong speed. This is something we are going to fix in the Nonlinear Animation Editor or in short NLA. As a preparation, click on the botton that reads Push Down in the header of the Action Editor.

Blender Action Editor Push Down
Push Down will move the animation from the Action Editor to the NLA.

Next change the area type from Dope Sheet to Nonlinear Animation.

Action Editor to NLA
The NLA has an own editor type.

In the NLA you should see at least one animation strip by now. The animation of the cloth should also be there. On the left there is a tree-like view of the available actions where you can make the other actions show up as strips by clicking on the small arrow at the very left of each layer. In our example there are two animations, one on the avatar and one on the cloth. So there are two strips. You can move the strips around by clicking and dragging.

Sometimes the speed of the animations does not match up. A common mistake is that the animations have been exported at different frame rates, for example one with 25 frames per second (FPS) and the other one with 30 FPS. In our example this is the case. We can sync the animations up again by changing the speed of one of them and that should be the armature based animation of the avatar because the mesh based animation of the cloth consists of one shape key per frame turned on for exactly one frame while the animation on the bones of the avatar can interpolate a lot better.

NLA in Blender with Playback Scale highlighted
The speed of an animation strip can be changed using the playback scale setting in the strip properties.

One way to match the animation speed is to use the shortcut key S to scale the strips but there is the precise alternative of changing the Playback Scale of a strip. You can find that property in the sidebar to the right, which you can open using the shortcut key N in case it is closed, in the sub-panel Action Clip. As usual in Blender, you can use the input field as a calculator. In our case typing 30/25 did the trick of prolonging the clip to match the 25fps animation of the cloth.

Congratulations, now you can export the character including the cloth to Hubs, but beware that when you want to control the animation using components or behaviour graphs that you need to synchronize the two actions.

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.