Face generation Bones or morphing?

Started by
4 comments, last by GhostDogStudio 13 years, 11 months ago
hello there, im thinking about having multiple characters in my game via deforming a base mesh. I believe this is usually achieved either through morph targets or bones. My engine already support both to an extent and both would need extra work. The question¡ Which is better, less cpu expensive, etc? Thanks

Chosker - Developer of Elium - Prison Escape

Advertisement
Do you want to generate different models or do you want to render them on the fly ?

If you want to render them on the fly, you could just have one or two morph targets which will be used in the vertex shader to calculate the final mesh.

I use a simple generation tool in my engine to do some model generation. First I create a base mesh and model some derivations of this base model, using the same bone and vertex structure(blender with morph targets). Then I do simple "blending" on a per bone level, similar to image blending.

I could post a screenshot if this technique is of interst for you.


what I want is to interpolate a single, pre-made and common (for all male characters) mesh into different facial features with sliders (ala Oblivion, lots of other games). either by morphing the mesh into modified versions of itself, or by using bones to deform it (applying an animation per deformation)

I'm not sure I fully understand your method. you seem to suggest using morph targets (only 1 or 2?) but then say you do some blending on a per-bone level.
Perhaps this is a more complicated method than the traditional ones?

Chosker - Developer of Elium - Prison Escape

Quote:Original post by zEROx
what I want is to interpolate a single, pre-made and common (for all male characters) mesh into different facial features with sliders (ala Oblivion, lots of other games). either by morphing the mesh into modified versions of itself, or by using bones to deform it (applying an animation per deformation)

I'm not sure I fully understand your method. you seem to suggest using morph targets (only 1 or 2?) but then say you do some blending on a per-bone level.
Perhaps this is a more complicated method than the traditional ones?


My method is basically morphing with more than 2 morph targets. But instead of morphing just between two version of the whole model, I morph depending on the according bones.

Think of an human model, one slender and one fat. With standard morphing you would have just one slider,let's say alpha [0..1], which will produce different model between slender and fat. The method I use, I can adjust the alpha slider for each bone. If I choose for the leg and feet bones an alpha value of 0 (slender) and for the body and arm part an alpha value of 1 (fat), a model with thin legs and fat arms will be generated.

This is not really complicated and you could use this for face bones too. Just remember, that the bones are not changing at all.

If you add an secondary bone set for face generation, including nose and ear bones, you can restrict your morphing to different face parts. Later on, once the generation has been finished, the secondary bone set is not needed any longer.
ah I understand now, then your method is per bone
your method isn't too far from what I was thinking with bones.
in my engine I can't blend the bone influence of an animation, I can only blend the influence of the whole animation into the character. I can however, turn bones off in an animation, so in the end if I have a set of animations where each has only 1 bone turned on, I'd get an effect similar to yours.
I guess I could code bone influence blending, but I didn't code the anim system and I'm barely a programmer :)

anyway, anyone here to defend the mesh morphing method?

Chosker - Developer of Elium - Prison Escape

I use morph targets although I've used both techniques in the past. I currently don't support non-uniform bone scaling which may be needed to get certain features to look right. Bone modification always seemed mushy to me (I guess due to multiple influences in an area...nfs). I find it tough to make certain characteristics look right since some expressions/features are driven by muscles rather than bones/cartilage. I can never really get the exact look I want with the bones. I've found it easier to represent those with morphs. With morphs, I build my targets precisely the way I want them to look (ex cheeks that puff out only along on the horizontal axis).

Performance was a basically wash for me. I can cook the morph data (when a level loads for example) when I'm done customizing so I don't incur a per-frame performance cost. I also mitigate some of the costs of vertex deformation by having a reduced number of total bones. You could support run-time morphs in a vertex shader by passing in the morph influences as constants and modifying position after the matrix palette has determined the vertex position.

Hope that helps.
www.ghostdogstudio.com4 out of 5 professional pirates prefer it over scurvy!

This topic is closed to new replies.

Advertisement