Characters with different physical features or equipment

mstam 101 Aug 26, 2010 at 21:30

Hey people.

I’ve kind of run out of Google, not really sure what to specifically search for so I decided to write up a thread here.

I was wondering how one usually implements characters/avatars with different physical features and/or different equipment. An (what I’m guessing advanced) example of this would be when creating a sim in Sims 3 ( How do they support different physical features? Not just changing nose but also making the characters skinny/fat, tall/short, different hair and so on.

Blend shapes/morph targets? All I can find regarding this is facial expressions and animations.

I’m lost, and I’m hoping that you can kind of point me in the right direction.


3 Replies

Please log in or register to post a reply.

Reedbeta 167 Aug 26, 2010 at 22:16

Blend shapes would be my guess. I think the MakeHuman tool works that way; it has one master base mesh and then everything else is blend shapes. Anyway, it’s open source so it might be useful to study to see how it does various transformations.

For height changes you presumably apply an overall scale to the skeleton as well. For accessories or switching among hairstyles etc. it’s usually a simple matter of having many authored pieces of geometry that can be turned on and off. They’re all pre-skinned to the same skeleton so they’ll attach to the right spot.

TheNut 179 Aug 27, 2010 at 00:18

Yes, the common way is morph targets. You typically clone the base mesh, as Reed put it, and apply a different characteristic. There are some optimizations involved, but that’s the gist of it. You can then morph your base mesh to the target by altering the range from 0.0 to 1.0. In its basic mathematical form:

final.vertex = base.vertex + Sum, 0, i**
Note: You can optimize this by working only with the vertices you need to and also by precalculating the delta target values rather than working with the target mesh directly, thus eliminating a subtraction from the above.

Real-time implementations add morph targets rather than multiply them however, especially when there are many morph targets. The mathematical forumla above is an example of multiplicative blending, which is non-degenerative and slow (O(n)). With additive blending, you end up with the formula:

current.vertex += ((target.vertex - base.vertex) * delta)
- Where delta is the difference in target values. If your slider was at 0.5 and it moved to 0.6, the delta would be 0.1.
- Notice there is no summation here. It’s all done “on the fly”.

This is done for improved run-time performance (O(1)), but you risk quality issues when users recurrently alter character features that share vertices, often resulting in geometric goo (which I have seen in some games). To a smaller extent, floating point precision also plays a role, but can be virtually eliminated by using doubles. Some implementations fix this by linking targets so that advancing one feature may undo another, or several others. I’m sure you’ve seen some sliders retract as you advance another? Oblivion does this. It’s not a sure-fire solution, but often enough to help prevent such cases.

mstam 101 Aug 27, 2010 at 03:56

Thanks a bunch, I’m off to try this out.

Have a nice day.