A Guild to Beautiful Game

Working with Decals and Layered Lit Settings

Some other neat tricks that also come in handy when working with HDRP is that we can work with decals and also unique settings for texture maps within planes.

Working with Decals

Decals are basically images or other symbols that can appear on walls or other surfaces that can add extra effects, such as foot prints, scratches or in this case, bloodstains.

To start working with Decals, we first need to import the image that we will be working with then we are going to convert that into a material which Unity can use. In this case I decided to import some bloodstain images, the material shader which we will be using will be the HDRP Decal shader.

Then within the hierarchy we are going to right click > Rendering > Decal Projector. This new object is going to ask for a material which we can quickly drag and drop our bloodstain material into.

Decals are basically “projections” of a texture, so you will need to redirect and rotate the bloodstain projection to be facing whatever wall or floor or object you want to show it in. The beauty about Decals is that they automatically wrap around any surface area, be it round, float or have unique edges.

Decals offer a more creative levels of detail that can replace the need to create extra 3D objects for.

Working with Layered Lit:

The next quick tip is Layered Lit, which again can only be access through HDRP pipeline. The layered lit is an shader option that allows 2 to 4 textures that can be stacked upon each other. An good example of this is having the cobble stone texture and a grass texture, and you want both textures to mesh together within one plane.

An Good example of Grass and Cobblestone meshed together

To start with Layered Lit, we will need to create an plane object within the Hierarchy, then create a new material which for testing sake, be named “Duel”. In the settings for this material, we are going to change the shaders option to “Layered Lit”. Immediately you will see new options in the inspector “Surface Inputs” asking for Layer count. This starts out with 2 and can go up to 4.

In the Layer List, you will see the “Main Layer” and “Layer 1”, this is where you drag and drop your materials to be meshed together. At first you will only see the “Main Layer” texture, in order to show the 2nd layer below we will need a layer mask within the Surface Input. The layer mask will be an black and white texture map that will control what shows in the main layer and what shows in the 2nd layer. Depending on the layer mask design, we can have some unusual results.

To make the result that I have gotten here, I reused the same cobblestone texture, and within Adobe Photoshop (or any image editing software) boosted the contrast between the blacks and whites, then inverted the overall image to both shades are reversed. Back in Unity, I used this new texture map as the Layer Mask for the Duel material which resulted in this.

Overall, the Layered Lit option is a great example if you want to experiment with multiple texture within one plane or object.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store