Emiting particles from the shape of a beam

Can someone help me?
I have a beam emitter that goes in arch trajectory with some minor noise FX. Start and end points are set in BP and always different.
What I need is particles to spawn in random places on the shape of the beam, and then fall down.
Something like this on 1:40 but along the whole length of the beam.

i would suggest an beam particle Intro to Cascade: Creating a Beam Emitter | 07 | v4.2 Tutorial Series | Unreal Engine - YouTube and for the particles falling down from the beam just make that from your material not actual particles

Thanks for suggestion, already thought about that.
I’ve already created beam itself it’s easy. But still looking for ways to create effect of falling particles.
Idea of making it with material looks legit at a glance. But on practice there is a number of problems. Like camera related orientation, stretching a strip of a beam down to fill the needed gap, dealing with distortions of UV because of noise module, animating falling particles in some interesting way that normally would’ve be done via particle system and so on.
It’ll be great just to have been able to spawn particles along the beam.
Still looking for better solution.

I fiddled about a bit with code and Bezier curve generation and got a beam that sort of drops particles from it.

bfc33d5e1a6db75358b08cabba3542e3.png

I don’t know how good it is performance wise or practicality really. But in short I replicated the curve generation formula that the beams use as a custom blueprint node. Where P0 is the start point, P1 is the first tangent point, P2 is the second tangent and P3 is the target point. (The scale isn’t quite right, for a beam tangent of Z+50, mine seemed to be something like Z+400). T is the normalized distance along the curve. (So 0 to 1 is the entire length, while .4 to .6 is a section in the middle.)

Here’s the custom blueprint node code:


	UFUNCTION(BlueprintPure, meta = (DisplayName = "BezierCurveCalc", Keywords = "Bezier"), Category = MyCustomFunctions)
		static FVector BezCurve(float P1x, float P2x, float P3x, float P0x, float P1y, float P2y, float P3y, float P0y, float P1z, float P2z, float P3z, float P0z, float t);



FVector ABlueprintTestActor::BezCurve(float P1x, float P2x, float P3x, float P0x, float P1y, float P2y, float P3y, float P0y, float P1z, float P2z, float P3z, float P0z, float t)
{
	float answerX, answerY, answerZ;

	answerX = pow((1 - t), 3) * P0x + 3 * pow((1 - t), 2) * t* P1x + 3 * (1 - t)*pow(t, 2)*P2x + pow(t, 3)*P3x;
	answerY = pow((1 - t), 3) * P0y + 3 * pow((1 - t), 2) * t* P1y + 3 * (1 - t)*pow(t, 2)*P2y + pow(t, 3)*P3y;
	answerZ = pow((1 - t), 3) * P0z + 3 * pow((1 - t), 2) * t* P1z + 3 * (1 - t)*pow(t, 2)*P2z + pow(t, 3)*P3z;


	FVector Result = FVector(answerX, answerY, answerZ);
	return Result;

	
}

I couldn’t figure out how to actually get the particles to spawn at locations that I calculated with that, so I did the next best thing and decided to create a second particle emitter and move it’s location around to these points per frame. That way I could also completely ignore the curve in cascade. It does follow the beam nicely if it’s moved around, but it does not take into account any kind of rotation. Here’s the blueprint for it:

Use a cylinder emitter that conforms to the beam. An Approximation should be enough, though Bohriums implementation is also pretty cool!

Yea! Definitely really cool implementation. Tough a little bit to complicated, but guess I should give it a try. As there is no better option yet.
But It’ll be good to have not even this approximation, not mentioning cylinder emitter, but snapping particle source to exact beam under noise module influence. Like what if I had to go really crazy about noise function, may be even with tessellation and smoothness… For now I’m not, but what if I’d do?
There is an option - branching. I wonder if it’ll work like I need in future. But for now it do nothing.
Anyway thanks to Bohriums for looking so deep into my problem.
And if there is someone with other ideas please share.

Just do what Bohrium did, but with a spline? Just set the start and end points to what you want and then set the start and end tangents to the forward direction of your “wand” or whathaveyou.

From there you can just set the particle spawner to random points along the spline the exact same way that Bohrium is…