View Full Version : Recooking particles
03 March 2011, 09:26 AM
This is kind of a spam question since I posted it also in another forum but since this one is new and needs traffic... here it is!
I'm trying to do an welder flame and in my reference images/videos you always see that when the welder is turned on, the flame length (and colour) start big and then it's adjusted to a smaller and bluish light.
I decided to use a piece of geometry to serve as a target for my flame. The geo is controlled by me and ideally as it comes closer or further away, the flame length decreases or increases.
However, I'm having some problems:
- The changes I do are only reflected when the simulation cooks again. I know this is the "normal" behaviour, but is there any way to change this? Forcing the particle simulation to cook as new data is introduced?
- The flame length ends up being decided based on the target but also on the speed/force applied to the particles. This is easier to spot when the target is further away. Is there a way to make the particles accelerate/decelerate according to distance to target (without keyframing the speed/force)?
- This one is related to the above question... When you accelerate you start having a very distinctive look on the flame... on the top you have a "mass" of particles (and that's fine by me) but on the beginning you have circles of particles permeated by empty spaces... Any workaround?
I've attached a file with the work so far... there's a Null called MASTER_CONTROL with some options to change the target, speed and so on... the idea is latter on do a Digital Asset so the animation is easier and quicker.
Thanks for any tips!
03 March 2011, 04:26 PM
Yes you can control particles through direct movement applied somewhere else. You just have to get that change into you particle network. I've created a quick sample file that demonstrates bringing in the position of an object referenced outside the particle network to control the speed of the particles.
In the file there's a source (grid) and a point (reference). When moving the point (using the position parameters on the reference_point node) the particles will speed up or slow down. The greater the distance of a particle to that object the more it will increase in speed.
Inside the particle network there's a get_position node. This gathers the current point position of the object connected to the second input of the pop network and applies it as extra position data to every particle processed. Because this data is now available for the particle you can use it to compute new attributes every timestep. So when moving the sphere the particles will behave accordingly. It's not a beautiful looking example but demonstrates the concept you were asking for.
In compute_speed I import the new position data and calculate the distance between the particle and the object. This get's used to add velocity in the Y direction.
Hope it helps!
03 March 2011, 08:08 PM
Thanks for the reply! I was reading it and calling myself stupid at the same time... ;) My second question, that you so helpfully addressed is similar/the same as when you do a leader/follower system and you determine the behaviour of the follower, as if it should accelerate towards the leader or not...
Duh to myself...
I also solved my 3rd question about the "strange shape" I was getting by simply increasing the oversampling...
Now I only need to know how to see the changes entered in a slider reflect "instantly" on the particle behaviour, without need to recook... Any ideas?
Thanks for putting me "back on track"!!! :thumbsup:
03 March 2011, 10:04 PM
If I understand correctly you want to change particle behavior when the sim is calculated? From an object defined in SOPS? In the example I provided you can drag the point (where the sphere is copied on) from left to right as it's simulating. The change in distance to the particle is directly reflected in it's speed. Or am I getting your question wrong?
03 March 2011, 10:26 PM
You're getting me right.
I haven't checked the file yet as I'm multitasking at the moment ;)... I'll check it asap.
Anyway, if in your example the particles follow the target (in all directions), during calculation of the sim, without needing to start again from frame 1, then that was what I was talking about and what I needed!
Going to check the file!
03 March 2011, 10:35 PM
Just looked at your file and yes, that is exactly the behaviour I want to! I would never thought about it! I need to go inside your VOP POP again tomorrow and see if I can figure it out!
My questions are now completely answered! :thumbsup:
03 March 2011, 11:45 PM
ah good! Glad I could be of help :)
03 March 2011, 09:29 AM
Hi again Fomal!
I just saw your picture on the wall in the lab... ;)
I posted your answer and file on the other forum, so I could close that thread and that way more people will know the answer...
You're fully credited.
Thanks and see ya!
03 March 2011, 03:30 PM
Ahh the famous Bournemouth lab. I have spend many hours in there! Good luck this year finishing the course. It get's harder once the weather get's better ;)
03 March 2011, 08:30 PM
Good luck this year finishing the course. It get's harder once the weather get's better
Thanks... We have AC now... eheheeh! I think I know what you mean... But I'm not a big fan of beaches anyway...
03 March 2011, 08:30 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.