Home | Portfolio | Resume | Technical | Scripts | Tutorials | Links | Contact |

> Mirrored Morph Targets

Here's a clever way to get functional mirrored morph targets. I found this method from here, and was very impressed by it, so I'm just going to regurgitate. We'll start with a little background info on the morpher first, just to get a better understanding why problems occur when mirroring morph targets.

Morpher has 2 golden rules to follow:

  1. Target must have exact number of vertices as its source
  2. Target must have exact vertex order as its source

Mirroring a target doesn't change the number of vertices, so it respects the 1st rule. However, the 2nd rule of vertex order is broken. Here's a quick example to illustrate my point. If I make a box in the viewport, and use the following line of code while selecting the vertex on the upper left corner:

getVertSelection $

The listener returns:

#{6}

Fig 1

Now mirroring the object and running the same line of code on the same vertex returns:

#{5}

Fig 2

The vert order isn't the same as before, breaking the 2nd rule. Now that we know why mirroring morph targets is a bad idea, here's a way to work around it:

As an example, I've made a quick scene with two boxes. The bottom box (now known as BoxA), has a morpher on its stack. The top box is used as a target for BoxA to morph into. So let's say you've finished all your morph targets for one side, (in this example, the right side), and you need to do the targets for the opposite side.

Fig 3

Make two copies of BoxA.

Fig 4

Mirror target01. If you scrub target01's morpher, it will morph from the other side, compared to BoxA. If you were playing around with the value, make sure it's put back to 0.0.

Fig 5

Now align target02 with target01, so their vertices match perfectly. Add a skin wrap to target02's modifier stack, and make it get wrapped to target01. Scrub up target01's value, and play around with the skin wrap settings so that target02's topology matches it as close as it can. Once that is done, collaspe target02's stack as an editable mesh. At this point, if you've got any more targets to you've wanted to mirror, you can just create a new copy from BoxA and repeat the steps. If not, target01 is no longer needed anymore, so it can be deleted out of the scene. Add target02 in BoxA's morpher, and now you've got yourself a working target. Target02 was never mirrored, so it respects both the 1st and 2nd morpher rules.

Fig 6

There are a bunch of scripts out there that actually go in the vertex sub-object level, and mirror the vertices. The skin wrap method has its advantages and disadvantages after comparing with these tools.

First of all, the mesh doesn't need to be symmetrical for this to work; it's just the matter of playing with the skin wrap settings. Secondly, I personally don't like the workflow with the mirror tools out there, and find them to be very error prone. The one disadvantage about this method is that you have to play around with the skin wrap settings to get accurate results. The problem with that is if there are a lot of targets to mirror, it could potentially be a longer process.