Search Unity

Organize character with different pieces of clothing.

Discussion in 'Game Design' started by ghostwhisperer, Jan 4, 2022.

  1. ghostwhisperer

    ghostwhisperer

    Joined:
    Jan 15, 2021
    Posts:
    4
    Hi! And a Happy New Year!!
    I have found a lot of helpful tutorials over the past few months. Only one thing unfortunately not ..
    I would like to add different cloth to my character in the course of a game. I just can't find anything about how to organize it, especially because of the animations that need to be adjusted.
    Version a) Do I have to make x copies of my Char with the different looks and then later import them into Unity? I hope not..
    b) Does everything have to be in a Blender-File in one Collection and be fully animated here? I could imagine that you can then switch the clothes on / off depending on the situation (Visibility)
    c) Import Char as a separate file with basic equipment, import each additional item of clothing separately? At the moment I just don't know how to program "changing cloth" in Unity. Animation would be feasible in both programs I think
    Unfortunately I haven't found anything so far. What's the best way to organize this.
    Thank you for every little hint! Even if it's just a link ..

    Hello! ghosti
     
    beegeew likes this.
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Here's a good way to structure your problem space so you can formulate answers:

    1. What is the target hardware?
    2. What constraints? open world? aggressive LOD? How many are needed?
    3. What are you capable of doing? Are you an experienced modeller?
    4. How experienced are you at programming?

    The reason it matters so much to know your baseline platform is because it really does change the answers. A lot. That's why for most things, you'll find a lot of "conflicting" answers. But they're not really. They're people talking about what works for their specific requirements.

    Work out your requirements and the answer will be pretty simple.

    But it looks like if you have to ask this, you probably need it as simple as possible...
     
  3. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    this is a big question where an answer can only suggest a very general approach, but within that approach there is 10,000 steps you have to work out and a specific answer can't be given because it depends on too many factors.

    Assuming you have some semblance of a deadline (thus learning everything there is to know before finishing the project isn't reasonable), then I'd suggest to try to develop a pipeline for just swapping an entire body mesh and/or head mesh. (not to suggest this is what your final result must be, but if you figure pipeline for this simpler version first, it will help figure out specific kinks for your scenario)

    this article helped me get started:
    SkankerzeroModularCharacterSystem - polycount

    whether you export each mesh separate or together isn't really the big problem because that can go many ways easily. Whether or not you can share the same skeleton among characters will be decisive factor I think, so you'll want to understand how far you can push Unity's retargeting system, etc. Basically you need to know how much use you can get from a skeleton.

    Assuming this isn't mobile or VR, I think it is safe to focus most initial attention on developing an efficient workflow versus worry about performance. The big problem with this sort of system is the workload - even with just a handful of options for the player to choose from, you can be looking at weeks/months of grunt work to produce art content. So having an efficient assembly line for humans to produce the actual work is key.
     
    Last edited: Jan 5, 2022
  4. ghostwhisperer

    ghostwhisperer

    Joined:
    Jan 15, 2021
    Posts:
    4
    Sorry, I kept you waiting. First: I learned a lot about game-programming during the last year. Coding is not the point, i am also programmer at work. Not only c++. I just want to know if there are a few basic solutions which are special for games.
    I dont want to do things twice, so i ask before i start.. I already modelled some aliens in Blender. Actual I create space-suits there. I already programmed some basics in Unity, f.e. control and move the character, let him interact with the environment. But up to now its just a simple placeholder. I have not imported my human character jet.
    It will be more a simulation than a real game. Its "Fan-Art", i want to simulate the interiour of a space-ship from the Perry Rhodan - Franchise. So its a limited space not open world. For PC's. I want to use the space-suits with different modular subsystems. The char should get a rocket backpack when needed, other belts and helmets, etc. Everything clear ? ;) Thanks for answers!!
     
  5. BIGTIMEMASTER

    BIGTIMEMASTER

    Joined:
    Jun 1, 2017
    Posts:
    5,181
    I'd start by exporting the rigged character with all additional attachments as an fbx.

    Through script you simply show/hide the mesh renderer for different components.

    That is the simplest way to get things going. Additional complexity may be necessitated if you need a separate skeleton for different characters, or for workflow reasons you prefer to have the additional models as separate fbx files.
     
  6. ghostwhisperer

    ghostwhisperer

    Joined:
    Jan 15, 2021
    Posts:
    4
    Thanks a lot!
     
    BrandyStarbrite likes this.