Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to enable/disable?
#1
After many tries, i have a simple fluid simulation.. How do i turn the fluid animation on through script at a particular time and then disable it after a while?

i just need help turning it on and off. if i disable any of the scripts and then re-enable, there is no simulation.
Reply
#2
(12-07-2017, 12:21 AM)MoonwalkingBaz Wrote: After many tries, i have a simple fluid simulation.. How do i turn the fluid animation on through script at a particular time and then disable it after a while?

i just need help turning it on and off. if i disable any of the scripts and then re-enable, there is no simulation.

Figured it out..

Open the Obi.Emitter script and reference the speed. 
Set speed to 0 to stop the fluid but keep the droplets, or reference the speed and set it to whatever speed you like to resume the pour.
Reply
#3
(12-07-2017, 11:38 PM)MoonwalkingBaz Wrote: Figured it out..

Open the Obi.Emitter script and reference the speed. 
Set speed to 0 to stop the fluid but keep the droplets, or reference the speed and set it to whatever speed you like to resume the pour.

Yep, exactly this. The "speed" parameter is the actual speed in m/s at which the fluid comes out. Higher speeds will automatically cause more particles to be spawned by the emitter in order to keep a constant flow. Accordingly, low speeds will emit fewer particles. Until you reach 0 speed, and no particles are emitted at all. See the "Speed" parameter description here:

http://obi.virtualmethodstudio.com/tutor...tters.html

This is how most offline fluid simulators (realflow, naiad, etc) usually work too, in order to avoid big gaps in the stream that would appear if separate controls for particles per second / speed were available (emitting many particles at low speeds = high pressures = simulation explodes, emitting few particles at high speeds = fragmented flow. Neither of these are desirable.)
Reply