01-26-2007, 01:40 AM
theres no need to have a much bigger grid outside the cam view most of the time. u can rotate and move it exactly as u need it for cam view to minimize unused or unnecessary grid parts.
whatever angle, position and dimensions ur grid has, the only thing u might need is to use the gravity vector to correct the direction of gravity, if the grid is rotated.
if u move the grid (animate transformation and/or rotation) u might run into problems. we tested that before and had seriuos issues while simulation and while rendering the cache in this moving grid (certain frames were not rendered). its not recommendable.
use the cutoff script from vjeko for more effectivness:
[code]-- cut adaptive grid based on smoke, temperature and velocity threshold. don'touch fire voxels.
-- only if all values are below the threshold will the voxel be emptied
-- example: cutadaptive 0.01 100.0 1.0 emties the voxel
-- if smoke is below 0.01, temperature below 100 and abs(velocity) below 1
-- if it is not cutting enough it's the temperature probably...
fn CutAdaptive st tt vt = (
for i in 0 to (voxels-1) do (
if (GetFuelByIndex i) > 0.0 then continue -- leave fire alone
if (GetSmokeByIndex i) > st then continue
if (GetTempByIndex i) > tt then continue
v = GetVelByIndex i
if (length v) > vt then continue
-- otherwise...
SetFuelByIndex i 0.0 -- clean unburnt fuel remains (fuel
whatever angle, position and dimensions ur grid has, the only thing u might need is to use the gravity vector to correct the direction of gravity, if the grid is rotated.
if u move the grid (animate transformation and/or rotation) u might run into problems. we tested that before and had seriuos issues while simulation and while rendering the cache in this moving grid (certain frames were not rendered). its not recommendable.
use the cutoff script from vjeko for more effectivness:
[code]-- cut adaptive grid based on smoke, temperature and velocity threshold. don'touch fire voxels.
-- only if all values are below the threshold will the voxel be emptied
-- example: cutadaptive 0.01 100.0 1.0 emties the voxel
-- if smoke is below 0.01, temperature below 100 and abs(velocity) below 1
-- if it is not cutting enough it's the temperature probably...
fn CutAdaptive st tt vt = (
for i in 0 to (voxels-1) do (
if (GetFuelByIndex i) > 0.0 then continue -- leave fire alone
if (GetSmokeByIndex i) > st then continue
if (GetTempByIndex i) > tt then continue
v = GetVelByIndex i
if (length v) > vt then continue
-- otherwise...
SetFuelByIndex i 0.0 -- clean unburnt fuel remains (fuel
VFX TD rsfx.de
CG Supervisor @ ScanlineVFX Munich
CG Supervisor @ ScanlineVFX Munich

