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
1
Question by Nicolas 1 · Oct 12, 2010 at 06:06 PM · rotationcharacterexportscalingcustomization

Character Customization demo - Problem with scaling and rotation

I'm trying to export from 3DSMax a new character to be used within the Character Customization demo (Dressing Room).

I'm using the same naming convention than the demo and it partially work.

My problem is that after running the scripts, the scaling of my models and rotation are lost somewhere in the process. I can force back the good rotation of my export in the scripts after the "CombineMesh" method, but forcing the scale does not seem's to work (scaling is 1 instead of 0.01).

In the original Max scene, the unit is actually in cm (and it's in meters in the engine).

Note1 : If I instanciate directly my object from the project to the hierarchy (drag to the scene), the scaling and rotation are perfect.

Note2 : An error is broadcasted into the engine while playing : "Number of bind poses doesn't match number of bones in skinned mesh". Could be related. The artist I am working with is trying to fix this error in the original Max scene.

Any help will be welcomed,

Nicolas

Comment
Add comment
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

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Nicolas 1 · Oct 14, 2010 at 06:06 PM

Partial solution :

I found the scaling issue : there was a texture with a name mistmatching the matching mesh name section.

I did not receive any error message while starting the game and it was impossible to scale the combined mesh as a result of the texture name mismatch. I found the error after looking at the final combined mesh and seing that there was a transparent section at the mesh position.

I still have an issue with rotation, so I modified the code in CharacterGenerator.cs to copy the original rotation transform and apply it back to the combined mesh.

// Obtain and configure the SkinnedMeshRenderer attached to

// the character base.

SkinnedMeshRenderer r = root.GetComponent<SkinnedMeshRenderer>();

r.sharedMesh = new Mesh();
r.sharedMesh.CombineMeshes(combineInstances.ToArray(), false, false ); r.bones = bones.ToArray(); r.materials = materials.ToArray();

// New : Re-apply the rotation from the original model // that you can get from any characterelement used. r.transform.rotation = qRotation;

Nicolas

Comment
Add comment · Show 1 · 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 Nicolas 1 · Oct 15, 2010 at 09:55 PM 0
Share

Finally for wahtever reason, the scaling issue re-appeared in the scene, so it might be something else.

I'm suspecting the error :

"Number of bind poses doesn't match number of bones in skinned mesh". to be related with this issue.

avatar image
0

Answer by Loius · Oct 31, 2010 at 03:54 PM

"Number of bind poses doesn't match" means your instanced object needs to be destroyed and re-created. It no longer has the exact set of bones required by the animated mesh. It sucks, but it happens every time the bone layout changes in an external program - all in-game instances have to be recreated.

Comment
Add comment · 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

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

No one has followed this question yet.

Related Questions

3DMAX export FBX file, rotation always error 6 Answers

Advanced character customization 6 Answers

Understanding a Character 1 Answer

Character Creator: changeing the Mesh. 1 Answer

Character Rotation - Script not functioning correctly 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