Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  Strange errors after import (clear project) and questions about perfomance
#5
(12-04-2018, 05:38 PM)josemendez Wrote: Hi,

Using LateUpdate is not always an ideal solution, as it causes cloth to be updated using a variable timestep. This is generally not noticeable for characters, fast moving clothing, or clothing that does not interact with other objects and can be regarded as a visual embellishment (as explained in the video). You should reduce Unity's max fixed timestep instead.

Also, please note that performance of Unity games running inside the editor is generally much worse than in a standalone build.

Solvers can stop updating the simulation when not visible. To do this, simply uncheck the "Simulate when invisible" option in ObiSolver. However, only entire solvers (not individual cloth pieces) can be culled. If you don't plan on having cloth pieces collide with each other, this is not an issue as you can use a separate solver for each cloth.

Resting cloth pieces still have to be updated. You could deactivate the cloth when its kinetic energy gets below a threshold (get particle velocities and calculate their weighted mean), then reactivate it when the user interacts with it, or when any other condition is met.

Okay, thanks!

I'm reduce Unity's max fixed timestep instead and get the same as LateUpdate (ClothStaticMeshCollider demo).

However, on the Intercollisions demo I noticed a difference.
With late update I get physics glitches (when "Simulate when invisible" is disabled and I turn the camera), but with FixedUpdate there is no problem (with similar performance). May be someone will be useful.

Quote:You could deactivate the cloth when its kinetic energy gets below a threshold (get particle velocities and calculate their weighted mean), then reactivate it when the user interacts with it, or when any other condition is met.
Are there any script examples? What functions/api should I call?

(12-04-2018, 06:54 PM)NightFox Wrote: I'm reduce Unity's max fixed timestep instead and get the same as LateUpdate (ClothStaticMeshCollider demo).

I was able to reduce artifacts change settings:
1. for solver: Damping 0.5, Particle Collision Iterations 9 (parallel mode) Relaxation 1
2. for cloth: Distance Constraints Slack 0.3
I think we can finding compromise without a significant loss of performance (sacrificing some plausibility).
Reply


Messages In This Thread
RE: Strange errors after import clear project and questions about perfomance - by NightFox - 12-04-2018, 06:54 PM