Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WaitForAllTasks spent a lot of time!
#6
(21-09-2017, 03:43 AM)sunyifeng83 Wrote: Hi jose,

I attach my configuration of the solver and the profiler image. It seems the collision processing takes much time. But in my scene i used just 5 mesh colliders (4 mesh colliders used for 4 walls in the room). It's definitely not normal.

Hi!

The settings seem ok, the problem is definitely collision detection. How complex are your colliders, and how big are their bounding boxes?

MeshColliders are extremely costly to collide against (since each triangle in them costs roughly the same as a primitive collider) and are better avoided unless it's not possible. Now, if the bounding box of your colliders is big enough to enclose the entire room, it means each particle in the fluid is being tested for collisions against every triangle in all walls every frame. This would explain your low performance. Say your walls have 1000 triangles each, and you have 4 of them. If their bounding boxes enclose the emitter, then you're performing 1000x4000 = 4 million sphere/triangle intersection tests every frame.

A solution would be to switch to primitive colliders (which are much cheaper), or if the problem is the bounding boxes, try to split your meshes so that the bounding box is tighter and the fluid only checks for collision against a wall when very close to it.

A screenie of your whole scene, with the colliders selected would allow me to give more info.
Reply


Messages In This Thread
RE: WaitForAllTasks spent a lot of time! - by josemendez - 21-09-2017, 11:02 AM