CreatorsOk
colortwist
colortwist

patreon


Automatic morph mirroring in Houdini

This probably looks like the most trivial thing ever, but it's kinda not.

I've been working on this for the past day or so, mostly to try and cut my work in half when dealing with complicated character rigs that inevitably land up requiring dozens (or hundreds) of corrective morphs everywhere (this is pretty much unavoidable if you want a decent looking character when posed).

Normally you have to deal with the left side and right side of a character separately when it comes to 3D. You might have a morph called "L_breast_inflate_size_01", which inflates the left breast (and only the left breast, since there's no point doubling your work when sculpting up morphs)- but then what about the right side? Where does "R_breast_inflate_size_01" come from?

Well, if your body is symmetrical, then most 3D programs will give you some sort of function or tool you can use to mirror the morph over (assuming you have access to a clean version of the base mesh for reference). Unfortunately, this is usually a manual process, so it's something you have to handle yourself every time you update the left side (and want the right side to synchronize, or visa versa).

Surprisingly, Houdini doesn't have one of these tools out of the box... but it's pretty simple to build one in VEX. However, I wanted to take that a step further. Usually whenever you're mirroring morphs, you need access to the original (unmorphed) version of the mesh to generate reference information from so you can determine which points are morphed, then use that data to flip the morph deltas across the mirror axis and apply them to the other side of the model.

But what if you don't have access to a clean version of the mesh? Maybe it's just not practical to access at that particular point in the pipeline, or there's some other weird reason why you don't have access to the original polygons. What then? Can you still mirror a morph across a mesh while preserving the point order *without* having access to a clean reference?

Turns out you can, so long as *some* number of points overlap when you mirror one half of the model onto the other side. If you can figure that information out, then it's trivial to build a sort of "topology keystone" and- assuming your topology is symmetrical across either side (even though the points might not be in the same location due to the morph moving them around)- you can use the topology itself to determine where and how to flip the morph across the mesh.

Thus, it becomes possible to mirror mesh morphs in Houdini using only a single connection. That is exactly what the HDA (or "tool") in the screenshots is doing- if it only has access to the morph mesh itself, then it attempts to mirror the morph across the mesh using the topology in a semi intelligent manner. If it has access to the morph mesh and a reference mesh (so two wires connected to the node), then it'll try to use the standard VEX method of mirroring points instead (which is slightly faster, but might not work in all situations).

In either case, this completely removes the requirement to worry about one half of your entire model, which more or less halves the amount of work you have to do when creating morphs and other various corrective shapes. Technically it means character files might take a few more seconds to load since Houdini has to figure out all the mirrored morphs, but that's a small price to pay for not having to worry about an entire side of your character and whether or not all the morphs are synced up properly.

Screenshots are of the body morph from one of my older characters (left side only), mirrored via the HDA tool to the right side, and combined via a Blend Shape node. The forth screenshot is of the HDA node network itself. Only the left side was sculpted as a morph, since there's usually no point in embedding symmetry into the morphs when most 3D programs have some sort of a way to mirror morphs across the X axis and combine the left and right sides together.

Automatic morph mirroring in Houdini Automatic morph mirroring in Houdini Automatic morph mirroring in Houdini Automatic morph mirroring in Houdini

Comments

OK, that's super cool and obviously reduces potential workload a significant amount.

Dan

Nice! A good step forward!

nedanecin


More Models and Creators