21-09-2017, 04:19 PM
(This post was last modified: 25-09-2017, 10:13 AM by lidiamartinez.)
(21-09-2017, 04:05 PM)sunyifeng83 Wrote: Hi,
My project has uploaded to this address:
XXXXX
Please check. The scene path is Assets\LabTest\Lab\Scene\009_Controller_BezierPointer 1.unity
Hi!
The issue with your project is the "bottle_3" mesh. It has about 3600 triangles, which is extremely dense for a MeshCollider. This is causing 3,6 million triangle/particle collision tests with theĀ fluid per frame. Also, most of these triangles are clumped in the bottom or around the border of the container in a very tight space, so spatial culling can do very little to avoid having to test them all.
By moving this container away from the fluid jet, the simulation time goes down to bout 2-3 ms in my computer. Getting it close to the jet again, and simulation time goes up to 20-25 ms.
Try using a simpler mesh for the collider. Note that you can (and should) use different meshes for rendering and physics, as it is common in video games.