View Full Version : How would you transfert heat to neigbouring particles
03-18-2011, 05:09 AM
I'm working on an effect with particles making little stack of hot material and that cools down (change colour).
To make it look better, I want the outside of of the stack to cool of faster than the inside.
I've just started working on it and my simple idea was to add an heat attributes to my particle and find a way to transfert the heat (or actually remove it) based on the heat of the nieghbours. But, how do i get the neighbours heat ? I was thinking of just looping through all the particles of my system and if the distance is less than X, set it as a neighbour and get the heat value, but, well, that is going to take forever as I have a lot of particles !
I've been working with expressions and MEL so far but I'm much better with python but have never used it with Maya. Would it be faster in python ?
I'm also looking into something call Approximate Nearest Neighbor to speed things up as well but still think it's going to be pretty heavy.
Does anyone have any suggestion or another idea ?
Or those anyone knows if it's possible to do that directly with a shader? I've never done any complex shader like that but willing to listen to tips and suggestions !
03-18-2011, 08:57 AM
I don't know if you have "regular" volume(sphere type) or some irregular.
Another thing is how this cool down should happen.
Btw in case of regular shape it is easy map your color based on distance to volume center.
In case of irrecgular shape , maybe to get values for particles based on distance to surface , and in this way to control color of particles.
03-18-2011, 02:21 PM
Could you create a 3d Fluid with dynamic heat and get that in the shape you want (with a moderate heat dissipation value and static velocity) and pipe the heat values of the fluid to the particles based on which voxel they are in?
03-18-2011, 06:21 PM
ginodauri what do you mean by regular shape ? I'm using blobby surface is that what you call regular shape ? And i'm not sure either to understand what you mean by volume center ?
eaclou i liek the idea of using fluid and piping the info into my particles but I have no idea how to do hat. Is it possible to basically pipe my particles position into teh fluid and then pipe back the heat from the fluid to the particle ?? I don't think i could simulate a fluid in the same way i did my aprticle. Even approximate. I basically have a fist particle system that falls down like raian and when the particle hit the ground they are killed and emit a small number of particles which are formingmy little stack. I am not very proefficient in fluids and I don't really see how to do that... But in any case if you have info on passing stuff between fluids and particles I'm interested !
03-18-2011, 07:33 PM
I'm not talking about particle "look" , but the volume that particles form.
If you have for example sphere volume , you can calculate distance from sphere center.
But if you have some arbitrary volume you can calculate particle distance to volume "surface".
It is just quick idea , i don't know it can work :)
03-18-2011, 08:49 PM
Funny you mention particles and fluids, I was just working on a scene at work dropping paticles onto a surface and emitting fluids at collision points. Then I used the isomesh (convert fluid to poly command) to mesh the fluid. If you have 2011 you can transfer fluid color easily into mesh vertex so you could emit temperature and have that burn out over time therefore changing color of mesh.
The tricky bit is particle collisions to fluid emission. You could run expressions to find collision U&V then pipe that into a fluid grid for emission but I would tend to use SOuP, which is a nodal approach that does this exact thing but without using code. Way faster that iterating through a million voxels every time step.
Having said all that though wouldnt it be easier just to change the color of particles over lifespan? If you want it to change based on distance then maybe use collision point as a value.
03-18-2011, 10:36 PM
Oh ok, I got what you meant by volume, kind of a bounding box in fact no ?
I could do that, that's a really good and easy way to fake it actually. Maping the colour to a mix between lifespan and distance to the center of the volume. I think I'll go with that as I don't have much time to finish it. Thank you very much for the idea !
While i was doing research for that FX I discover the SOup plugin (in another of your post I think actually) I'll have a look at it when I have the time. Seems really intersting ! And I'm glad it's actually possible to mix fluids and particles. I can't remember why or what but I do remember pesting against not beeing able to do that a while ago.
I'll try the sphere solution and hopefully in a few month I'll be able to show you how it turned out ! (hopefully good as a first 'pro' fx!)
03-18-2011, 10:36 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-2015, Jelsoft Enterprises Ltd.