Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Poor performance when enabled surface collision
#4
(09-09-2022, 09:33 PM)snowtv Wrote:  
In case I end up not using surface collision due to its impact on the performance, I want to know a bit more about the blueprint creation process for ObiCloth. I'm a bit confused about the amount of particles created in relate to the complexity of the cloth mesh. It looks like the blueprint will create one particle for each indices in the mesh data, but is that really necessary? Because the actual vertex count is much less, as many indices are shared between the triangles.

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.


(09-09-2022, 09:33 PM)snowtv Wrote: I mainly want to optimize the performance. I currently have a mesh object with around 9k indices (but it actually has only 1.5k vertices), and I need two instances of them in my simulation. When there is only one instance the fps is around 40, which is good enough, but when I enable two of them, the fps suddenly drops to around 10, which is not usable. I wonder why the performance drops 4 times, there are no contacts between the two instances, either.

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,
Reply


Messages In This Thread
RE: Poor performance when enabled surface collision - by josemendez - 10-09-2022, 08:44 AM