Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to optimize collisions?
#10
(16-10-2024, 01:26 PM)vrtraining Wrote: Fire seems to be working fine, you can see Frame rate locked at 71-72 when I hold Obi Cloth and view the same fire, but as i move the Obi cloth forward and it collides with Box collider the frame rate drops. Its only happening on collision. When I pull back the Obi cloth from collider the framerate is restored.

This doesn't mean much. When you pull the cloth towards the fire, fire particles cover a larger portion of the screen. As you pull the cloth away, it occludes part of the fire. In other words: there's more fire rendered when the cloth is over the fire. Could -or could not- be the cause, but cloth collisions certainly don’t seem to have anything to do with this.

(16-10-2024, 01:26 PM)vrtraining Wrote: I debugged and enabled disabled everything since last 2 days in project, it only happens when Obi cloth makes a collision contact.

There's a very simple test you can do: disable the ObiCollider component in the frier's box collider. Does the fps drop still happen? If it doesn't, it does have something to do with physics. If it still happens, physics don't play any role in it.

(16-10-2024, 01:26 PM)vrtraining Wrote: Is it possible that Obi collision is causing cloth rendering to increase? that could be a reason for extended rendering?

Not possible. Physics and rendering are two completely separate processes that can't affect each other unless you explicitly tie them together (eg. rendering more stuff in response to a physics event).

(16-10-2024, 01:26 PM)vrtraining Wrote: Did you checked the physics part of the profiler?

Yes, physics takes exactly the same amount of time (around 2.2 ms) throughout the profiler's timeline as showed in the analysis above.

(16-10-2024, 01:26 PM)vrtraining Wrote: The framerate drop and physics curves are proportional

The thing you're looking at is Unity's built-in physics. The curve in question is trigger overlaps, it goes from 4 to 17 which means that a lot more triggers are overlapping when you move the cloth towards the fire. This has nothing to do with Obi, but if you're doing something rendering-related in response to triggers this may be a clue to what's happening.

At least according to your profiler data, Obi's physics "curve" is absolutely flat while the framerate drop and rendering curves follow each other closely. The top line is rendering, the bottom one is Obi physics (which are listed in the “Scripts” category). You can clearly see Obi takes consistently the same amount of time while rendering goes up and down between 70 and 50-ish fps:
[Image: GNYBUgs.png]
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