works well - This script has lots of possible applications
magKillField 0.0.1 for Maya (maya script)
Automated creation of volume particle kill field
1-3 of 3
Previous
Next
Reviews Love it? Or maybe you want to share some creative ways you're putting this item to use.
-
Hi. thanks a lot !, nice one. here is adapted to kill nParticles, sorry i needed it :P. i change procedure name no nKiller for my use. ---------- global proc nKiller() { string $nParticle[]; string $field[]; string $tempX[]; string $temp[] = `ls -sl`; int $num = 0; int $part = 0; if (size($temp) <= 0 ) {error "no nParticle selected!";} for ($i in $temp) { if ((`nodeType $i`) != "nParticle") { $tempX = `listRelatives -s $i`; if ((`nodeType $tempX[0]`) != "nParticle") { warning ($i+" is not nParticle; will be skipped!"); } else { $nParticle[$part] = $tempX[0]; $part++; } clear $tempX; } else if ((`nodeType $i`) == "nParticle") { $nParticle[$part] = $i; $part++; } else { warning ($i+" is not nParticle; will be skipped!"); } } if (size($nParticle)>0) { $field = `turbulence -pos 0 0 0 -name "nKill_#" -m 0.1 -att 0 -f 2 -phaseX 0 -phaseY 0 -phaseZ 0 -noiseLevel 2 -noiseRatio 0.707 -mxd -1 -vsh cube -vex 0 -vof 0 0 0 -vsw 360 -tsr 0.5`; } else { error "no nParticle Selected!"; } print($nParticle); $num = 0; for ($i in $nParticle) { connectDynamic -f ($field[0]) ($i); } string $connections[] = `listConnections -d 1 -s 0 -p 1 $field[0]`; $num = 0; for ($i in $nParticle) { string $exp = `dynExpression -q -s -rad ($nParticle[$num])`; $exp += "\n//kill field: "+$field[0] +"\n"; $exp += "if (mag(" + $connections[$num] + ") > 0) {lifespanPP = 0;}\n"; dynExpression -rad -s $exp ($nParticle[$num]); $num++; } select $field[0]; } ---------- Thanks. -
Hi!I do not know if you know, but your code was used in actual movie!Plaes check "The Equalizer 2", around 1:10min, your code is visible on death man's mobile phone.I created this account just to let you know about it, because I think it may be great fun for you.Have a nice day,KS
Please confirm your email before commenting.