Skip to content

Add Deterministic option to IterateIK3D#112524

Merged
Repiteo merged 1 commit into
godotengine:masterfrom
TokageItLab:deterministic-ik
Nov 18, 2025
Merged

Add Deterministic option to IterateIK3D#112524
Repiteo merged 1 commit into
godotengine:masterfrom
TokageItLab:deterministic-ik

Conversation

@TokageItLab

Copy link
Copy Markdown
Member

If deterministic option is true, the previous frame's result is discarded. At this point, the new result is calculated from the bone pose excluding the IterateIK3D as the initial state. This means the result will be always equal as long as the target position and the previous bone pose are the same. However, if angular_delta_limit and max_iterations are set too small, the end bone of the chain will never reach the target.

Setting deterministic option is true and angular_delta_limit to 180 degrees will produce the same results as the old SkeletonIK in FABRIK.

Deterministic FABRIK3D:
image

Old SkeletonIK3D:
image

(As I mentioned in #110120 (comment), the handling of Tips differs)

@TokageItLab TokageItLab requested a review from a team as a code owner November 7, 2025 22:02
@TokageItLab TokageItLab requested a review from a team November 7, 2025 22:02
@TokageItLab TokageItLab requested review from a team as code owners November 7, 2025 22:02
@TokageItLab TokageItLab moved this to Ready for review in Animation Team Issue Triage Nov 7, 2025
@TokageItLab TokageItLab added this to the 4.6 milestone Nov 7, 2025
@TokageItLab TokageItLab changed the title Add Deterministic option to IK Add Deterministic option to IterateIK3D Nov 8, 2025

@fire fire left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the enhancement a little.

Comment thread editor/scene/3d/gizmos/chain_ik_3d_gizmo_plugin.cpp

@lyuma lyuma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is stacked and depends on the BoneExpander3D change that I haven't reviewed yet. I reviewed the second commit, and it seems simple, basically resetting the chain settings every frame.

@lyuma lyuma left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in meeting

@TokageItLab TokageItLab moved this from Ready for review to Approved, Waiting for Production in Animation Team Issue Triage Nov 14, 2025

@Repiteo Repiteo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like legacy doc changes were left in. These'll need to be removed first

Comment thread doc/classes/Skeleton3D.xml Outdated
Comment thread doc/classes/Skeleton3D.xml Outdated
@Repiteo

Repiteo commented Nov 17, 2025

Copy link
Copy Markdown
Contributor

Just needs a rebase stripping the first commit now that #111815 is merged

@Repiteo Repiteo merged commit 131ba00 into godotengine:master Nov 18, 2025
20 checks passed
@github-project-automation github-project-automation Bot moved this from Approved, Waiting for Production to Done in Animation Team Issue Triage Nov 18, 2025
@Repiteo

Repiteo commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

Thanks!

@TokageItLab TokageItLab deleted the deterministic-ik branch June 26, 2026 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants