How to make particles stay in a volume?

Hi,

I’m trying to create some flying bees :honeybee: who are flying around a bee hive.
What I’m trying to accomplish is that the bees (particles) are already there, and
are only moving in a volume and not flying away and out of screen.

I kinda got it working by using a sphere as particle generator and an alembic animated bee exported from Blender .and a couple of bouncers around the particles and some vortex fields to make it feel more random. So at least some of them are hanging around
But this feels a bit cumbersome. Is there a way to keep particles flying around in a volume?
and keepings changing random direction.

Or do you have any other suggestion how you would create this?
I’m happy with what I have now, so now I’m looking to improve and make it easier in the future :slight_smile:

Hi,

Here’s what I usually do… Ahhh, I should make a video of it but here it goes:
Create a white frame as the generator.
Create a color noise (mux and freeze the first frame)
Add white media as a surface, add noise as a displacement map and make z displacement 400 or so. This will create your volume…
Add particle generator under the surface. With parameters:
Number 100
Lifetime 50
Speed 0 (yes zero :slight_smile: )
Add a particle animator with type function. Here’s the function
speed=(speedminSpeed+turbulence3((pos+(0,0,framemagnitude))*power,1))

set the power to 0.02 and minSpeed to .97
Add another particle animator type function:
transparency=sin(lifetime*PI)
I think this should work.
Let me know if I missed something
Sinan

2 Likes

Hi Sinan,

Thanks a lot for sharing.
This will be perfectly usable for all kind of flocks,
dust, insects and more. I love it.

But in the case of my bees I think there are still 2 problems.

  • How to restrict the axis of movement of the bees, so they are not flying with legs in the air or making saltos.
  • I like the random movement, but is there a way to change the range. For example every 3 seconds changing direction.
  • How to make them fly faster

Another particle related question, which I was asking myself when experimenting:
How to animate only random y-movement per particle.

  • For example if I have 10 particles (generated with the noise frame displacement) and I want those to have a random Y movement, ( noise(frame) )
    how can I set this up?

I expect to be able to set particle animator to Transform and Position and then put a noise(frame) expression in the Position Y field of the particle animator, but this does not work. I get some weird motion at the beginning.
I never understand exactly how this works…

Depending on the type of particles you use the speed of the particle defines its orientation. Not at the box now, but while quads orient themselves along their movement axis square particles face the camera, unless you rotate or spin them. If you’re using ParticleDraw to render the bees, I think they will behave like quads and orient along their speed vector.

You could animate the magnitude parameter in the turbulence function every 3 seconds between 0 and 1. This might give the effect you’re looking for as this is the rate of change in the turbulence pattern.

The minSpeed parameter acts sort of like a damper. That is the speed of the particle is multiplied by this amount. So if you set it to something like 0.99 the speed down is less. On the other hand you could make it 1.02 and make them go faster each frame. Maybe animating this value between 0.97 - 1.03 might adjust their speed like you want. Be careful when it goes over 1 though…

You could play around with the speed function like:
pos = pos + (0, sin(frame), 0)
Remember pos and speed are vectors and you can cook up your functions for each component.

Particle Animator type set to Transform, that I have never understood. It’s easier for me with functions…

I hope this helps…

2 Likes

Hi, wow thanks for the whole explanation.
I use ParticleDraw indeed, so it behaves like quads I checked.

Still struggling how to rotate the particles only in certain axis.
But in the meantime, the spot is approved and delivered :slightly_smiling_face:
Luckily the bees are quite out of focus and motion blurred, so you wont
notice it if they are making 360 weird rotations and such :smile_cat:

I think I just need to spend more time with the functions and try to understand them.
So can you use the turbulence3 function on 1 axis only, instead of all 3?

Glad that you got it approved :slight_smile: Another win for Flame’s particles.
I usually use the turbulence3 as a vector and then do a vector multiplication like:
speed = turbulence3(whatever) * (0,1,0)
this will use only the y component of the turbulence function.

1 Like


This was a little test only, not the delivered result of course :wink:
I love the realtime playback!

Step by step I understand the functions more and more.
It helped a lot that you told me I can multiply by vector, now I get it.
So I can use Magnitude or Power to multiply all the vectors the same value
or I can split them out by using (x,y,z).
Still not totally sure what turbulence does with speed and pos, and the ,1 value at the end.

I think it would be very helpful to have particle video series only dedicated
to using functions. Because I feel a lot more is possible with particles than we think.
I read the flame manual, but that doesn’t help me much sadly.

I appreciate all the help…:pray:t2: