![]() |
Non-uniform particle distance - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html) +--- Thread: Non-uniform particle distance (/thread-4545.html) |
Non-uniform particle distance - chenji - 28-08-2025 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? RE: Non-uniform particle distance - josemendez - 29-08-2025 (28-08-2025, 02:44 PM)chenji Wrote: Hi, 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, RE: Non-uniform particle distance - chenji - 29-08-2025 (Yesterday, 08:22 AM)josemendez Wrote: 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.Thanks for reply! Can this support a curve value in the future to let us has more precise control over its visual performance? About physics LOD I know it's usually not a good idea but considering my specific case do you think its side effect matters? Actually it's a little different: I don't need change the distance every frame. In the mean time I thought I could just do this: using 3 ropes with different resolution that are stitched one by one. So will Obi Rope consider supporting something like this out of box with a simpler API, as a performance improvement method for cases like first-person fishing game? RE: Non-uniform particle distance - josemendez - 29-08-2025 (Yesterday, 08:45 AM)chenji Wrote: Thanks for reply! Can this support a curve value in the future to let us has more precise control over its visual performance? We will consider adding a per-control point "visual importance" value that modulates the measured curvature when decimating the rope mesh - so that areas with higher "visual importance" are less decimated, as if their curvature was artificially higher. (Yesterday, 08:45 AM)chenji Wrote: About physics LOD I know it's usually not a good idea but considering my specific case do you think its side effect matters? Making the rope shorter means the user will be able to reel the rope in faster, and rod behavior will be considerably different since the mass of the attached rope is different. (Yesterday, 08:45 AM)chenji Wrote: In the mean time I thought I could just do this using 3 ropes with different resolution that are stitched one by one. So will Obi Rope consider supporting this out of box with a simpler API? I highly doubt we'll add a fully fledged physics LOD system, as it's not a good idea in general and may only apply to very specific use cases. However we'll develop visual LOD further. kind regards, RE: Non-uniform particle distance - chenji - 29-08-2025 (Yesterday, 09:02 AM)josemendez Wrote: We will consider adding a per-control point "visual importance" value that modulates the measured curvature when decimating the rope mesh - so that areas with higher "visual importance" are less decimated, as if their curvature was artificially higher.Thanks, that's fine! |