Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Scripting rod forces
#5
(Yesterday, 11:14 AM)Qriva0 Wrote: Thank you very much! This is a lot of useful informations!

I would like to kind of bend the rod, or change shape and make it permament (for runtime duration). That would be similar to deformation related stuff and because it's possible via forces, I thought it could be possible to change during runtime. Also another case is that I might want to turn rod into bendable tool, for example imagine tool used to explore pipes with camera on the tip, it might be possible to steer that cable, bend left/right to change direction, so in reality it changes it's default shape, however it still bends properly from that rest shape.

That cannot be done by altering the blueprint, since changing the blueprint requires re-creating the rope from scratch and reloading the entire thing anew - current velocities, positions, etc will be lost. Visually, it would look like the rod loses all momentum and "pops" into its new shape.

What you want to do is called plastic deformation. Elastic materials return to their previous pose after external forces cease to be applied, elastoplastic materials however retain part of the deformation induced by stress (could require little or a lot of stress, depending on the material's plastic yield), even after external forces are gone. Some constraints in Obi support plastic deformation (eg. bend/twist,  shape matching constraints). If you just want the rod to be able to bend and keep its shape, adjusting plastic yield and creep in the rod's bend/twist constraints will do this.

Note that stretch/shear constraints do not support plasticity. To fully support this, the implementation of stretch/shear constraints must be heavily extended. Will add this to our roadmap as a feature request.

(Yesterday, 11:14 AM)Qriva0 Wrote: Yeah, that is the reason why it would be nice if there was simple functionality to "attach" some job/jobs to chain, some method or event where job can be added and then that job would be for sure completed in obi OnSimulationEnd event. That would ensure that whatever runs it's executed in the same pipeline with Obi.
I am aware I can most likely hack the whole thing, but it's better to not touch the source code, so it would be nice thing to have.

There's not a single point in the code where the main simulation job ("simulationHandle", in ObiSolver.cs) is completed(). Will see if it's possible to expose an event that gets called before completing the job, passing the handle to the user so that you can insert custom jobs at the end of the simulation pipeline without the need for an intermediate Complete().

kind regards,
Reply


Messages In This Thread
Scripting rod forces - by Qriva0 - 08-08-2025, 06:33 PM
RE: Scripting rod forces - by chenji - Yesterday, 03:18 AM
RE: Scripting rod forces - by josemendez - Yesterday, 08:31 AM
RE: Scripting rod forces - by Qriva0 - Yesterday, 11:14 AM
RE: Scripting rod forces - by josemendez - Yesterday, 11:26 AM
RE: Scripting rod forces - by Qriva0 - Yesterday, 12:25 PM
RE: Scripting rod forces - by josemendez - Yesterday, 12:48 PM
RE: Scripting rod forces - by Qriva0 - 11 hours ago