[COMPUTER SOUNDS]
SPEAKER: Hey, everyone, and welcome back to another Unreal
Tips and Tricks tutorial.
In today's episode, we will learn
about how to efficiently use decals
and how to use the sorting order to combine
multiple decals on the same surface
without overlapping each other.
A decal is a material that is projected
onto meshes in your level, including static meshes
and skeletal meshes.
In this level example, I have a simple decal actor
projected onto the wall.
I can grab the actor and move it on the x- and z-axis.
Now, if we orbit around the decal
and move it on the y-axis, we can
see that it's not projecting on the wall
anymore, because the bounding box is not
hitting the static mesh.
Now, as soon as I pull that bounding back,
you can see that decal gradually fading back in again.
Let's move to our second scenario,
which we have a mesh decal projected on multiple meshes.
As per the previous example, the detail
is projected on all static meshes.
So if I move the actor, we can see that it's
projecting on all meshes.
Now, if we go into orbit mode and move the y-axis,
we can see that we gradually see the decal being
projected on meshing as the bounding box hits that object.
Now, let's say we want the decal only hitting the wall.
Let's select our two foreground elements by holding Shift,
and on the Details panel on the right, let's search for Decals.
We can see that both of our actors
have the Receive Decals checked on,
which is always on by default. If we
If we turn that off, the meshes are simply not
affected by any decal projections,
thus only projecting the decal onto the wall.
Now that we get a feel of how decals are working in 3D space,
let's move on to this example and demonstrate
how to use the sorting order priority to bring
specific decals to the forefront.
So in this scenario, I have three decals that are classed
in sorting order priority, the red one being at the bottom
of the stack and the green one being on top .
To better understand the process,
let's click on the red decal actor, and let's
focus our attention to the Details panel on the right.
We can see that we have a sort order priority
system on our decal.
And right now, my red actor has a sort order of 0,
placing it at the very bottom of the stack.
If we look at our green decal, we
have a sort order priority of 3.
The blue one has a sort order of 1.
So if I want my red actor to be in between the two,
I would simply enter a value of 2.
Now, if I give a number higher than 3,
which is my green actor, this will override all of my decals.
So if I scale this, you can see exactly how
the priority system is working.
Now, if I reset this to 0, I now have my two other decals
on top of my red one.
Taking this example to a real scenario
with some Megascans decals,
we can apply our previous techniques
to achieve great results by using
our decals in a smart way, selecting which
static mesh should receive or not decals,
and sorting the priority order in the decals for a more
natural look.
I hope you enjoyed this tutorial,
and see you very soon on the next Unreal Tips and Tricks
video.