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

CCDIKSolver: Add blendFactor support. #30415

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

anishwij
Copy link
Contributor

Description

Added ability to control IK influence through blend factors:

  • Global blendFactor in update() method
  • Per-chain blendFactor in updateOne() method
  • Default value of 1.0 maintains backward compatibility

Use Case
I was developing an animation + procedural animation system and needed smooth interpolation between animation clips and IK implementation. Since the overrides happen in the CCDIKSolver, modifying it to support blending was necessary.

Usage Example

ikSolver.updateOne(indexFingerIk, indexBlend) // Control single IK chain
ikSolver.update(globalBlend) // Control all IK chains globally
CS_009266.2025-01.mp4

Alternative Approaches Considered

ikSolver.blendOne(ik, factor)
ikSolver[0].setBlendFactor() // target specific link
// or

const iks = [{
   target: 4,
   effector: 3,
   links: [{...}]
   iterations: 10,
   blendFactor: 1 // default blend factor
}]

Added ability to control IK influence through blend factors:
- Global blendFactor in update() method
- Per-chain blendFactor in updateOne() method
- Default value of 1.0 maintains backward compatibility
@Mugen87 Mugen87 added this to the r174 milestone Jan 31, 2025
@Mugen87 Mugen87 changed the title Add blendFactor support to CCDIKSolver CCDIKSolver: Add blendFactor support. Jan 31, 2025
@Mugen87 Mugen87 merged commit 88062ed into mrdoob:dev Jan 31, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants