UE4 Volumetric laser beams

Hi guys and girls :slight_smile:

Im finally dig in to some old idea about - how to make laser beams with volumetric effects (or maybe i should call it shadows in this case?).
I bit of problems immidiately appears. Most biggest problem is define smoke which we β€œscan” with laser beam plane. I guess some raymarching can work great in this case but raymarching are currently out of my skill range :unamused:
But mostly it works fine :slight_smile:

Beware of flashing light :sunglasses:



6 Likes

Nice stuff! :smiley:
I had to do kind of a similar thing in Unity recently, with HDRP. I found that using 3D Textures to get a coherent noise in every direction for the smoke is a good solution, instead of relying on the plane’s UVs. There are no 3D Textures assets supported in UE4 yet I believe, but you could probably prototype something with a Noise node in your shader (even bake that into a texture with a BP, with the 3rd dimension being encoded in a flipbook?).

I wonder how you did the shadows/occlusion tough, is this based on depth sampling or something? :slight_smile:

1 Like

Hey thanks :slight_smile:

I think vector noise can help, but not sure, and anyway vectornoise are not cheap node depend on used noise type.

I wonder how you did the shadows/occlusion tough, is this based on depth sampling or something? :slight_smile:

Yeap, sampling depth are the only way, probably. I was imaging something like kind of line tracing, checking ray collision with a geometry but again - something like that are quite difficult to me, and, probably, it can work only in screenspace.