Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Poor performance when enabled surface collision
#5
(10-09-2022, 08:44 AM)josemendez Wrote: Obi does not create one particle for each entry in the mesh indices array, as that would create a lot of
duplicate particles. It merges spatially close vertices, and then creates one particle per merged vertex. Then for each original vertex, it stores the index of the particle associated to it. Multiple vertices can share the same particle. This map is stored in the blueprint’s topology (a half-edge structure), in an array named “rawToWelded”.

During particle creation, triangle indices (connectivity) are largely ignored. They’re only used for constraint creation.



If there’s 9000 triangle indices and 1500 vertices, Obi will create 1500 particles max, usually less than that since your mesh will have uv/normal/color seams which Obi will weld before creating particles.

Have you tried using the profiler to determine the bottleneck? It sounds like death spiralling to me, could it be that the entire physics loop is being performed 4 times each frame?

Take a look at the profiler if you haven’t yet, I can help you interpret its information if you need.

Kind regards,

I'm getting 9k "used particles" in the solver when I have one active cloth actor under it, is it because I'm using the TearableCloth? I do see it drops to 1.5k when switch to non-tearable cloth.

I also got better results with surface collision after I reduced the particle size when generating the blueprint, however, the surface collision is definitely not "perfect". In my project there will be very pointy objects that will be interacting with the cloth mesh, and they seem to still penetrating the mesh if moving fast enough. Another big issue is that if the cloth is squeezed between two colliders, it will go into a sort of "death spiraling" and can't stop jittering and destroy the performance.

Currently I'm thinking about a way to "cheat" the collision, by adding a temporary pin constraint when my pointy tools collide with the cloth, so the cloth particle is basically attached to the tool, and I'm thinking to check the tool's movement vector against the pinned particle's normal, to remove the pin constraint when the tool is not moving towards the cloth object. Has anybody tried that before?
Reply


Messages In This Thread
RE: Poor performance when enabled surface collision - by snowtv - 13-09-2022, 08:30 PM