Line tracer as Fortnite

Hello! I’m trying to create a tracer effect for a pistol shot like in Fortnite (for training purposes) in UE 4.



I’m new to this UE4.
I make this effect in Cascade via Beam date and also tried through ribbon, everything seemed to work out well but I can’t make them animate dissipate and bend, could anyone help me to understand how the material was made in this effect?
Thanks in advance and apologizing for a stupid question).
(I’m bedly know English, sorry for this)

1 Like

Its never a stupid question to try an understand something! :slight_smile:

Im guessing that its done with a ribbon and that the dissipate an bend are done using UV distortion. Some one else might know more though!

JangaFX did a really good tutorial on ribbon emitters check it out here,
https://www.youtube.com/watch?v=6Lk3SL44A6o

2 Likes

Hit-scan weapons are usually a beam. You can mask off the intensity of your UV distortion so that the “end” of the smoke will be distorted more, and increase the UV distortion over its lifetime.

2 Likes

Ahh thanks for clarifying, I’d never made anything like that so was just my best guess :sweat_smile:

All good! It’s not something that I’ve seen discussed too many places, so it’s probably hard info to get hold of. Slower moving things like rockets or magic orbs, etc. will be projectiles and use trails/ribbons with a SpawnPerUnit value on them.

We did this for our project! Some of our weapons are line traced.
Line_Sniper
My programmer did it in c++ however I know the solution for in blueprints.
Code
All you have to do is to add the source, target and beam module and set the parameters.

2 Likes

Hello!
I need your help.
I’m trying to make a liner trace, on the advice above, I tried to do it through an distortion, but it still looks somehow wrong.)
Could you tell me how to achieve a more accurate form of line trace.)

https://drive.google.com/open?id=1LktjCFIalzPbXl3mIXx2cWDOoPKH-AEf
That is how it should be

MyLine

Particle
My line trace

My material

Link to all: Line Tracer - Google Drive

2 Likes

What exactly do you find wrong with it? It seems pretty close to your Fortnite reference

I will maybe try something with the movement and also I recommend using ScreenToGif for your GIFs :slight_smile:

I wanted to try a fade in-out, but Beam particles don’t support Dynamic parameters because it’s a bug that UE4 still hasn’t fixed yet even though it has been reported a multiple times for over a long period.
So I tried to manipulate the values to show what you can do with the spheremask.
testFail
But you can always control the values if you have unused channels in your particle color

The cool thing is that you can change the spheremask pos from 0 to 1 and than play with the radius and eventually use that as a mask for the opacity.

Anyway I simplified your material a little bit and changed the tiling distance so that the beam UVs tile in distance (Can be foun under Beam data module).


https://we.tl/t-POG4Yi1KWG

I hope it’s informative

1 Like

Yes, thank you, this is very informative.)
But my main problem is that I cannot repeat the internal trace. = (
Sorry to write about it so late.

I don’t understand what you mean. To spawn a new beam particle inside the same particle system whenever you fire your weapon?

Yes, when I try to add an internal (second) emiter line trace,
I can’t get him to be in the center of the first emiter, when I change the size it just increase up.
gif%20my%20trace3

I want to repeat this internal trace (I circled it with a blue line).

Sorry for the quality, I can not make it now from the source

That’s either multiple textures in a single material for their beam, or a single texture. You can find how to make something similar in Shannon’s thread on hand painting trails: Shannon McSheehan - LoL FX + Knowledge Share - #230 by ChrisLee

1 Like

So you said: yes, … in a second emitter.
However i don’t understand why you would do this in a second emitter.
You can for example spawn 3 ribbons at the same time using that same emitter by setting your spawn burst to 3.
(make sure your max beam count in your beam module is set to higher value)
You can also spawn by code if you add the Event receiver module you can choose to spawn but than you would have to disble kill on complete in and set emitter loops to 0 in your required module
I haven’t tested all the spawning but if it wouldn’t work you can also spawn the particle uasset multiple times in your level whenever you fire.


Anyway if you do this with multiple emitters you will have to use extra code to set their source and targets.
In your blueprint you can select your emitter index:

For your texture I figured you get a better result if you set the tilling distance to something higher like 190 (in my case).
Trail
To have variety you could use a channel on your particle color to randomly offset your textures

For your size I think it is only the impression that it is not scaling from the center because of the UV distortion you apply on the texture. I recommend maybe using a gradient to soften the distortion on the source or target like this:

Also for your screen captures please use something like Lightshot

2 Likes

Hello everyone, I’m still new to fx, and I really want to implement the fortnite beam on my project, but I can’t get it to work, please I need help on this

Take a look at Beams in Niagara. You can look at an example in the content examples (Niagara map).
You just want a Beam from the end of your weapon to the target. Then add some of the shader logic posted above to make it look better.