Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Non-uniform particle distance
#2
(28-08-2025, 02:44 PM)chenji Wrote: Hi,

Is there a way to get Non-uniform particle distance for a Obi Rope? My use case is a first-person fishing game. There's a very long fishing line (300m)。Considering both performance and the reality of physics simulation, I'm going to set the distance of each particle far more smaller than those away from person. Is it possible and how to do this? For example the closet 10 particles distance is 0.5m, the next 10 particles distance is 2m and others are 20m? Something similar like LOD.
If it's possible, a more challenge question is when I use cursor to change rope length, can the non-uniform distance requirement also be supported?
If it's not possible what's the recommended way to get performance increase given I don't care much about the simulation quality of the elements of the long Obi rope that are far away from the camera but I do for those close to camera?

Hi!

LOD-ing physics (particularly if they're involved in gameplay and not just eye candy) is generally not a good idea. The reason is that the discretization of an object, that is, how it's represented as a discrete collection of smaller pieces - particles, tetrahedra, triangles, etc- has a big impact on the behavior of said object.

Altering this discretization at runtime so that objects further away from the camera have less "pieces" will cause the object to behave differently, which may affect gameplay. Having gameplay depend on something as arbitrary as distance of the object to the camera is certainly not something you want.

A rope represented with less particles/segments would be shorter than one represented with more particles. It will also be stiffer (both bend and stretch) because less particles means forces propagate faster trough the rope. This can have all sorts of side effects.

Visuals on the other hand can benefit from LOD, since an object further away is smaller due to perspective and even if it looks different, the user is not likely to notice, and gameplay will not be affected. You can drive ObiPathSmoother's decimation parameter using distance to camera to get visual LOD easily, but this only works for entire ropes - not specific areas of a rope.

kind regards,
Reply


Messages In This Thread
Non-uniform particle distance - by chenji - 28-08-2025, 02:44 PM
RE: Non-uniform particle distance - by josemendez - Yesterday, 08:22 AM
RE: Non-uniform particle distance - by chenji - Yesterday, 08:45 AM
RE: Non-uniform particle distance - by chenji - Yesterday, 09:05 AM