-
-
Notifications
You must be signed in to change notification settings - Fork 23.8k
Add BoneTwistDisperser3D to propagate IK target's twist #113284
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
Conversation
1dd73f3 to
196e14d
Compare
2f6cee2 to
71accb8
Compare
a1f7ce0 to
860ddab
Compare
cda9745 to
51ca55c
Compare
|
There is request for a curve editor from @lyuma, so now it is implemented. Thereby, twist weight has been changed to twist amount without normalization. Also, it has been added to the documentation that the auto assigning amount except for DISPERSE_MODE_CUSTOM are monotonically increasing.
Whether twist_amount is read-only depends on the existence of the Curve resource. Can be considered the future follow up The horizontal axis of the curve currently represents the index rather than the bone length, but since this implementation is the same as SpringBoneSimulator3D, it could be improved as a follow-up in the future . The same applies to improvements for extracting twists greater than 180 degrees; this should be fixed at the same time as ConvertTransformModifier3D. |
9b846ad to
8fafdec
Compare
|
In a discord conversation we discussed the issue of order problem -- like pre-ik mnodifiers vs post-ik modifiers solving causing incorrect results. A resolution is to use documentation as a workaround by documenting placing the CopyConstraint and TwistDisperse before IK. If we ultimately need the tip to face the target, we can apply CopyConstraint again after IK. See #113284 (comment) demo. |
|
In practice, whether to apply IK before or after depends on the specific use case. For example, if you want to apply a Twist constraint to IK, For simpler cases, such as twisting tentacles or vines, using TwistDisperser after IK alone is sufficient. However, these are examples for combining with IK and are off-topic for discussions about the TwistDisperser API itself. TwistDisperser is purely a node that mathematically dissipates and distributes twist along a chain. |
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.
Reviewed the math on the twist.
Regarding the before and after of IK vs BoneTwistDisperser3D, a documentation solution was devised - see relevant comments above.
@lyuma is also reviewing.
Looks good to me.
439b36d to
ff6d086
Compare
|
Tweaked icon to reduced usage by removing unnecessary points. Appearance remains unchanged. |
lyuma
left a comment
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.
It looks correct.
There are some parts of the design that are unintuitive: notably, BoneTwistDisperser3D is difficult to use on many skeletons unless extend_end_bone is true, since otherwise you have to target a child of the target bone.
Also I found that it does not function as I would expect when targeting root_bone = Hips (due to Hips having a large origin relative to 0,0,0), but I'm not sure it's wrong, but rather this is mostly a documentation issue.
Example showing how it can be used for twisting the spine of a character when solving IK for a character's spine.

This comment was marked as off-topic.
This comment was marked as off-topic.
45adfcc to
7b9e621
Compare
7b9e621 to
6ff3833
Compare
|
Thanks! |



Add BoneTwistDisperser3D.
As commented in #110120 (comment), using BoneConstraints can provide a solution for propagating twist to the parent to some extent. However, in cases where the twist axis does not align with the XYZ basis, the solution is not as straightforward. Furthermore, since the canceled twist must be applied to the target itself, it is not easy to use for not advanced users.
This allows them to automate these processes by creating a chain. Of course, it can be used even without IK.
dp.mp4
ik_test_match_target.zip