PDA

View Full Version : Recooking particles


Dmacb
03-29-2011, 10:26 AM
Hi!

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!

fomal
03-29-2011, 05:26 PM
Hi,

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!

Dmacb
03-29-2011, 09:08 PM
Hi Fomal!

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:

fomal
03-29-2011, 11: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?

Dmacb
03-29-2011, 11:26 PM
Hi!

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!

See ya...

Dmacb
03-29-2011, 11:35 PM
Hi again!

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!

Thanks again!!!

My questions are now completely answered! :thumbsup:

fomal
03-30-2011, 12:45 AM
ah good! Glad I could be of help :)

Dmacb
03-30-2011, 10: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!

fomal
03-30-2011, 04: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 ;)

Dmacb
03-30-2011, 09: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...

CGTalk Moderation
03-30-2011, 09: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.