View Full Version : Particles Emit Tempurature/Density ?
essencedesign 09-01-2005, 10:11 PM I am having fun experimenting right now with combining particles and fluids. Both with the Fluid shader node and using Particles as velocity on the fluids.
What I would like to do though is actually use my particles as emiters. That is, I have some streams of particles running through my container that I would like to have emit tempurature and burn off into density, kinda like the flaming comet example but using partices. I'm wondering if this is possible, and if so what types of connections should I look at making.
Thanks in advance
|
|
apoc519
09-01-2005, 10:24 PM
Hey Jermy, this is a similar expression to what Ive showed you before. In this case you need to create a per particle attribute called "temperature" and give it a creation expression value equal to the amount of temperature you want each particle to emit. Then add this expression to the runtime of the particleShape
vector $voxel;
//get value from added attr temperature
float $temperature = particleShape1.temperature;
//get paricle position
vector $pos = particleShape1.worldPosition;
$px = $pos.x;
$py = $pos.y;
$pz = $pos.z;
//get which voxel
vector $voxel = `fluidVoxelInfo -voxel $px $py $pz fluid1`;
$vX = $voxel.x;
$vY = $voxel.y;
$vZ = $voxel.z;
$velX = $vel.x;
$velY = $vel.y;
$velZ = $vel.z;
//add temperature
setFluidAttr -at "temperature" -ad -fv $temperature -xi $vX -yi $vY -zi $vZ fluid1;
essencedesign
09-01-2005, 10:27 PM
Saveing my brain again huh :thumbsup: ....I have been writing expressions all morning and keep hitting errors and having to start again...I am getting quite a good taste of MEL though through this whole experience...
Thanks again mate I'll plug this one in and see what happens
Cheers
CGTalk Moderation
09-01-2005, 10:27 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.