Wednesday 2 July 2014

Animating with Mikoto – part 9

To use the spherical deformation method in Mikoto the name of the object containing the mesh to be deformed must begin with sdef:. Do not forget the colon :.

Unlike the bone deformation method, the spherical deformation method only works when anchor objects have been created to bind the vertices to the bones.

Change our skin mesh object’s name to “sdef:skin” and save the *.mqo.

Rename skin object sdef


If you load the model into Mikoto you will see that moving the bones will not move any parts of the skin mesh object because we have no anchors.

Moving bones in Mikoto has no effect without anchors

From studying umemori69’s diagrams it seems the difference between spherical deformation and bone deformation is that spherical deformation gives a more realistic deformation at the joints where two bones connect.

sdef bend
Spherical deformation
bdef bend
Bone deformation

To use spherical deformation with our model we need to create anchor objects to bind the vertices.

This will be difficult since our model is not in a T-pose with arms horizontal and legs apart or an A-pose with the arms angled out from the body and the legs apart.

This means vertices that need to be bound to very different bones such as those in the hands and hips are close to each other.

Rather than change the model in Metasequoia to a T-pose or A-pose though I will use complicated anchor object geometry to show how good Mikoto is at calculating which vertices are inside a volume.

Firstly I will change the materials of the bones so they are coloured and have an alpha lower than 1.00 to make the materials see through.

Change the properties of the bone materials

There is a Metasequoia plugin that can create anchors so first I will try that on my model to test the results.

Metasequoia plugins only work with registered versions of Metasequoia and I am using the translated plugin from the “Sword of Moonlight” forum.

The Make Anchor plugin *.dll is copied to the “Create” folder in Metasequoia’s “Plugin” folder. This means in Metasequoia you will find the command in the Object>Create menu.

Make Anchor command is in Object Create menu

Make sure the bone: object is the current object and all the triangles of the bone: object you wish to make an anchor for are selected and then click “MakeAnchor”.

In the popup dialog click on the name of the related skin mesh object in the list and click "OK".

Since I already created materials I leave that option unchecked in the dialog.

The plugin creates the following anchors.

Make Anchor plug in

I will not use those anchors but instead create my own.

I make simple box primitive anchors for the head, feet and lower leg meshes and position and scale them to fit.

Make sure to select the material of the bone when creating its anchor and create each anchor as a new object. You can merge the anchors into a single object if you wish later.

I think you will get incorrect rigging in Mikoto until all the anchors are finished.




For the other skin meshes I will create anchors by copying and pasting the skin meshes, filling in the holes with triangular faces and then scaling the copies slightly larger in all axes.

If you have Metasequoia 4 you can use the “Hole” command to fill up holes with one click.



Testing the rigging in Mikoto there is only a problem with the hands and inside of the upper legs.



To fix the hands I used the knife tool to add lines so I could reshape the anchor geometry to exclude any vertices of the upper legs.

Reshape hand anchor to exclude upper leg vertices

I then reshaped the upper leg anchor to exclude any vertices of the hand.

Reshape upper leg anchor to exclude hand vertices

The two vertices at the top inner upper legs were just too close to be included in different anchors so I had to change the skin mesh geometry by separating them slightly.

The rigged mesh works fine in Mikoto.

Rig works well in Mikoto

The rig also works with the Keynote animation plugin for Metasequoia except some vertices in the chest near the shoulder are moved with the upper arms.

Rig in Keynote


TR4LaraSDEF.zip


prev | next

No comments:

Post a Comment