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
0
Question by Wolfjagger · Feb 07, 2015 at 01:46 AM · skinnedmeshrenderermatrix4x4skinning

Why is the bindposes matrix not immediately equal to the bone representation?

I am attempting to combine skinned mesh renderers into one object (seperate materials), preserving animation. I have seen several scripts and questions on how to do this and have cobbled together something of my own. I have been working on this for hours now, and I cannot get the model to not look like a praying mantis of sorts, even when I only use one skin and just try to reproduce it.

alt text

After narrowing out about everything else, I am getting perplexed by the bindposes matrix. Every script I have seen ends up with something like the line:

 listBindPoses.Add( bonesFinal[b].worldToLocalMatrix * bonesFinal[b].parent.localToWorldMatrix );

However, even directly after instantiating the object, the bindposes matrix of my skin does not equal bones.worldToLocal x bones.parent.localToWorld, or any combination of yida.worldToLocal x yada.localToWorld that I can find.

I would love some intuition as to why bindposes is not what I expect. Does it represent the bones in some model space which is not reflected in the bones themselves? If so, how do I account for this? Grab it at the start of the script and multiply it in later as an extra factor for the bindposes?

Code is attached; I didn't want to clutter the question, but if it could help others I would like it to do so.

prayingmantis.png (85.2 kB)
Comment
Add comment · Show 2
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 Wolfjagger · Feb 07, 2015 at 07:39 AM 0
Share

Ach, forgot the attachment.link text

skinnedmeshcombiner.txt (7.5 kB)
avatar image Wolfjagger · Feb 09, 2015 at 07:22 PM 0
Share

The model looks most normal when I ins$$anonymous$$d set the bindposes matrix to be:

 bindPoses = bone.worldToLocal$$anonymous$$atrix * originalSkinned$$anonymous$$eshRenderer.transform.localToWorld$$anonymous$$atrix;

Even then, the model is stretched and awkward. I am under the impression this works because of the close relationship between the gameObject the skinned$$anonymous$$eshRenderer came from and whatever object I should be using to get the local to world transformation.

0 Replies

· Add your reply
  • Sort: 

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

2 People are following this question.

avatar image avatar image

Related Questions

How to calculate nearest bones, weights and bindposes programmatically? 0 Answers

Problem with exporting skinning-data from 3ds Max to Unity 1 Answer

Help needed with combining skinned mesh bindposes 1 Answer

Changing mesh on SkinnedMeshRenderer causes deformation 1 Answer

Can we get skinnedMeshRender.bones in unity source after choose optimize game object? 0 Answers


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