Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How do you manage hundreds of different armor/clothing pieces on a 3D character? (on the art side)

Discussion in 'General Discussion' started by davidrochin, Jul 20, 2023.

  1. davidrochin

    davidrochin

    Joined:
    Dec 17, 2015
    Posts:
    72
    I've been looking for ideas on how to manage all this mess for my game. Let's say I want to make a relatively simple character customization system:
    • You can change your character's face.
    • You can change your character's individual clothe pieces (pick top/bottom clothes and shoes)
    • You can change your character's hair style.
    I know how to make it work on the technical side, but I have no idea of what's a good workflow to follow when working on this from the art side. In my case I'm using Blender, but I could change my modeling program if it's necessary to improve my workflow.

    Things I've tried:

    1. Having a base .blend file for skeleton and skin. Doing different .blend files for different clothing sets and importing my skeleton and skin as a reference.

    Sounds great on practice. I was pretty excited at first when I heard about these Blender features. Once I tried, I was a little disappointed. The feature seems pretty limited and breaks often.
    • The skeleton is not extendable. Making a tail accessory that needs bones for physics? Too bad. It's impossible to enter edit mode on the referenced skeleton, thus you can't add any more bones.
    • Both Blender and Unity act very weirdly and sometimes break when you modify the base file. Sometimes the blend file would break. Sometimes Unity will refuse to re-import the new changes. Sometimes moving or renaming a single file will give you 2 hours of work of fixing broken references (that are not easy to fix for a beginner).
    2. Having every single piece of clothing/hair/accessory on a single .blend file.
    • Seems unmanageable if you're working on a team. How could different people be working on different clothing pieces if they are on the same file?
    • Using it in engine is not straightforward. Drag and drop this model into your scene, and you will have an abomination of a character using hundreds of clothes and hairstyles at the same time. This one is no big deal, but it's worth mentioning since it adds complexity of usage for designers.
    Is that it? Are these the only ways this can be managed? Do big companies that make games like this just pick one option and botch their way through their limitations?

    Any suggestions?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,066
    What about working in the character model. You start making a new piece (eg helmet) and when you are done, you export this piece to a separate blend file.

    As to tails, can these bones be separate from the skeleton? You would have a script that passes the current velocities to the attachment so it wiggles along appropriately.
     
  3. kdgalla

    kdgalla

    Joined:
    Mar 15, 2013
    Posts:
    4,581
    I occasionally dabble in this type of thing as well. As far as I know there is no way to accomplish what you want that is not a pain-in-the-behind and you've essentially identified the possible workflows already.
     
    davidrochin likes this.
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,492
    Big studios use custom tools for this, and "combined skeletons" is an EXTREMELY uncommon feature. At most you get physically-driven bones on characters.

    Note that in unity you can write AssetPostprocessor, which can be used to automate some tasks you'd want to be performed after model import. In theory this could be used to implement extra bones you mentioned, by making a script that'll look for something like a specifically named armature to merge in with the base skeleton.

    For multiple people working, the "base skeleton" is the way to go, but the thing is, it has to be done in such way that once developed, base skeleton is frozen, meaning it should probably be a copy and not a linked file.
     
    zombiegorilla and davidrochin like this.
  5. spiney199

    spiney199

    Joined:
    Feb 11, 2021
    Posts:
    7,292
    I think a lot of games just have all the bones always there on the rig, and are just not being used in a lot of cases. I know Oblivion, and I believe Skyrim, uses the one skeleton for all characters that has bones for a tail and ears, just the former is only used with Argonians and Kahjiit, and only Khajiit use the ear bones.

    Second Life is the same. Every avatar uses the same skeleton, which includes bones for tails, wings, a few other things from memory, and are just not being used sometimes depending on the avatar.

    I remember last time I played around with something like this, I would append (Shift-F1) the rig into the file, model the armour respective to the rig, doing weight paints too, etc. After exporting to Unity I would then need to use some editor-code to 'reskin' the model to the actual player rig as it were in Unity, so the mesh could be used on the various game objects with Skinned Mesh Renderer's for the player. That was a while ago though.
     
    davidrochin likes this.
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,026
    In all the games I have worked on this was the solution.

    Though, It is possible to modify the base skeleton later or have special one-off skeletons with extra bones as long as your "core" skeleton doesn't change. If you add a tail, for example, you could have that model use a different skeleton with a tail, or add a tail to the base as long as you don't change the names of the hierarchy so not to impact non-tail models. It just takes planning.

    In one of our games that had a lot of structurally different characters (Marvel universe game) we had a phenomenal rigger, who built what we called the uber-rig which had flippers and fingers, 2 extra arms, wings, hats, multiple hair things, belt things and capes, mult-hand weapons, and most of the key bones had variable lengths , all built into base rig and could be repurposed for most cases. It was very elegant, and made the animators very happy.
     
  7. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,492
    One thing that came to mind is that due to the way skinning works, it is technically possible to use skeleton for characters with slightly different proportions or bone positions. Meaning at some point you might alter base skeleton (which is a bad idea) and move a few bones around, but technically everything in the game will sorta continue working, as long as bone names match.

    So what matters most is bone topology.

    The uber-rig approach you described likely has been around since at least 2000s.
     
    zombiegorilla and davidrochin like this.
  8. angrypenguin

    angrypenguin

    Joined:
    Dec 29, 2011
    Posts:
    15,608
    Have you looked at how other companies do this stuff? My suggestions there are to look at modding workflows for games where modular clothing is a thing, and even systems such as Reallusion's character creation / clothing tools.

    I recall looking into one clothing workflow (I do not remember for which game - maybe an Elder Scrolls title?) where clothing is modeled in a "flattened" form, similar to if it were hung on a coat hanger, and when applied to a skinned mesh the engine would "expand" it to fit around the body, limbs, etc.

    But certainly, lock down whatever you can lock down. Even if you're relying on some level of automation for "fitting", the more variability you can remove from that the better you'll be able to iron out the kinks.
     
  9. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    the way i've set it up on art generation side is like this:

    To create new outfit / hairstyle / body style / accessories
    • Reference the rig file
    • import any other rigged models similar in shape
    • construct new model
    • bind new model to skeleton
    • copy paste weights from other model that is close in shape
    • touch up weights if needed
    Export depends if the programmer wants individual files or everything in one. It doesn't really change anything for the artist.

    I've done this in Maya. Not familiar in blender. To do it in maya I recommend free plugin NG skin tools for easy copy/paste skin weights, and Advanced Skeleton (not free) for easy standard and non-standard rig creation.