19-03-2024, 08:24 AM
(This post was last modified: 19-03-2024, 08:32 AM by josemendez.)
(19-03-2024, 07:31 AM)inbilla Wrote: Ideally, I would like to be able to define my ropes to have a consistent interparticle distance, regardless of length and regardless of starting shape.
Being able to adjust this dynamically would be ideal, but perhaps there are other ways?
Resolution is intended to provide consistent inter particle distance regardless of length - as it essentially controls amount of particles per length unit.
However if you cram your control points closer than the inter-particle distance determined by resolution, you need at least one particle per control point for the rope to resemble the shape defined by the points: it is geometrically impossible to keep an inter-particle distance that's larger than the distance between control points without completely breaking the shape of the rope.
Intuitively, this is very similar to Nyquist-Shannon's sampling theorem in signal processing: it states that in order to "catch" the shape of a wave using discrete samples, you need to sample at least at twice the frequency of the wave. This means if the wave goes up and then down, to reconstruct its shape you need at least a sample at the "up", a sample in the "middle", and a sample at the "down". Otherwise when you join the dots/samples you'll get an unrecognizable shape.
In this case, the wave is the blueprint's path, and the discrete samples are your particles. If you add less particles than control points, the shape of the rope will not even resemble the blueprint.
(19-03-2024, 07:31 AM)inbilla Wrote: Can I create a blueprint at runtime?
Yes, it's just a regular asset. See: http://obi.virtualmethodstudio.com/manua...ctors.html
There's also several sample scenes included with Obi that do this (RopeGrapplingHook, RopeNet just to name a couple)
(19-03-2024, 07:31 AM)inbilla Wrote: I'm open to reducing the resolution dynamically... what do you think will happen when you say "I doubt the results will look any good"?
I mean that there will be both a hitch in performance and visuals due to A) resampling and blueprint generation taking a lot of time and B) the rope suddenly using far less particles.
(19-03-2024, 07:31 AM)inbilla Wrote: I really need the behaviour and performance footprint of the ropes to become consistent (for a given length)Â regardless of starting shape...
As stated before, this is simply impossible in the general case. Thinking of extremes should make it obvious: imagine a rope that must be coiled around a toothpick (1mm in diameter), now add the requirement that the inter-particle distance must be 10 cm, while keeping the coil shape as closely as possible: if the rope can only change direction every 10 cm, there's no way for it to coil around a 1mm thick stick and not look like a garbled mess.
kind regards,