Spawn particles in circle

Hi, currently studying how to create vfx in vfx graph and haver a question about declaring position of particles
I have a position in shape of circle, but the question is how to spawn particles along the arc not randomly, but with declared step, for example 0.05.
And the second question is how to rotate each particle depending of position of arc where it spawned

Hello.

So regarding the “Circle Position” with declared steps you have several way of doing it.
The easiest way might be to use a “Set Position: Sequential Circle” instead of the “Arc Circle”.
This Block Allow you to use the “ParticleID” to “loop” over the Circle Position.
Set it’s Mode to “Wrap” and your Count to desired value (it will be the your number of Steps) and don’t forget to balance your Particle Count with the desired “Steps” :

8434673--1117169--upload_2022-9-12_23-46-5.png

The other way would be to use the Regular “Set position : Arc Sphere” Block taht you already use and set it’s “SpawnMode” to “Custom”.
You’ll then have access to the “Arc Sequencer”, a 0-1 pin input that control the position on the circle.
You’ll have to provide a 0-1 value in “steps”. Here are some ideas:

The “particleID” attribute Modulo (%) the Number of desired Steps will giving you a “cycling” integer value between
0 and the desired numberSteps.
In my example ParticleID % 20 will give us a int Value between 0-19.
We then divide this value by the Desired Steps and this would give use a 0-1 value to use for or “Arc Sequencer”.

8434673--1117181--upload_2022-9-12_23-56-0.png
Another method could be to generate a “Random Number” Between 0- NumberSteps, Floor it to get rid of decimal part, and divide it by the Number of Steps. This will also give you a 0-1 “stepped value” usable in the “Arc Sequencer”.
But as the it’s a random generation, sometime some Spot might not be filled by a particle.
It really depend on your end Goal.

8434673--1117178--upload_2022-9-12_23-50-30.png
8434673--1117178--upload_2022-9-12_23-50-30.png
8434673--1117178--upload_2022-9-12_23-50-30.png

1 Like

Regarding the “Rotation Question” it really depends on what you really want to achieve.
You could take a “Position” based approach were you directly set the “Particle Position”. For this the “Rotate2D” or “Rotate3d” block operator will be your best friends:
Here’s a small ScreenShot using “Rotate2D” if you only need a “simple” 2Drotation.
8434739--1117205--upload_2022-9-13_0-37-1.png

But don’t hesitate to look at this thread for more in-depth info as it’s quite similar to what you’re asking.

A different approach can be taken by setting the “Velocity” of our particles instead of the “Position”. This approach is more “physical” so you’ll be able to add Turbulence, Drag an other Forces.
The Downside is that it’s less “Art directable” and can be harder to control.
But here are some ideas:

You need Velocity vector that rotate around your “Circle Front Axis”. While there’re many ways to achieve this , here are two of them:

Cross Product:
A cross product between two vectors, is an operation that will return another Vector perpendicular two both the input Vectors. With this in Mind:
8434739--1117187--upload_2022-9-13_0-19-0.png

Here are some Arrows to Help you Visualize the Resulting Vector:
8434739--1117208--upload_2022-9-13_0-37-33.png

Another Method would be to Swap-Inverted Vector Components.
The ParticlePosition on a (0,0,0) centered Circle can be used as the “Normal” of this circle.
So we can swap two component of our vector to Obtain another Vector.
From there Inverting the Axes Should give us a result pretty similar to our Cross-Product.

8434739--1117199--upload_2022-9-13_0-31-29.png

And here are Some Vector To help you visualize the Swapping operation and the the “X” Inversion.
8434739--1117202--upload_2022-9-13_0-34-47.png

1 Like

Thanks a lot, really appreciate your detailed response, it really helped me.

Glad it helped .
Have a great day.