Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AnimationPlayer 3D Transfrom Track Rotation ask for normalized tranform for rotation #738

Open
danilw opened this issue Apr 20, 2020 · 14 comments

Comments

@danilw
Copy link

danilw commented Apr 20, 2020

Describe the project you are working on:
3D animated character

Describe the problem or limitation you are having in your project:
Creating new 3D Transfrom Track in Godot AnimationPlayer, setting rotation is not usable for hand-editing, when it presented in GUI.

Rotation ask for normalized Quat, it make impossible to edit it in GUI.
if set not normalized Quat (as for example, someone may expect it rotation by Rad-s) result it error

 The end quaternion must be normalized.
 The start quaternion must be normalized.

from docs class-animation
int transform_track_insert_key ( int track_idx, float time, Vector3 location, Quat rotation, Vector3 scale )

Describe the feature / enhancement and how it helps to overcome the problem or limitation:
I ask to make in animation 3D Transfrom Track-editing GUI Rotation by angles or rad, to make it useful for hand-editing.

@Yosimitso
Copy link

this issue still exists in 3.4.4

for the moment the solution is to add the property track rotation_degrees instead of a 3d transform track

@Calinou
Copy link
Member

Calinou commented May 18, 2022

This is resolved in 4.0 thanks to the new dedicated 3D position/rotation/scale tracks, but this can't be backported to 3.x for compatibility reasons.

@rcjoel2019
Copy link

So what i have to do in order to rotate a bone? They don't have the rotation_degrees property. It can't be backported to 3.x, but a change to GUI with euler angles that translate to quaternions in the backend would be nice, since 4.0 may take some time to a stable release

@danilw
Copy link
Author

danilw commented Jul 6, 2022

So what i have to do in order to rotate a bone? They don't have the rotation_degrees property.

in Godot 3 do it from code, that the answer

@Rulend
Copy link

Rulend commented Nov 27, 2022

Bones rotations are still quaternions in 4.0 beta 6, making it not possible to just adjust one axis at a time since the w component isn't calculated automatically. I'm guessing the non-normalized quaternions are also the reason for no interpolation happening between bone animations created inside the animation editor.

@oktopusgames
Copy link

"contains unnormalized quaternion key"... 4.1 version
When rotating the imported mesh skeleton in animation player

@federicoAntosiano
Copy link

Same issue on Godot 4.1.1.
I tried everything but nothing happened. The only solution I found is doing it via GDScript, but I think that this issue must be resolved...

@MeanBeanMachine2024
Copy link

Tried it in 4.1.2 and 4.2 beta 2 and it's still happening. that's actually a big problem.
that makes animating bones in-engine basically impossible.

@MeanBeanMachine2024
Copy link

Okay I may have found a fix. apparently if you animate with the temporary euler instead on the normal rotations the error doesn't go off anymore and the animation playback works fine

I looked it up and apparently a "normalized quaternion" just uses X Y Z, while the normal rotation tools use XYZ and W, which I am guessing the animation player doesn't like for some reason

@MeanBeanMachine2024
Copy link

Okay found a much better, more reliable fix! apparently if you just use edit mode to rotate bones it will work fine
Screenshot 2023-10-22 172100

@GeekzGamingz
Copy link

Also make sure you have at least one frame in each animation or you'll get the same error.

@luiscesjr
Copy link

luiscesjr commented Mar 25, 2024

I also have this quaternion issue, on 4.2.1 as well. And none of the tricks or workarounds really work for me. I have at least one frame on each animation, use edit mode for rotations, etc. Still broken

It's a shame really, this tool is very powerful for us animating, hope it gets sorted out soon.

image

@mortcodesweb
Copy link

Any work arounds found for 4.2+?

@danilw
Copy link
Author

danilw commented Apr 19, 2024

To both messages above:

Any work arounds found for 4.2+?

Source of this error - not normalized quaternion.
I saw this error in some 3d-old-assets models, but fix to it was just - open in Blender and export again.

Second reason - when you do some "animation-rotation" in code and not normalize your transforms - so fix it in your code.

Also as "junk fix" that no one should use - make gdscript and load all animation keys at startup and normalize them and update back to animation. But just reexport model in Blender if this is the case.

Putting normalize on every transform from Godot side - will be huge overhead.

My original message was about - having useful UI to edit transform and not typing "normalized rotation" that is impossible to do in UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests