16-10-2024, 08:49 AM
(This post was last modified: 16-10-2024, 08:51 AM by josemendez.)
(16-10-2024, 08:38 AM)vrtraining Wrote: The problem is im using a very optimized fire shuriken particles, frame drops when view port contains fire particles and at the same time if any of a single Obi Cloth particle makes a collision contact.
I have created a fire blanket with Obi Cloth to put off fire. When I use Obi Cloth with the Fire Particles both in my viewport everything is perfect and I'm getting max frames. But as soon as Obi Cloth makes a contact with any collider in scene and my view port contains fire particles, frame rate drops.
I get that particles might be drawing some performance but there is no drop in frame rate no matter how much i swing and move my Obi Cloth keeping fire particles in my view port. A single collision cause a drop. And effect is same.
That doesn't make any sense whatsoever, shuriken particle rendering and Obi physics collision aren't related in any way.
The only possibility I can think of that would lead to this is that the combined cost of fire particle rendering (possibly due to overdraw?) and collision detection is tipping the update cycle towards death spiraling, forcing more than one physics update cycle per frame.
See the manual for an in-depth explanation of how the physics loop works in games - not just Unity/Obi-, what death spiraling is and why it affects performance.
In any case, the profiler will clearly tell us if this is the case or not.
(16-10-2024, 08:38 AM)vrtraining Wrote: How Obi Solver works? like Physics is only processed when a single particle comes into contact?
Physics are processed every FixedUpdate (like all physics in Unity), otherwise things would simply not move.
Contacts are generated when particles are close enough to a collider's bounding box, and then solved together with all other physics constraints. So the number of colliders in the scene doesn't have any impact on performance, the number of contacts does.