Decals are one of the best ways to add additional detail via stains, leaks, dirt, splatter, stenciled numbers/letters or posters onto already placed Static Meshes in the level.
But what if decals you added are not rendering in shadow or in indirectly lit areas like so:
Your decals work with dynamic lighting. Lights that are set to Stationary and Moveable:
But they do not work in indirect static lighting. This means around any light that is set to static:
Or in any lighting scenario where decals are not being directly lit by stationary and moveable lights:
Even using Unlit viewport mode makes decals disappear:
Unreal Engine 4 features an updated decal rendering system that contains more predictable performance behavior and generally render faster. But this means by default and design decals do not render in indirect baked static lighting. All decals would need to be receiving dynamic lighting for them to show (any lights that are set to stationary or moveable type).
You have 3 options if you want decals to render in shadows and in indirect static lighting:
Here is how to enable third option.
In order to have decals to render in indirect lighting you need to enable DBuffer decal option. This is disabled by default because it does contain a slight CPU and memory cost.
There are two steps to this process.
First step is enabling DBuffer decals through Project Settings.
Second step is changing decal materials property to work with DBuffer setting.
STEP 1:
Go to Edit > Project Settings:
Under Engine: Rendering, enable the following properties:
Lighting:
Optimization:
STEP 2:
Now open material editor for only those decals that you want to work in indirect static lighting. Not all decals you have may need to be updated.
Double click on the decal material to open Material Editor:
Inside Details tab in Material Editor, use drop down menu to select one of the following options for Decal Blend Mode:
Choose one that uses those input material properties. So if your decal material contains Base Color and a Normal map input, then choose "DBuffer Translucent Color, Normal".
Apply Changes and Save the Material:
STEP 3:
After making these changes, restart the editor.
All of the project's shaders may need to be rebuilt (this would happen automatically):
Rebuild your scene by clicking on Build:
You should now see decals work in indirect static lighting:
Use DBuffer option (those that work in indirect static lighting) for decals that need to be used in indirect static lit areas.
All other decals - use GBuffer option (default) by keeping Decal Blend Mode set to Translucent, Stain, Normal or Emissive. Note that they will NOT render in indirect lighting.
If decals need to be used in all lighting situations, change them to "DBuffer Translucent..." option.
If enabling DBuffer decals in Project Settings crashes your project then here is how reset these settings.
ONLY do this if changing to DBuffer via Project Settings crashes your project.
Go to directory where your project is stored. This might be on C: drive or another drive. In my situation, I store all UE4 projects on E: drive.
Unreal Engine Launcher right-Click on the project icon to select "Show in Folder":
Go inside Config folder and open DefaultEngine.ini file:
Scroll down to the bottom and set r.DBuffer=False:
Save and close the DefaultEngine.ini file.
Want to learn more about creating custom decals for UE4? Such as how to create dirt, stains, blood, and stenciled numbers decals?
Home Terms of Use/Trademarks/Disclaimers Privacy Policy Donate About Contact
All content on this website is copyrighted ©2008-2024 World of Level Design LLC. All rights reserved.
Duplication and distribution is illegal and strictly prohibited.
World of Level Design LLC is an independent company. World of Level Design website, its tutorials and products are not endorsed, sponsored or approved by any mentioned companies on this website in any way. All content is based on my own personal experimentation, experience and opinion. World of Level Design™ and 11 Day Level Design™ are trademarks of AlexG.
Template powered by w3.css