The screen alignment for beam particles doesn’t work after settings source/target tangents with source/target strengths greater than 0. The beam seem to be fixed and won’t rotate towards the camera, so if you view the beam from the side, the beam will become thinner and nearly disappear. Is this by design, a current limitation, or just a bug that’s never been fixed? This post from 2 years reports the same issue: https://answers.unrealengine.com/questions/128051/tangent-beam-and-screen-alignment.html
I can’t imagine that this is by design, since beams look terrible when not facing the camera. And I also can’t imagine that it would be that difficult to fix, since it just requires proper updating of the particle geometry. It’s been a while since the initial bug report, so hopefully this issue gets addressed soon.
The bug that was entered by Eric K., UE-5049 was returned as By Design by the engineers. Taken directly from the engineer, “This is expected behavior, beam emitters have always worked this way.” This is just simply how they work, and we do not intend on modifying the current implementation as of now. This is all the information I have in regards to the issue, but if you have further questions or need additional assistance, please let me know.
Thanks for the prompt response. It’s unfortunate to hear that this is by design, since I believe it’s a design flaw. Would it be possible to put in a feature request, or at least have your engineers discuss the issue again? Just because beams have always behaved this way doesn’t mean they should continue to. I do not see any advantage for this.
Beams should maintain the illusion that they are round by always facing the camera (at least when selecting the option for facing the camera). If they don’t, you can clearly see the underlying twisting flat geometry, which just ruins the beam effect. There is no control over the direction the beam faces once you set the source/target strength over 0. If you only set the source strength to greater than 0, and then set the target strength to 0, you can see that the closer you get to the target, the more round the beam appears to be (since the beam actually rotates to face the camera with low source/target strengths).
I understand you and your developers are incredibly busy with other features and bugs, but I hope you will bring up this issue with them again. UE4 is known for it’s incredible graphics, so it’s strange that such a flawed beam implementation has existed for so long. Thanks!
After looking through the source code, I spotted what is producing the flat beams. In the ParticleSystemRender.cpp file, inside the function FDynamicBeam2EmitterData::FillVertexData_NoNoise, in the inner most for loop around line 3578, the right direction vector is not updated while stepping through the interpolation points. It only uses the right direction vector calculated for the very first segment. After line 3582 (the EndPoint assignment), you just need to add these two lines of code:
Right = Location - EndPoint;
Now the function can correctly calculate the vertex positions so the beam particles are always facing the camera. This produces round beams when viewed from any angle. The only downside to this method is the beams can produce some artifacts when looking directly down the line of the beam (especially near the endpoints), but they’re only noticeable when zoomed in on the beam with low interpolation. Regardless, it still looks better than the flat beam.
The artifacts are produced by the up direction vector changing too rapidly from segment to segment, which produces non-ideal geometry. I think you could minimize these artifacts if more tessellation detail could be applied to these areas that needed it, rather than the simple uniform tessellation currently used. This would require a lot more calculations every frame, though, so it’s probably not worth it.
Strangely, the FillVertexData_Noise function properly updates the right vector, unlike FillVertexData_NoNoise. So either this is just an inconsistent design choice for beams, or it really is a simple bug that’s been overlooked. I suppose having flat beams might be useful, but having the option to produce round beams should be available as well (probably by default).
Please make this happen or give us an explanation why beam emitters are not allowed to face the camera. I got some simple effects that need this behavior. What do you recommend when we want beams to face the camera, making a spline? Beams facing the camera should be way cheaper or I’m totally missing your point, if so, please explain why this behavior is not implemented <3
I have gone ahead and entered a feature request for the issue which can be tracked and voted on by navigating to the link below.
An update to the issue was made by our devs. It was returned as ‘Won’t Fix’ as we do not plan on fixing issues within Cascade. Focus has shifted to the new particle systems editor Niagara.
Let me know if you have further questions or need additional assistance.
In case you need camera facing beams immediately, just read my comment above. You just need to add two lines of code to one of the source files and then recompile the engine.
In UE4.18 its line 3464 in that file and those two lines are already in there. Sadly this issue is still ongoing. If i could just have the beam bend using Tangents and not be flat(aka facing toward camera) that would be PERFECT but sadly i cant >:(
3464 is for the case where TessFactor <= 1. You want to find the else statement (when TessFactor > 1). Just scroll all the way down and look for the final block of code under:
for (int32 StepIndex = 0; StepIndex < BeamPayloadData->Steps; StepIndex++)
Tex_U2 += Tex_U2_Increment;
EndPoint = InterpolatedPoints[StepIndex];
Add this code:
Right = Location - EndPoint;
It’s on line 3737 for my version (4.18).
I’ve had to insert this block of code every time I update UE4, but it’s easy and it works.
Considering vle07 fixed this with one line of code, why the heck can we not at least get a box we can check and uncheck? Let us decide what we want to do.
Particles should not always face the camera, there are instances where they need to lock in a certain direction, and no not just 6 orientations (X,Y,Z, -X, -Y, -Z). I’m talking directional based on velocity or degree, which they have but it still doesn’t work because it still wants to face the camera.
Give us a check box that literally says “Facing Camera” and allow us to check and uncheck that mother as many times as we want.
I don’t think Epic is going to fix anything in Cascade. You can try using Niagara (which is in early access). You’ll have to enable the plugin. It’s a lot more powerful than Cascade, but it’s still buggy and there isn’t much documentation on how to actually use it. I’m not sure if it works for mobile devices either…
I’ve actually just given up on using UE4’s built in particle editors. I instead use instanced static meshes and materials that use vertex position offset. It’s limited in what it can do, but the number of particles that can be rendered is amazing (since most of the work is done on the GPU rather than the CPU). If your math skills are decent, it’s actually pretty fun and produces good results.
UE4 is a great engine, but there are a lot of half-baked buggy features that you either have to fix yourself, find a work around, or just wait (and work on something else in the meantime) and hope Epic gets around to fixing it. With the particle editor, you’ll just have to wait for Niagara to be officially released, hopefully next year!
Any news on this? I can’t edit the source code here. Is there even anything like a beam particle in Niagara?
You can add in your particle sys Beam → Noise and make a noise of 0, it’ll face the camera
Just enable in the noise “Low Freq Enabled” and put a “Frequency” like 10