Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  How to set diffuse of liquid correctly?
#7
(24-11-2021, 10:48 AM)josemendez Wrote: The sample script being used (ObiPropertyColorizer) makes use of unity's animation curves, whose Evaluate() method only takes values between 0 and 1.

A value of 1 for diffusion is extremely large, so it will cause diffusion to overshoot (keep in mind that diffusion is time-dependent, and so subject to cfl stability conditions). The overshot diffused values will then go way beyond the 0-1 range, and since the sample script does not check for this----> error.

Just use a much smaller diffusion value, for instance 0.005. If you need very high diffusion values, you'll need to reduce your simulation's timestep size.

Checking for a valid 0-1 range in the sample script would make the error in the console go away, but still the fluid colors would vary wildly due to the high diffusion.

Got it!
Reply


Messages In This Thread
RE: How to set diffuse of liquid correctly? - by Chua Polar - 25-11-2021, 09:04 AM