Example of how to use CCDIkSolver with a generic SkinnedMesh?

Hello,

Did anyone manage to use the CCDIkSolver from three.js with a generic SkinnedMesh(so not just with the MMD loader)?

I tried to ask on github but they swiftly kicked me out.

For good reasons. As stated in the guidelines, github is NOT for help requests.

CCDIKSolver was exclusively developed for MMDLoader. It might be easier to start with this project:

1 Like

Hi, thanks.
Yes, I switched to that.
Too bad, I think CCDIKSolver had great potential…

I had the same problem. I would like to use GlTF model and CCD IK.
Do you have any idea?

THREE.IK is the safest bet but it’s in early development and in the end I couldn’t use it because it’s too barebones. Honestly, if you can still switch, you should go for Babylon.js which has IK integrated in the engine itself, see this: https://www.babylonjs-playground.com/#1EVNNB#15

sad news!:frowning_face:

Sorry guys that the project does not provide better support here. There are several open issues with skinned meshes in three.js (raycasting, bounding volumes, serialization/deserialization, IK) but we hope to improve this situation in the future.

Add oil!:grin:

Keep up the good work, looking forward to an IK system in three.js.

has there been any update with a character IK system in three.js using the GLTF model? I really wish there was a simple example

I’ve made an example of using a SkinnedMesh (based on the doc’s example three.js docs) with a generic CCDIKSolver applied: romantic-rubin-n0df6 - CodeSandbox

3 Likes

nice. how much of performance impact would be to make it “stateless”? like, always solve from t-pose, for example

A few years ago I built a bumblebee “Mara” with skeleton and bones. I used the old geometry at that time. Mara

Therefore I have renewed it now. https://codepen.io/hofk/pen/eWdZMb?editors=0110

This rekindled my interest. I am in the process of building somewhat more complicated structures. There are still some problems to overcome. One problem is flicker in the time-varying overlap of the sub-bodies.

When interested - Test versions:
skeleton_01

skeleton_02

2022-02-01 20.26.36

SkinnedMeshTest_05 - wireframe and SkinnedMeshTest_05 - flickering
2022-02-01 20.26.59

the flickering comes from icosahedrons and cylinders being disconnected (and merging them does not connect them), I think?

I am still thinking and testing. But I have not yet found a suitable variant. I connect two meshes with a single skeleton/bones to achieve certain effects.

UPDATE:
The flickering between cylinder and ball can be eliminated by separating the cylinders and spacing them apart. SkinnedMeshTest_06

But when moving, the cylinders then overlap. Then it flickers there.

You can calculate the intersection of the cylinders, but this is only suitable for a static condition, as I used there: Triangulation cylinder with holes, try out InnerGeometryCylinder

A knee variant without flickering.

I will try to use it with @abernier’s solution (see above).

I have added this solution to the collection :

https://hofk.de/main/discourse.threejs/2022/CCDIK-Solver/CCDIK-Solver.html

Links and author in source code.

1 Like