Home Technical Talk

[Modular Character] Is there any solution to reuse armor over a range of body size?

polycounter lvl 6
Offline / Send Message
bitinn polycounter lvl 6
Hi all,

I know this sounds like tech art fantasy, but do you know of any games that manage to fit a single armor (let's say a chest-plate) into different body size?

One of our lead artist mentioned doing this: imagine you have characters goes from young to old, and their body proportion varies between 6-head to 8-head, and somehow we will like to make a chest-plate for an average 7-head base mesh, and use some magic to make it fit on all bodies.

Is it possible? Has it been done?

Most modular character system assume consistent body size, I just can't recall a game that looks semi-realistic and can somehow still avoid making armors for different body size.

If you have got any tips, let me know!

EDIT: And by the way this is not for background characters (aka random crowd), but rather the main character and key NPC, to enable player customization.

Replies

  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    There are many issues with overlaying armor but the size thing is imo just a scale. As the body proportions don't change that much (forget the head for the moment) I would just define a scale ratio which links body size and armor scale.

    Of course it's something else if you want to fit one armor plate on a slender young woman and an very bulky man. 

    If it is about re-using assets you might want to use some kind of morph targets.

    Overall I would say it can be done - to some extent.
    I have to admit I don't know of a game which does something similar.
  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    rollin said:
    There are many issues with overlaying armor but the size thing is imo just a scale. As the body proportions don't change that much (forget the head for the moment) I would just define a scale ratio which links body size and armor scale.

    Of course it's something else if you want to fit one armor plate on a slender young woman and an very bulky man. 

    If it is about re-using assets you might want to use some kind of morph targets.

    Overall I would say it can be done - to some extent.
    I have to admit I don't know of a game which does something similar.
    Thx a lot.

    I might have picked a bad example, because an armor would have given us more leeway, but imagine a star trek like space suit, that kind of tight-fitting clothing, I had a hard time imagine a good way around.

    We probably have to model by male/female body type, but then do we have to split by body proportion again? That's where I would like to hear some options other than modeling 6 times per clothing :)
  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    Also, it won't hurt if someone can point me to some literature that explain how we can use the same skeleton for different body type :)
  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    It turns out my best bet is no other than The Sims 4: they have a specialized deformation map system that can match clothing to a continuous body size. So a single cloth mesh to fit them all.

    https://www.gdcvault.com/play/1022085/Innovations-in-The-Sims-4
  • Alex_J
    Options
    Online / Send Message
    Alex_J grand marshal polycounter
    dunno if there is any technical info available but Dragons Dogma has pretty extreme morphs you could make on characters. would be interesting to study
  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    dunno if there is any technical info available but Dragons Dogma has pretty extreme morphs you could make on characters. would be interesting to study
    Not much tech info out there, but a GDC talk showing their internal pitch video:

    https://www.youtube.com/watch?v=3G5o3KhXv6w
  • pior
    Options
    Offline / Send Message
    pior grand marshal polycounter
    Another Capcom game to look at is SFV. Uses Unreal Engine 4 and all characters are driven by the same skeleton structure with different propotions. Also characters appearing as having different heights are actually just posed differently (Ryu and dictator are actually the same height). The mesh linking can be overridden through mods without even re-authoring the assets, there are dozens of video of character bodyswapping out there. No morphs involved, just live retargeting of skeletal assets.

    https://www.youtube.com/watch?v=JGyNWMlmNys
    https://www.youtube.com/watch?v=6s5Pni33g4Y

    UE4 can also scale bones at runtime. See Morphie's Law, it even uses the base epic mannequin.

    If I am not mistaken GTA San Andreas had the main character gain/lose weight based on eating and exercise.

    Besides that, morphs have basically been around since the PS2 days. Briefly worked on a sport MMO myself which used body morphs for fitness level, IIRC the source assets where standard, skinny and fat.

    Overall the difficulty is mostly about asset creation : how to create and maintain the variants, manually or automatically.

    "One of our lead artist mentioned doing this: imagine you have characters goes from young to old, and their body proportion varies between 6-head to 8-head, and somehow we will like to make a chest-plate for an average 7-head base mesh, and use some magic to make it fit on all bodies."

    Beware of "fake good ideas". Going from young to old sounds great in theory, but in actual practice this can look grotesque as there is more to human morphology than just scaling things up and down. Sounds like a big fat feature creep and waste of time waiting to happen imho :)

  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    > If I am not mistaken GTA San Andreas had the main character gain/lose weight based on eating and exercise.

    Yes and here is video for it:

    https://www.youtube.com/watch?v=_Qptx5AkbcA

    > Besides that, morphs have basically been around since the PS2 days. Briefly worked on a sport MMO myself which used body morphs for fitness level, IIRC the source assets where standard, skinny and fat.

    The Sims 4 talk argue that while morph target works, you will need a custom morph for every assets because they are topology dependent, and morphs are memory/storage intensive when you have so many of them.

    So they baked specialized displacement map for base mesh and use it to morph the clothing assets based on body size, and then use assets' own vertex color to interpolate how much the assets should follow body form (a tight gym vs long dress).

    Beware of "fake good ideas".

    Yeah my suggestion was to create category of humanoid type, not using some magic age indicators.
  • pasha_sevez
    Options
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    @bitinn Well, actually it is quite implementable. And I've worked on similar system for one project. The client wanted to make single cloth asset somehow automatically adapt / retarget to a number of different body types and constitutions (with the same topology). Although I've implemented it as Maya script (Python + Numpy), this can be achieved in engine as well, maybe not in realtime (but I'm not sure really, with good optimization - why not), but at some pre-process / loading stage, it doesn't take much time since the transformation can be "pre-cached". This technique is called RBF retargeting.

    In my case I've taken one cloth and sample body (left) and adapted it to a set of different body types (right) automatically. The cloth was multi-layered and very difficult to nearly impossible for manual fitting within any reasonable time frame.


    Also there've been examples of similar approaches by Hans Goddard (https://vimeo.com/166291982 check ~3m 30s), Chad Vernon (https://twitter.com/i/status/1114752700954992640) and others (https://vimeo.com/284146878).
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    @pasha_sevez
     So you did something a long the line of "storing a nearest body vertex delta transform which then is applied relatively" (thus requiring the same base mesh and vertex order) ?
  • pasha_sevez
    Options
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    @rollin
    Nope, wrap deformer works this way, the principle of RBF is more complicated and implies the use of some really big matrices.
    You can also check the blog of the author of last video above. 
    http://www.polygon.me/2017/12/rbf-based-bind-conversion.html
    http://www.polygon.me/2018/08/rbf-character-conversion.html
    and also this
    http://www.marcuskrautwurst.com/2017/12/rbf-node.html

    UPD: In short, if your source and target meshes has N vertices, this algorithm builds a Nx3 matrix which represents a linear space transformation / warping from source to target. If you multiply the matrix NxN representing your source mesh by this warp matrix, you will get the target mesh. And if apply it to any other mesh (MxN matrix), it will deform exactly the same way, conforming to the target body.

    P.S. Yep, it's a somewhat math-heavy stuff but it worth the efforts for sure.
  • rollin
    Options
    Offline / Send Message
    rollin polycounter
    thx, I'll check it out!
  • bitinn
    Options
    Offline / Send Message
    bitinn polycounter lvl 6
    @bitinn Well, actually it is quite implementable. And I've worked on similar system for one project. The client wanted to make single cloth asset somehow automatically adapt / retarget to a number of different body types and constitutions (with the same topology). Although I've implemented it as Maya script (Python + Numpy), this can be achieved in engine as well, maybe not in realtime (but I'm not sure really, with good optimization - why not), but at some pre-process / loading stage, it doesn't take much time since the transformation can be "pre-cached". This technique is called RBF retargeting.

    In my case I've taken one cloth and sample body (left) and adapted it to a set of different body types (right) automatically. The cloth was multi-layered and very difficult to nearly impossible for manual fitting within any reasonable time frame.


    Also there've been examples of similar approaches by Hans Goddard (https://vimeo.com/166291982 check ~3m 30s), Chad Vernon (https://twitter.com/i/status/1114752700954992640) and others (https://vimeo.com/284146878).
    Ah thx for the pointer, I am new to this so it's my first time hearing about RBF Solver related concepts. They look very promising, I see a few open source solution out there already. (Even for Blender? wow that's interesting, we have Hans Goddard to thank for pushing this tech into mainstream.)

    Curious: so we are using RBF Solver to retarget the equipment to whatever body size we prefer, right? After that, are we at a point we can re-target the binding for equipment as well? I see your second reply, people are retargeting binding for base mesh already, so it depends on if the precision is enough to retarget clothing such as your example?

    Again, new to this, so excuse my naive understanding :)

    https://www.youtube.com/watch?v=VyWCaE-YOwk
  • pasha_sevez
    Options
    Offline / Send Message
    pasha_sevez polycounter lvl 13
    bitinn said:
    Curious: so we are using RBF Solver to retarget the equipment to whatever body size we prefer, right? After that, are we at a point we can re-target the binding for equipment as well? I see your second reply, people are retargeting binding for base mesh already, so it depends on if the precision is enough to retarget clothing such as your example?
    Yes, you can retarget skeleton as well as the models of clothes. The retargeting accuracy depends on how well the target base mesh is made. You must keep it as close to source as possible in terms of geometry distribution and density. For example, if you want to make legs shorter, you can just grab feet, activate soft selection and move up, but it will make uneven geometry distribution on lower leg and cause any boots to be distorted exactly the same non-uniform way.
    Also the more detailed your base meshes are the more accurate the retargeting will be, though working with 25k verts base mesh requires about 30 gigabytes of memory for deformation matrix calculation ^__^. In order to keep memory usage reasonable you need to simplify the base meshes topology (not actual bodies, but the deforming meshes, think of it as a sorta LODs) but loose accuracy a bit too. So there’re some trade offs and caveats, but you can work it all out in order to get the decent results.

    P.S. The example with mGear is a bit different matter since this is just a joint rotation rbf for rigging, not mesh-based rbf.
Sign In or Register to comment.