Wednesday, December 14, 2011

better turning particles...

I havn't tried this yet,, but it looks interesting....







this code was suggested by Eric Cloutier on cgtalk to make better turning particles. ive added a simple adjustment dividing the turn by the goalPP. the results are pretty acceptable. i think i see flipping occassionaly but not too much

the suggested code is listed here

forums.cgsociety.org/showthread.php?p=7186073#post7186073

and repeated here for reference with my adjustement....466 is my maxCount of particles which im using to get a percentage value for goalPP



creation:
nParticleShape1.customAim = ; //or whatever
nParticleShape1.goalPP=nParticleShape1.particleId/466+.4;

after dynamics:
float $maxTurn = 0.1;
vector $curAim = nParticleShape1.customAim;
vector $vel = nParticleShape1.velocity;
vector $newAim = ;
nParticleShape1.customAim = $newAim/nParticleShape1.goalPP;

No comments:

Post a Comment