Download

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!

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

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.

2 Likes

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

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.