- Home /
Imported model gives error: "Transform.rotation is no longer valid"
I have a Blender model that I'm importing into Unity. It has a Bone that is giving me the error: "transform.rotation of X is no longer valid. Input rotation is [...]".
I don't see anything obviously wrong with the bone. I tried changing rotations to/from Quaternions on the Armature, no effect. Of course I have cleared all rotations, as well as recalculating bone role angles.
I have found a few references to invalid rotations on the forums. One answer suggested that the level of precision for the Quaternions wasn't high enough - but that was for a 3D motion tracker. :) I'm sure Blender has enough digits. Another answer... well, there was no answer - one poster sent the (broken) model to another person for a solution, and if they did find a solution, it wasn't posted to the thread. Which is the advantage of Answers, and why I'm posting the problem here - so the solution will be publicly available. Assuming, you know, someone does have a solution. :)
One thing that just occurred to me - is this actually a problem, or Unity fixing a problem? The second part of the error message is, "Input rotation is [...]" and some numbers that are very close to zero (or 1, like 1.0000002). Does this mean that Unity modified, as in normalized the rotation? Assuming it's close enough to the original Bone rotation, would my animations work correctly?
I usually try to fix warning messages in my code, on general principle - much less error messages. But if this message indicates that Unity applied a one-time fix to an incoming model, then I can live with it. :)
I assume that the first example you mentioned is this one: forum.unity3d.com/viewtopic.php?p=238822 As a Blender user, I don't think I have seen that error yet in my own use. So I don't have an answer for you. I will tell you, however, that Blender's floating point precision, co$$anonymous$$g into Unity, isn't good enough for other uses. For example, you will be able to see through corners, in Unity, even though they line up in Blender. (It's a jagged, inconsistent 1-pixel "line".) And integers, more often than not, come in with extra decimal garbage - which is the source of the corner problem.
So it's not a stretch to imagine the quaternions getting screwed up either. Unity won't deal with them not being normalized, in its eyes, so apparently the imprecision is an issue in this case. Is this just a warning message, though, that goes away when you clear the console? Is it actually having any effect on the skinning?
@Jessy - it doesn't appear to cause any problems that I can see. That's why I'm trying to find out if it really is a problem, and will cause some subtle difficulties further down the pipeline - or just a $$anonymous$$or warning.
Answer by Cyclops · Jun 07, 2010 at 06:07 PM
I'm answering this just to close the Question. I suspect it's just a glitchy warning message that I can ignore.
Answer by e-bonneville · Mar 20, 2010 at 02:54 PM
Have you tried baking the rotations in Blender, and exporting the updated file as an FBX to Unity? It's generally a good habit to form, as it prevents lots of wasted time trying to get models to rotate correctly. You can bake the rotation of a model by pressing space-bar, Transform, Clear/Apply, Apply Scale/Rotation to ObData.
@elbon96, I haven't tried baking - but I also cleared all rotations on the model. I suspect it's just a floating-point precision issue, and don't think the error matters. It would just be nice to confirm it doesn't matter. :)