Characters with different physical features or equipment
Posted 26 August 2010 - 09:30 PM
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 (http://games.softped...m-Trailer_2.jpg). 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.
Posted 26 August 2010 - 10:16 PM
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.
Posted 27 August 2010 - 12:18 AM
final.vertex = base.vertex + [Sum, 0, i]((target[i].vertex - base.vertex) * factor[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.
Posted 27 August 2010 - 03:56 AM
Have a nice day.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users