I've filled a glass with liquid which comes to rest by frame 39.
I pause the sim then unhide some animated objects which drop into the glass.
I un-paused the sim and let the liquid react.
Now I would like to tweak the sim settings but I don't want to have to re-simulate the filling of the glass from scratch. It would be great to start simulating from frame 39 however when I do this, the glass is cleared of the existing fluid.
I wrote the following Phoenix script to try to initialize the grid based on the cell temperatures of the previous frame:
fn OnSimulationBegin=(
--Will be executed once when simulation begins
a_setsystem 0 --"core"
xc=this.xc; yc=this.yc; zc=this.zc;
for x=0 to xc do
(
for y=0 to yc do
(
for z=0 to zc do
(
t=38
temperature=a_gett[x,y,z]
t=39
a_sett x y z temperature
)
)
)
)
However the grid is still cleared even with this code. Is it even possible to do what I'm trying to do?
Thanks
I pause the sim then unhide some animated objects which drop into the glass.
I un-paused the sim and let the liquid react.
Now I would like to tweak the sim settings but I don't want to have to re-simulate the filling of the glass from scratch. It would be great to start simulating from frame 39 however when I do this, the glass is cleared of the existing fluid.
I wrote the following Phoenix script to try to initialize the grid based on the cell temperatures of the previous frame:
fn OnSimulationBegin=(
--Will be executed once when simulation begins
a_setsystem 0 --"core"
xc=this.xc; yc=this.yc; zc=this.zc;
for x=0 to xc do
(
for y=0 to yc do
(
for z=0 to zc do
(
t=38
temperature=a_gett[x,y,z]
t=39
a_sett x y z temperature
)
)
)
)
However the grid is still cleared even with this code. Is it even possible to do what I'm trying to do?
Thanks
Comment