In this tutorial, you will learn how to create and use decal. Follow the instructions to create a simple blood stain. If you need the requried texture checkout the official Flax Samples to get one.
The first step is to create a new material asset (see Materials Basics page to learn how to do it).
Next step is to open the material editor and change the material Domain to Decal as shown in the picture below.
Now drag and drop the texture you want to draw as a decal. Then connect it with material color and opacity properties as show in the picture below. Also you can see the preview of the decal in the Material Preview panel.
Press Ctrl+S or click the Save button to save the changes in the material asset.
Now add a new Decal actor to your scene. You can drag and drop it from the Toolbox Window (Visuals tab) or use a Scene Tree Window and the dedicated context menu.
Select the created decal actor and assign the material to its property Material.
Your decal is ready. You can use it in your game. Also, decals can be spawned at runtime via C# script and you can create a virtual dynamic material instance to modify the decal parameters, for instance: fade off the decal after a timeout.