Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Particle distance problem
#5
(28-10-2019, 09:27 PM)IlyaZzz Wrote: Thank You! I reduced Unity's fixed timestep to 0.009 and it helped.

I made few tests and I got that particle collision takes 90% of my resources. But I already had particle collision constraint iterations to 1 and solver substeps to 2.
Do you have any ideas how to fix it? 
I can't turn off particle collision...

In Obi 4.x, each substep also performs collision detection (generating contacts, that are later solved by the solver). So having 2 substeps and 0.009 ms timestep, means you might be calculating contacts maxFixedTimestep/timestep*substeps times per frame. Assuming your maxFixedTimestep is Unity's default (0.1) this can mean collision detection is performed 22 (!!!) times per frame.

Try lowering your max fixed Timestep a bit, something like 0.02.

FYI, In Obi 5.x, we have implemented this paper:
http://matthias-mueller-fischer.ch/publi...lsteps.pdf

Which means collision detection is calculated only once per step, and amortized over all substeps. This improves convergence speed without paying any additional cost for collision detection. In this case, you could just increase the amount of substeps to 6-8, leave the timestep untouched and call it a day.
Reply


Messages In This Thread
Particle distance problem - by IlyaZzz - 20-10-2019, 09:06 PM
RE: Particle distance problem - by IlyaZzz - 25-10-2019, 10:31 PM
RE: Particle distance problem - by josemendez - 27-10-2019, 04:47 PM
RE: Particle distance problem - by IlyaZzz - 28-10-2019, 09:27 PM
RE: Particle distance problem - by josemendez - 29-10-2019, 10:33 AM
RE: Particle distance problem - by IlyaZzz - 29-10-2019, 01:19 PM