Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
3
Question by iya · Mar 15, 2014 at 07:52 PM · animationavatarskeletonclothing

Skinned meshes from separate files sharing the same skeleton instance

I'm very new to Unity but am an experienced game developer / animator, and I'm currently struggling to figure out the interface for making a rigged character with swappable clothing and animation sets.

The data structure I want is:

  • one file contain the rig / skin mesh

  • separate files for each animation / emote

  • separate files for each article of clothing

When I upload a rig file that contains all of the animations and all of the clothing, everything works great. You just drag that one prefab into the world (wearing everything at once) and delete the clothing you don't need. That all goes exactly as expected (yay!)

Sourcing animations from separate files also appears to work beautifully, and you can just pull them all into the same Animation Controller and you're off to the races.

The problems I'm running into are specifically with splitting the articles of clothing out into separate files. When I take the same file that works as one big bundle and export off clothing pieces into separate files, I can drag those individual pieces into the world as well. They can play animations and use the same animation controller. BUT I haven't figured out how to get them to share the same specific avatar instance ("Avatar" is Unity for "Skeleton", right?). If you set the clothing object's avatars to "copy from other" and target the body avatar, I would have expected that to work but it definitely does not.

How do you get two skinned objects to share the same skeleton instance?

Is it possible through the UI? From what I've seen so far I'm guessing that you have to do this in script, but I wanted to check before I go down that road.

Any insight anyone could give me on the right data setup for animated things wearing other animated things would be very much appreciated. Thanks!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image unityuser13 · Mar 24, 2015 at 02:27 AM 1
Share

Did you ever get this working ?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by whydoidoit · Mar 15, 2014 at 07:57 PM

On the skinned mesh renderer you need to set the root bone of the model, the rest of the bones have to be named the same of course.

You often import the part model with it's own copy of the rig and just delete that.

alt text


screenshot-2014-03-15-19.55.jpg (9.9 kB)
Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image iya · Mar 15, 2014 at 10:41 PM 0
Share

Thanks for your response!

Huh, I did mess around with that root bone, but it definitely did not behave as I'd expect. So if I drag the body mesh and the clothing mesh into the scene, they both automatically create their own skinned$$anonymous$$esh assets and their own Avatar assets (that have bones by the same names since they refer to the same skeleton in the source file.

When I go to select the root bone on the clothing element, I see two copies named "hips_bone", one from the body and one from the clothing item. If I change that to the other copy, it draws the bounds box around the body mesh rather than the clothing mesh, but it doesn't appear to change the animation at all.

You've used this setup in your own stuff and found that it works for you?

Thanks again for the response!

avatar image geo-p · Jul 09, 2014 at 10:18 AM 0
Share

Further to whydoidoit's answer, try telling each additional Skinned$$anonymous$$eshRenderer to use the same "bones" array using the line:

 mesh2.bones = mesh1.bones;

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

23 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to create avatar for Non Human Skeleton ? 1 Answer

Using Locomotion with different avatars 1 Answer

Modify humanoid skeleton at runtime and retarget animation 1 Answer

Add more bones to skeleton - vertebraes definition...? 0 Answers

How to animate a model that doesn't have arms or legs (just feet and hands) 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges