Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to optimize collisions?
#7
(16-10-2024, 08:49 AM)josemendez Wrote: 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.


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.


Here is my profiler data. Im using async option in solver. As soon as physics is invoked from Obi side the rendering is also spiked up. Its due to overdraw from particles but there are very few particles and overdraw works fine if collision is not invoked.

https://drive.google.com/file/d/1LC_wWx2...sp=sharing
Reply


Messages In This Thread
How to optimize collisions? - by vrtraining - 15-10-2024, 06:05 PM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 08:11 AM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 08:38 AM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 08:49 AM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 11:06 AM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 11:51 AM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 01:26 PM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 02:00 PM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 02:13 PM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 02:43 PM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 04:09 PM
RE: How to optimize collisions? - by vrtraining - 16-10-2024, 08:51 AM
RE: How to optimize collisions? - by josemendez - 16-10-2024, 08:54 AM