Home Technical Talk

in-game character customisation set-up

<somewordsofpraise> so, yeah... been reading this forum from-time-to-time, for answers to various problems I've stumbled upon, and often found answers without needing to ask. So keep it up everyone- you rock!</somewordsofpraise>

This time though I'm finding myself stuck with no solution that I'd be happy with.

I'm a character/technical artist in a small company, where we are currently developing a game that should have customisable avatars, the engine being used is OGRE.

This is the problem:

Surely, when you want to change lengths of limbs or reposition eyes in-game, doing this with morphs isn't enough, as the pivots of the bones need to relocate. So how do you create such customization options?

More specifically:
1) We want to use one wireframe for heads and modify it with morphs. We can still choose between a bone-based face rig or use morphs for both animations and customizations. But either way I can tell we will have problems when the head has been customized by morphing. What is the best solution for face animations then, and how can we keep it from getting messed up by the customisations?
2) How about changing lengths of limbs? We do not have the luxury of non-uniform bone scaling. Additionally how do we make sure that when changing length of legs, character becomes taller/shorter (rather than eg. legs penetrating the ground). We are using the biped as our rig atm, but could invest time into a custom rig if that turns out the way to go.

Really hope we get some ideas from you fine folk :)

Replies

  • SpeCter
    Options
    Offline / Send Message
    SpeCter polycounter lvl 14
    For question 2 i´m almost certain that if the pivot/origin is placed at the "floor" it´s going to scale up as in growing taller.
  • trafaret
    Options
    Offline / Send Message
    that's true, for scaling the whole skeleton,
    I was more thinking along the lines of scaling individual limbs. Say, only scaling the legs (in this case the pivots are at the top most part of the individual leg bones).

    Also problems with non-uniform scaling still persist (although we are trying different things, with various success, with a programmer, to combat this atm). There seems to be a problem with how OGRE likes to inherit bone scale to child bones, and actually if we suss out what is going on there we may be able to scale bones in one direction only... at least hope so :) any suggestions are much appreciated!
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    could you re-target animations to a different sized rig with an identical structure? XSI has this capability, not sure about other packages since i'm by no stretch an animator ;-(

    fx.: http://www.kxcad.net/softimage_xsi/Softimage_XSI_Documentation/mocap_RetargetingAnimationfromRigtoRig.htm
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    Aha ! My specialist subject.....

    Retargetting can be done in realtime but its difficult and expensive as involves a lot more than just rotating stuff. Basically you need ik and you need target positions for any node that's important eg. feet. its not too bad if skeletons share the same hierarchy but is a minefield if you're proposing a more general solution.

    For your morphs, 9 times out of 10it just works. simply apply a target or targets that changes the face shape and then run your normal targets on top
  • cptSwing
    Options
    Offline / Send Message
    cptSwing polycounter lvl 11
    didn't even know it could be done realtime / in-engine .. i assume the solution i posted above bakes the animation to the new rig, which is then exported and treated like any other animation by the engine?

    enlighten me, it's an interesting problem i couldn't really solve while working on a hl2 mod with a gazillion different characters a couple of years ago.
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    The system we used was based on a set of major nodes, feet, hands, pelvis, neck and head where anything in between is largely irrelevant. The system would play an animation file on these major nodes in an FK kind of fashion and while doing that would generate ik chains to drive the inbetween bits. on top of that it'd use more ik to force any tagged nodes into a specific position relative to whatever the animation file says ( eg, feet to floor, hand to lever etc.). It scaled everything according to the size of the skeleton as well so walk files would transfer from giants to dwarfs.

    In practice we found you could change the length of a bone by up to about 30% either way from whatever was defined in the animation data before stuff started to go very wrong visually - you could get around that by animating a skeleton that's closer to the shape of the targe skeleton though.

    There's a fair bit of setup required to produce content, including writing a format that supports the tagged nodes/footsteps etc. and a crap load of other stuff consider but that's the general gist

    bear in mind i didn't write it, im a mere techy artist, not a phd wielding developer with maths glands instead of gonads.

    in all honesty though, unless you were planning on flogging middleware i wouldn't bother, its much simpler to use biped or equivalent and just churn out a crapload of different animations for different skeletons
  • trafaret
    Options
    Offline / Send Message
    good ideas, thanks!
    poopipe wrote: »
    The system we used was based on a set of major ...
    That makes sense (but is definitely no small task ). We didn't even need to use ik in the game so far as there is not much moving around and only few specific interactions. We'll need to see if it is all worth it, i'll take that to our programmers to think about.
    But you may be right, if this all turns out like too much work that isn't worth it, sticking to just a few fixed body-shapes and different skeletons may just be the worthwhile compromise.
    poopipe wrote:
    For your morphs, 9 times out of 10it just works. simply apply a target or targets that changes the face shape and then run your normal targets on top
    So I take it that you'd advocate sticking with morphs for both facial animation and customization?
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    I certainly would - morphs are simple, cheap to render and generally pretty robust.


    If you've got thousands of heads to generate or you want millions of sliders for face customisation then it's well worth looking into using facegen - it handles shape changes more "correctly" than straight morphs do (although you're hard pushed to notice at the 2500 tris in a head level)

    The results don't have to look like the "facegen head" that was splattered all over fallout3/mass effect etc. either, you can do pretty much whatever you want with the base shape if you actually read the instructions ;)
  • trafaret
    Options
    Offline / Send Message
    great, morphs it is then, most likely

    So far I've dismissed facegen as a useful tool, precisely because all I'd seen made with it looked "blurry", lacking any strong facial features. That's not the look we are going for, avatar close-ups will be important. But perhaps it deserves a second chance :). I'll take a closer look at it, thanks
  • poopipe
    Options
    Offline / Send Message
    poopipe grand marshal polycounter
    The best description I've heard is that the heads all come out looking Russian :)

    The reason is that everything is based off a "mean" face which is naturally going to look blurry (and possibly a little russian).

    What people seem to miss is that having done all your setup (it takes a while) you can create a different shaped mean face to base all your variations on.
Sign In or Register to comment.