Jump to content

Recooking particles "on the fly"...


J.Santos

Recommended Posts

Hi!

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!

particles_test_v08.hipnc

welderTip.bgeo.zip

Link to comment
Share on other sites

OK!

Thanks to Fomal (Coen Klosters), this is now answered!

Here's is answer and file!

"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!"

For the 3rd part of my question, the strange look of the particles, you can just increase the oversampling (or play with the force POP, but this one might lead to changes in speed...)

popcontrol.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...