Is there a way yet (in Geometry Nodes) to properly link up a hierarchy chain that runs along a path? You know, the classic “train cart on rails” problem, where the distance of the objects from each other is different than the length of path between them (because of curvature). Maybe something can be made using raycasting?
(The circular path is just an example, ideally it should work on any path shape… though it’s doesn’t necessarily need to be a closed path.)
Wouldn’t you simply have to constrain a splines points to a curve and move them all at the same time?
No, because each connection point moves at a different speed, depending on the curvature of the path.
Extreme example:
Car 1 can rotate fully along the path from position A to position B, before Car 2 and 3 even have to move. So point p1 definitely moves at a different speed than p2, p3 and p4.
1 Like
I’m not fully sure I understand what you want to do. If you want to maintain a fixed distance between each joint, that’s what splineIK does, it’s a constraint
In geonodes though I wouldn’t know how to do it. I suppose it finds the intersection of a sphere of radius equal to next bone length and the path itself. Although there could be several intersections, so not sure how to discriminate here?
yes, spline ik can do this, but how can you now move the spline ik along the path?
Good question. I can’t find a way. I tried trimming the curve in geonodes, but the splineIK constraint seems to ignore the trimming (ignores all modifiers actually). Maybe it’s time to try and move this to geonodes entirely ? here is the relevant code : https://developer.blender.org/diffusion/B/browse/master/source/blender/blenkernel/intern/armature_update.c$335
It uses secant root method to find the intersection between the sphere and the (tesselated) curve, a method which is numerical and iterative… if I understand correctly here it uses a maximum of 10 iterations unless some error threshold is met. Geonodes doesn’t have loops but I guess we could try the good old method of concatenating group nodes.
1 Like
The one intersection that happens closest along the curve would be the correct one, I guess.
But yeah, I want to be able to move the setup along the path, plus do other things to it (like changing the number of links in the chain and their size).
Ah yes, of course.
Well with current tools, I’m sorry but I don’t know how to solve this.