- Home /
scaling bone animation of salamander tongue looks fine in max but breaks in unity
I did the tongue animation of the salamander in max with CAT and a tail bones by scaling the base and then rotating it, it looks fine in max but in unity it breaks. This short video explains it better. https://www.youtube.com/watch?v=PKL7GM2Rswc&feature=youtu.be Is it wrong how i did this? What's the correct way to do this so that it works in unity? What can i do to get it to work as it is?
Answer by theANMATOR2b · Feb 10, 2017 at 08:29 PM
Bones scaled in Unity propagate down the bone chain. So if bone C is parented to bone B and bone B is parented to bone A, and bone A is scaled - the scale factor will be propagated and (I think) multiplied down the bone chain to bone B and bone C.
There are two methods to create Unity acceptable bone scale in Max that I know of. Both of which are involved so I won't go into them extensively, but I will list them and allow you to perform your own research.
Look at, parent and orientation constraint setup with dummy helpers, so each bone is not a child of (the parent) bone. Essentially this creates a bone chain (bone, dummy, bone, dummy, bone, etc) that each bone does not have a parent but is position/orientation constrained to the previous dummy helper object. the dummy objects are also constrained to the previous bones, and upon export these dummies are not included in the export. This setup takes iteration to get setup and working correctly.
I can't remember what this setup is called, Bone Squash & Stretch basically. But from my research it only works with 1 bone, so it probably would not work for your tongue setup. Essentially you create a bone chain and allow the bone chain to be scale-able (squash and stretch). This is the process, explained by BadSeedGames on youtube https://www.youtube.com/watch?v=TCEedebgZ1U
? A thread from reddit I have not seen before - but directly related to your question. https://www.reddit.com/r/Unity3D/comments/2cictk/disinheriting_scale_values_for_a_stretchybone/
Hope this helps - it is something I wish was a little easier to accomplish - would greatly increase the quality of game animations in Unity.
Thank you for answering, the thing is while i think i'm decent in modeling among other things in max but i'm kinda new to animation and i have only used CAT and i haven't really learned to use constraints and scripts in max and stuff like that and i work with the ones cat automatically creates. I get the feeling this would not work with CAT and i would have to use normal bones, or do you think can i modify the CAT rig and use your first method? It's a pity because i think this would break the tail bone cat has which is very useful when animation this type of movement. Thanks for your help, i'm going to research this more but probably later because i have a deadline soon and i don't want to waste time trying to solve this with the limited technical skills i have at the moment haha and it's going to tame me some time to learn to get it to work correctly. Do you know if any other animation programs handle this stuff better like maya or blender and it works in unity?
Thanks B$$anonymous$$. I couldn't reply to above question.
haven't really learned to use constraints and scripts in max and stuff like that and i work with the ones cat automatically creates.* This isn't a difficult hurdle to overcome. Just spend 2-4 hours researching the constraints and animation controllers I mentioned.
would have to use normal bones, or do you think can i modify the CAT rig and use your first method?* CAT and biped both can be extended with normal bones without issue. CAT has extra bones and so does biped, however when authoring for a different environment like a game engine, sometimes regular bones are easier to work with, because they do not have the constraints/limitations extra bones have within a rigging system like CAT or biped.
Do you know if any other animation programs handle this stuff better like maya or blender and it works in unity? This is entirely dependent upon your comfort level with those packages. Advanced rigging in ALL software is iterative and not something everybody exceeds at.
The only limitation of any 3D software package is the artists knowledge/ability limitation.
We can actually get away with a lot when creating in 3D software packages - that just don't work directly when importing into a game engine.
But with extra research, planning and iteration, most anything the artist wants to create in 3D can be accomplished in engine, it just takes time to solve, and iterate on.
Thanks for answering again, you have been a huge help.