08-21-2007, 03:52 PM
hello,
i´m looking for an effective way to get rid of areas of the simulation grid, when i don´t need them anymore. i have some kind of rolling effect emitted by particles. i´m interested in the moving front of that effect but i want to get rid of the smoke after a while to speed up the simulation. i´m still quite new to the program, and i did like my first try with the scripted access to reset the values to 0.0 when the voxel is inside the area of another object. I used a box for this, to chop parts of the simulation off. i know this is really done like a dirty hack and it actually seems slower than the complete simulation without script. I´m looking for an effective way to do that. any ideas?
Thanks for any input,
julian
this was my first try, unefficient and slow. and it crashed when i had the viewport preview active. when that was off it worked...
-------------------------
fn PostObjects = (
blocker = $FFX_blocker
measurePoint = dummy boxsize:[0,0,0]
for i in 0 to (nx - 1) do
(
for j in 0 to (ny - 1) do
(
for k in 0 to (nz - 1) do
(
voxWorld = ffxVoxelPtToWorld [i,j,k]
measurePoint.pos = voxWorld
if ( intersects blocker measurePoint ) do
(
setSmoke i j k 0.
setTemp i j k 0.
--setFuel i j k 0.
)
)
)
)
delete measurePoint
)
i´m looking for an effective way to get rid of areas of the simulation grid, when i don´t need them anymore. i have some kind of rolling effect emitted by particles. i´m interested in the moving front of that effect but i want to get rid of the smoke after a while to speed up the simulation. i´m still quite new to the program, and i did like my first try with the scripted access to reset the values to 0.0 when the voxel is inside the area of another object. I used a box for this, to chop parts of the simulation off. i know this is really done like a dirty hack and it actually seems slower than the complete simulation without script. I´m looking for an effective way to do that. any ideas?
Thanks for any input,
julian
this was my first try, unefficient and slow. and it crashed when i had the viewport preview active. when that was off it worked...
-------------------------
fn PostObjects = (
blocker = $FFX_blocker
measurePoint = dummy boxsize:[0,0,0]
for i in 0 to (nx - 1) do
(
for j in 0 to (ny - 1) do
(
for k in 0 to (nz - 1) do
(
voxWorld = ffxVoxelPtToWorld [i,j,k]
measurePoint.pos = voxWorld
if ( intersects blocker measurePoint ) do
(
setSmoke i j k 0.
setTemp i j k 0.
--setFuel i j k 0.
)
)
)
)
delete measurePoint
)