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
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
Please log in or register to post a reply.
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
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.
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.
Thanks a bunch, I’m off to try this out.
Have a nice day.