09-09-2025, 02:18 PM
(This post was last modified: 09-09-2025, 02:20 PM by josemendez.)
(08-09-2025, 04:01 PM)Qriva0 Wrote: Hi again, I tested various solutions and I wanted to confirm several things.
1. The problem I want to solve is controlling/pushing the cable (rod), but from the middle part, not the tip.
There are two obstacles on my way, first one is the fact that pushing it requires forces to propagate and it can make the cable very wiggly or stretch even with big amount of substeps (15-20),
Hi,
Modifying the velocity of the particle is the proper way to do this. This can be done by either writing into the velocities array, or writing into the externalForces array (forces get reset to zero after each step, and they result in an acceleration that depends on the mass of the particle, but at the end of the day they also modify the velocity).
(08-09-2025, 04:01 PM)Qriva0 Wrote: and second one is keeping the cable fixed by some particle and this is related to second point:
2. Changing particle position teleports it and it does not apply any forces, however if there are other particles, then the whole actor can gain valocity because constraints try to keep particles in their proper positions. In this case does that mean that I should not move rod by changing position of single particle? If yes, then how to move particle via velocity, and keep it pushed, so it does not pull back from forces or collision? Adding velocity or externalForces will stack, while overriding velocity will cancel all other forces plus when I stop movement then velocity is 0, but constraints still apply some and rod moves back. In the end I think I want something like pinhole with maximum friction.
If I understood correctly, you just want to just override the position of a particle? this can be done by setting the particle's inverse mass to zero. This will cause it to ignore forces (both internal/due to constraints and external) and you can just set its position. Reverting the inverse mass to its original value resumes dynamics simulation for the particle. This is how static attachments work internally. See: https://obi.virtualmethodstudio.com/manu...icles.html
(08-09-2025, 04:01 PM)Qriva0 Wrote: 3. Is there any other way to keep rod a bit more stiff without chain constraint? The problem with chain is that it does not allow to calculate tension correctly, but more important it's simply unstable, because it tries to find proper position no matter what and rod shakes or does other undesired movements.
Chain constraints use a direct solver that calculates a position change for all particles simultaneously, so that they meet a global length constraint. This can be unstable if the solution isn't "near" the current state of the rod, or if there's simply no solution to the problem.
The alternative is using an iterative solver, which is how most other constraints (distance, stretch/shear, bend/twist, etc) in Obi work. These can yield approximate/good enough solutions even if they can't find *the* solution. Unfortunately this means you must rely on substeps/iterations to keep it stiff. Still, a moderate amount of substeps should yield rather stiff rods/ropes unless extreme forces, lengths, or resolutions are involved. Could you explain a bit more about your use case?
(08-09-2025, 04:01 PM)Qriva0 Wrote: 4. I think you mentioned that Obi 7.2 should have elasticity for rod control points, is that still planned for next version? If yes, is there any ETA?
Yes, still planned. ETA is end of October. There's many more changes coming to 7.2.
kind regards,