About Store Forum Documentation Contact



Post Reply 
Create character with multiple models
Author Message
Lancer Offline
Member

Post: #1
Create character with multiple models
Hey,

my question basically is like this one https://answers.unity.com/questions/3073...acter.html

I have multiple models with which I want to create one character.
How is that possible? Also, each model should be able to be replaced while playing.
01-09-2020 10:00 AM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #2
RE: Create character with multiple models
Yes check the tutorial, id add that you could have them in separated group ( up to 32 if memory serves ) and draw the one you want else you can manually split them up in EE editor
01-09-2020 10:01 PM
Find all posts by this user Quote this message in a reply
Lancer Offline
Member

Post: #3
RE: Create character with multiple models
(01-09-2020 06:01 PM)Zervox Wrote:  pretty sure armor rendering covers this part for you. smile

Apps -> 13 - Mesh -> Armor Rendering

you can also look at

Apps -> 13 - Mesh -> Mesh Part Draw Group

Armor rendering won't help, it requires a default body, which we dont have.
Mesh part won't help, because we need skeleton too from the models.

Basically, I have 3 models (head, upper-body & lower-body). How can I combine all 3 models, to make one character with skeleton so the animations will work.
01-09-2020 10:08 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: Create character with multiple models
You can either make a skeleton in a standalone 3rd party tool, Maya,Max,Blender.
Or in Esenthel, go to "Bones", "copy to memory", "paste/add from memory"
01-10-2020 04:05 AM
Find all posts by this user Quote this message in a reply
Lancer Offline
Member

Post: #5
RE: Create character with multiple models
Hi,

ok so I looked into the Mesh -> Armor Rendering Guide and I did the following.
Full skeleton on all meshes.
https://imgur.com/a/OfQvgjy

But the animation looks like this (hand and feet are messed)
https://streamable.com/l0hsd

Code:
Code:
void Create()
{
    // load mesh
    m_pMeshHair = ObjectPtr(UID(1801528809, 1161870081, 3205118884, 2355545589))->mesh();
    m_pMeshFace = ObjectPtr(UID(1687068418, 1162188778, 2232741537, 3426716227))->mesh();
    m_pMeshBody = ObjectPtr(UID(568460132, 1229789664, 3441282223, 1487839063))->mesh();
    m_pMeshHands = ObjectPtr(UID(4026311094, 1084774809, 3860310170, 4101844436))->mesh();
    m_pMeshFeet = ObjectPtr(UID(19292815, 1330452916, 3492163974, 3767608930))->mesh();

    // create skeleton
    m_skel.create(m_pMeshBody->skeleton());
}

UInt drawPrepare()
{
    if (m_pMeshFeet)m_pMeshFeet->draw(m_skel);
    if (m_pMeshHair)m_pMeshHair->draw(m_skel);
    if (m_pMeshFace)m_pMeshFace->draw(m_skel);
    if (m_pMeshBody)m_pMeshBody->draw(m_skel);
    if (m_pMeshHands)m_pMeshHands->draw(m_skel);

    return 0;
}

void Update()
{
    m_skel.updateBegin(); // begin update
    m_skel.clear();       // clear skeleton animation
    m_skel.animate(m_uidAnimation, Time.time()); // animate animation and current time position
    m_skel.updateMatrix(); // update skeleton animation matrixes
    m_skel.updateEnd(); // end update
}

What can I do?

https://streamable.com/l4xqa this happens, if I only put the feet to the animation file
02-11-2020 08:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: Create character with multiple models
They need to have the same skeleton.
And set "Body" for the all cloth/sub meshes to point to the main body mesh (with main skeleton).
Object Editor "Body" tab, then drag and drop main body object on the viewport.
02-12-2020 08:18 AM
Find all posts by this user Quote this message in a reply
Lancer Offline
Member

Post: #7
RE: Create character with multiple models
At main body I went to bones and "Copy to Memory" and at the body parts I set "replace from memory".
I also did "set body" on all body parts.
But this didn't change anything.
02-12-2020 12:07 PM
Find all posts by this user Quote this message in a reply
RedcrowProd Offline
Member

Post: #8
RE: Create character with multiple models
Bones needs to match animation as well theres def. Something set wrong in your files smile
02-12-2020 06:42 PM
Find all posts by this user Quote this message in a reply
Lancer Offline
Member

Post: #9
RE: Create character with multiple models
That's weird.

I have one .max file which has animation, head, body, hands and feet.
The animation works fine when I export all at once.
But I need all (head, body, hands and feet) seperate. So I exported them one by one.

I figured out, I made a mistake while exporting the models.
Now it works fine. Thanks
(This post was last modified: 02-12-2020 07:46 PM by Lancer.)
02-12-2020 07:27 PM
Find all posts by this user Quote this message in a reply
Post Reply