[Niagara 4.25] Particle Decals Mini Tutorial

Particle Decals Mini Tutorial

The intention of these mini tutorials is to have easily searchable reference for implementations of some of the newer (or altered) features in Niagara.

While waiting for Epic to (pretty please) implement decal renderers, I thought I’d share a little trick to creating pretty convincing decals inside of Niagara. (kinda)

The goal is to use WorldPositionBehindTranslucency, which @imbueFX shared a few months ago, to recreate the behaviour of decals for translucent and additive materials.

The result will look something like this:


Step 1.
Here’s the material we are going to be using

  • Essentially, We calculate the mesh particle localspace position, but unstead of using the position of the fragment we are drawing, we using WorldPositionBehindTranslucency to find the surface position behind it.

  • After that we scale and offset and saturate the uv’s to create one distinct tile of the texture. (you could also set tiling in the texture settings, instead of saturating)

  • We also calculate a zMask, allowing us to fade the decal in and out when it moves outside of the z-range of our decal.

Step 2.

  • In the material settings, set Blend Mode to Translucent or Additive, and make sure the material doesn’t cull back faces.
    image
  • In the advanced Translucency settings, make sure to disable depth testing as well, otherwise we won’t be able to see our decal up close.
    image
  • Under Usage, Enable Used with Niagara Mesh Particles
    image

Step 3.

  • Create a new empty emitter and a mesh renderer.
  • I also added an Update Mesh Orientation module to make my decal rotate over time
    image

Step 4.

  • In the Mesh Renderer Module, for Particle Mesh, use a cube with it’s pivot in the center.
  • Also override the material of that cube to be our newly created material.
    image
  • Make sure Local Space is on in the Emitter Properties Module.
    image
  • In the Initalize Particle Module, we can use Mesh scale to scale our decal.
    image

Please let me know if you don’t understand something, or if I made a mistake somewhere.

44 Likes

I have been posting these tutorials in different threads, because I believe they don’t concern similar enough topics. Furthermore asking and answering of questions is a lot less confusing if you can just ask on the correct thread instead of having to reply to a specifc post in that thread.

However if people rather I wrap all of these neatly into one thread I can do so as well.

Please let me know which one you prefer.

  • Seperate threads per topic.
  • One mega thread with all the tutorials as seperate posts

0 voters

1 Like

Thank you so much for sharing this knowledge ! I’m quite new on Unreal, I’m sure this will help me for few effect !

1 Like

That is WICKED :smiley:

1 Like

deferred decal was too heavy, so, for translucent, additive material. awesome!

1 Like

https://www.youtube.com/watch?v=jyzg3tNjcis

Works like a charm! Thanks Niels :sparkles:

2 Likes