Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Bug of particle sleep
#3
(12-07-2024, 07:55 AM)josemendez Wrote: That's a extremely high sleep threshold, which will send particles to sleep almost immediately. Remember the sleep threshold is a mass-weighted kinetic energy threshold: 1/2 * velocity^2. A threshold of 0.5 will cause particles moving any slower than 1 m/s to stop.


Correct. Because when emitted from a higher point, they have more time to accelerate downwards due to gravity and they will have larger kinetic energy, which allows them to keep moving. As their energy is near the sleep threshold, they will go in and out of sleep which creates this "creeping" movement.


Yes, this is what should happen. The larger the kinetic energy of the particles (that is, the faster they move) the larger the sleep threshold needed for them to go to sleep.


This is the expected outcome, why would it be otherwise? It is natural for an object to go to sleep when its velocity is low (below the sleep threshold) since that's when its energy can be considered negligible. Conversely, it should be harder for them to sleep the higher their velocity is. Sleeping works like this in all physics engines. Pseudocode for sleeping:

Code:
if (velocityMagnitude * velocityMagnitude * 0.5 < sleepThreshold)
   particle.Freeze();
else
   particle.Move();

It seems to me like you're expecting to use sleep to kind of fake or approximate high viscosity, which of course won't work. Sleeping is intended to reduce or eliminate positional drift, making particles stay in place instead of moving at very small speeds. Using a very large sleep threshold like you're doing will result in jerky/creepy movement, as particles go in and out of sleep continuously. In the worst case scenario, it will completely freeze the simulation as all particles go to sleep.

kind regards,
Hello,
Do you have any suggestions for simulating small particles at the 0.01m scale? Should I adjust the fixed time step of the physics engine, or modify the iteration steps or substeps of the ObiSolver? The goal is to simulate high-viscosity materials like concrete that can adhere smoothly to a wall when thrown.
Thank you!
Reply


Messages In This Thread
Bug of particle sleep - by GuoliZheng - 12-07-2024, 06:02 AM
RE: Bug of particle sleep - by josemendez - 12-07-2024, 07:55 AM
RE: Bug of particle sleep - by GuoliZheng - 13-07-2024, 12:43 PM