How do I uniformly spawn planes/a niagara system, along the circumference of a Sphere?

Hi, I have now been stuck trying to figure out this issue for two days without coming up with a solution after hours of googling, so I had to resort to posting here and hoping anyone can share some insight on this.

My goal is to spawn a particle system (you can imagine a plane for simplicity’s sake) in a uniform distance from each other along the circumference/boundary of a Sphere.

What I have currently.
As you can see, currently they do spawn along the circumference of the X axis, I would like them to cover the entire sphere. In addition to this, they are all facing the wrong direction, they should face towards the center of the mesh as illustrated using my horrendous paint skills.

Screenshot 2022-01-09 225229

The yellow planes are supposed to indicate the planes/particle systems I need to spawn.

Here is a screenshot of my blueprint currently.
Heavily re-used the graph of a similar topic I found here.

Thank you all in advance, I am currently using UE 4.27 but solutions provided using 5.0 is also fine with me if that would solve the issue!

1 Like

Update: I fixed the rotation by inverting the directional vector, still no cigar regarding spawning the particle system at any place other than the “equator”.

Screenshot 2022-01-09 232711

Updated BP

1 Like

You are basically using 2d math, and you calculate the vertex position in world space by using the length of the radius of the circle.

x = Cx + r * cos(Angle)
y = Cy + r * sin(Angle)

This is described in 2D space, so if you want to go vertical, just assume y to be z.

X or Y are also interchangeable, but I would assume X to be the circle driven value.

So for what you are asking, you have to do some sphere math.

The distance of the point is always radius from center.
The direction of it, is offset by the initial object rotation on the Z and Y axis.

You may be able to Multiply the location of the circle center vector by the rotation of the object (or of the rotation vector you want). And then Multiply that by the radius to get the correct position in 3d space of Y.

Does that make sense?

Your initial formula is essentially doing this, but only in 1 fixed cardinality.
I think if you just swap the rotation value that you get the forward vector from to the actual object rotation you may get what you need without math.
(In other words, plug in X and Y)

Or, probably more sane, rotate vector from the object rotation by the angle you have, and Multiply that by R.


Thank you for getting back to me so swiftly. I will give this an attempt shortly and report back the result.

1 Like

Hey again! I spent a while tinkering but I believe I am being limited by my knowledge of blueprints. Is there any chance you could find some time out of your day and show me a blueprint snippet of how this would look like? I found a pastebin site for Blueprint code which might be easier to show how my current structure looks like as opposed to a screenshot.

If you are too busy for this, I fully understand and thank you regardless for the reply you provided, I was entirely clueless before, now I at least have the direction I need to work towards.

1 Like

I was trying to do the same thing, managed to alter your code to get it almost there… oddly only half spawn on the middle horizon layer… I’m not really sure why lol

1 Like

Apologies that screenshot was a little blurry

1 Like

Also, the reason it didnt ‘fill’ was due to not enough being spawned, simply up the Quantity Variable to the right number, or do a little math coding to have it automatic. I eventually took a different approach and spawned random points inside the sphere, the only thing I struggled with was creating a distance variable between the randomly spawned points so they would not overlap. Another option would be to just use a modelling program like Rhino3D and Grasshopper to easily create equal points around a sphere and then use something like the Mindesk plugin to spawn your desired objects to those points