-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Implement AnimationNodeSub2
to AnimationTree
and allow less or greater value in mathematical AnimationNode
#76616
Implement AnimationNodeSub2
to AnimationTree
and allow less or greater value in mathematical AnimationNode
#76616
Conversation
e3290f9
to
5502bc9
Compare
@@ -281,7 +281,7 @@ double AnimationNode::_blend_node(const StringName &p_subpath, const Vector<Stri | |||
if (r_max) { | |||
*r_max = 0; | |||
for (int i = 0; i < blend_count; i++) { | |||
*r_max = MAX(*r_max, blendw[i]); | |||
*r_max = MAX(*r_max, Math::abs(blendw[i])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
69db072
to
8964743
Compare
8964743
to
3002d46
Compare
AnimationNodeSub2
to AnimationTree
AnimationNodeSub2
to AnimationTree
and allow less or greater value in AnimationNodeAdd2/3
3002d46
to
8cb2536
Compare
I remembered that the extracted additive animations are useful for amplification and knockback by using outside the 0~1 range blending, so I allowed them in Add2/3. Godot.2023.05.25.-.15.36.24.02.mp4Also, for consistency, it is applied to Blend2/3 & Sub2. Their calculations are meaningful and can be used for quick blending with amplified or inverted animations like a video in #63369. |
AnimationNodeSub2
to AnimationTree
and allow less or greater value in AnimationNodeAdd2/3
AnimationNodeSub2
to AnimationTree
and allow less or greater value in mathematical AnimationNode
d5c6c5d
to
9673291
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not familiar with this engine area, so giving some natural language suggestions.
It fell just outside of the diff, but I also suggest changing every instance of "node" with "animation node" around this area.
2ed8c40
to
ead4886
Compare
ead4886
to
c9c8205
Compare
Fixed document tweak and rebased. |
Thanks! |
If you want to use NodeAdd2 to blend animation, the difference from rest will be added unless the animation of the
in
port is rest. Also see godotengine/godot-proposals#2700 and #76310 for more information.This can make the animation too exaggerated, so add a NodeSub2 to cancel the extra pose in advance and extract the delta animation. This improves the flexibility of NodeAdd2/Add3.
Test for calculation consistency. The following results are equivalent: