x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Beam particle doesn't face camera after setting tangent and source strength

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.

Product Version: UE 4.12
Tags:
more ▼

asked Jun 27 '16 at 05:13 AM in Bug Reports

avatar image

vle07
95 11 12 16

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Hey vle07,

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.

Cheers,

Andrew Hurley

more ▼

answered Jun 27 '16 at 02:11 PM

avatar image vle07 Jun 27 '16 at 06:21 PM

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!

avatar image vle07 Jun 30 '16 at 10:45 AM

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; Right.Normalize();

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).

avatar image Benemii Feb 12 '18 at 08:13 PM

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 >:(

avatar image vle07 Feb 12 '18 at 09:08 PM

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; Right.Normalize();

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.

avatar image Ninjin Aug 25 '16 at 05:56 PM

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

avatar image vle07 Aug 25 '16 at 10:15 PM

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.

avatar image AndrewHurley Aug 25 '16 at 07:11 PM

Hey guys,

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.

UE-35205

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.

Cheers,

Andrew Hurley

avatar image ReclusiveRychu Sep 18 '18 at 05:23 PM

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.

avatar image vle07 Sep 22 '18 at 03:28 AM

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! :)

avatar image Davision Jan 11 '19 at 06:30 PM

Any news on this? I can't edit the source code here. Is there even anything like a beam particle in Niagara?

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question