Professional Documents
Culture Documents
// variable definitions
$vx = $voxel.x;
$vy = $voxel.y;
$vz = $voxel.z;
$sampdens = `getfluidattr -at "density" -xi $vx -yi $vy -zi $vz
$fluid`;
$transfdens = ($partdens[0]- $sampdens[0])/2;
// emit the color (rgbpp of the particle) into the current voxel
setfluidattr -at "color" -ad -vv $transcolor[0] $transcolor[1]
$transcolor[2] -xi $vx -yi $vy -zi $vz $fluid;