export rig and controlls and animation to unity

export rig and controlls and animation to unity

Anonymous
Not applicable
3,913 Views
4 Replies
Message 1 of 5

export rig and controlls and animation to unity

Anonymous
Not applicable

Hi. I try to export my rig and animation to unity. If it possible I would like export also my controllers of bones. I attach screen with settings of export process and two links with animation gif: first with my animation and controllers in 3ds max: https://gph.is/g/E3Lgdzl and second with application of windows with view of what show out finally https://gph.is/g/ZkkNwwY  It made me stunned and desoriented. I dont know what i did wrong 😞 if is possible i want to export my controlls also and its second question, should i mark to export only my model with his bones or also his controllers?
Regards.
Please help me, this is small thing and did a big stagnation in my project :(((

0 Likes
3,914 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
 
[edit]

I actually just realize that Max give me one single reason for the issue: "One or more objects in the scene has local axes that are not perpendicular to each other (non-orthogonal). The FBX plug-in only supports orthogonal (or perpendicular) axes and will not correctly import or export any transformations that involve non-perpendicular local axes. This can create an inaccurate appearance with the affected objects" Then i tried to fixed it looking for solution for this single problem and I find also sth from this article
http://dev.wallworm.com/document/127/my_model_scale_is_wrong.html Rescaling a Skinned Model
Here are some steps to help you rescale your rigged model.
  1. Select the model with the Skin.
  2. Open the Skin Modifier in the Modify Tab.
  3. In the Advanced Parameters Rollout click the Save button.
  4. Save the skin weights of the model to a file on disk. Rembember the location.
  5. Delete the Skin modifer.
  6. In Utilities Tab, use Reset Xform Utility on Mesh.
  7. Select all the bones used by the rig.
  8. Click Animation > Bone Tools and choose Reset Scale.
  9. Select mesh again and add new Skin modifier.
  10. Re-apply all the original bones.
  11. In the Advanced tab of the skin modifier, click Load and find the file you saved above.
  12. Now re-export the model
 
But it doesn't work, it totally break my model and animation 😞 I share effect after this instructions below.
0 Likes
Message 3 of 5

ads_royje
Alumni
Alumni

Hi @Anonymous ,

 

this is probably because the Skin modifier has weighted vertices and the Save in Skin modifier saves Envelopes, not Skin weights.

 

I would do:
# in Skin modifier > Advanced Parameters > Always Deform 
# Set Always deform to Off. This disable Skin <-> Mesh binding.

# from the Utility panel, add Reset X-Form on the Mesh

# make sure to move the Reset x-form below Skin modifier in the stack.

# right-click on the Reset X-form > Collapse To
# The reset-x-form is collapsed and Skin is still there
# go back to Skin > Advanced Parameters > Always Deform
# Set Always deform back to On. This re-enables the Skin <-> Mesh binding using the updated mesh
# ready to export


This method just disables the Skin <-> Mesh binding while editing the mesh below the Skin without losing any Skin data. This can be done to edit the mesh vertices for fine tuning while not losing the Skin data.

Another method would be to make a copy of the Mesh (Tools > Snapshot)
This creates a new mesh in the scene that scale is 100%
Copy Skin modifier from the problematic mesh and Paste it to the copy. Toggle Off and back On the Always Deform in Skin modifier.
Make sure to delete old mesh and rename the new one like the old one (removing the *001 in the name)

Another method would be to save the Skin data using the Skin Utils in Utilities. Skin Utils will save and load the Skin Weights. Not needed for this current task but letting you know it exists and can save you lots of work. Another very powerful tool for Skin work. 

Let me know if this helps or not,
Regards,

0 Likes
Message 4 of 5

Anonymous
Not applicable

Hi! Thank you for youe answer! 🙂 Thats amazing that it is possibility of lots of solutions! Unfortunately it's rather not my case :< i tried your first method but now appeared also problem with: "The FBX file format cannot represent the transformation of some nodes in the scene due to the limitation of FBX SDK. To avoid this, adjust Bone binding matrices of the problematic Skins.
The following Bones will have incorrect Bone binding matrices under the associated Skins: "

 

and still I have "non--orthogonal" issues. They appear when I try to export mesh and bones, when I mark only mesh non-ortoghonal disapear and i have only problem with the first one. I tried the second also but it break my mesh strongly and it is worse 😞

And one more information: I had linked bones and shapes(as controls) variable, bone<---shape<---bone<---shape etc. as children and parents and i realize that whole animation was made on this shape controlls, sth like here in tut https://www.youtube.com/watch?v=2zd75MeBjkw&list=TL2iZLTDqltvs

I was wondering maybe this is the key to solution? :? But my team require of me animation and rig with some helpers, and i was seeing that many people using this way to creating animation and rig in 3dsmax. Do u know? Do u know maybe also the others ideas to solve this hard, **** problem? :? :<

when I create some easy deformations and rigging with only bones not shape controllers everything is fine... :?

 

 

0 Likes
Message 5 of 5

ads_royje
Alumni
Alumni

Hi again @Anonymous !

ha... sorry I though it was the skinned mesh that had scaling issues 😕

For the rig, make sure all of the rig bones and shapes do not have any Scale animation keys, this is important. If any, remove them.
The first step would be to verify the Scale value of all the Shapes that are in the Rig, start by the highest in the Hierarchy going down to their child, one by one. If any of the Shape do not have 100.0% scale on each axis, set the scale to 100.0%, you can use the transform type-in to do so. If the scale is far enough from 100.0% to alter the final size of the shape, use the Shape parameters to adjust them instead of the Scale.

If the Shape scale is set to 100.0%, now do the Bones.
Select all the Bones, and just the bones.
Open the Animation > Bone Tools (same as the first steps that you got)
With all bones selected in the Bone Tools >  Object Properties
Check Off Auto-Align and Freeze Length
Click the 3 buttons in this order: Reset Scale, Reset Stretch and Realign
Then toggle Bone On to Off and back On again. Doing so will re-enable the Auto-Align and Freeze Length.
A little example of doing so on a bone chain: https://autode.sk/39wuW4y

You can verify if all the bones now have a Scale of 100.0%. That should be the case.
The scale will most likely affect the Skinned mesh, in Skin modify, in Advanced Parameters, toggle Always Deform Off and On again to rebind Mesh <-> Skin with the corrected Scaled bones.

The Skinned Mesh and all the Bones & Shape should now have their Scale to 100.0% and ready to be exported without any non-orthographic scale warnings.

Let me know if this is clear enough and if helps or not.

0 Likes