Unreal Engine - Decal Edge Stretching
- L K
- Feb 3, 2022
- 2 min read
ISSUES WITH EDGE STRETCHING
One of the biggest drawbacks with decals in UE4 is that they work by projecting directly onto the scene. This means that any surfaces at close to or 90° to the direction of the projection have huge stretching artefacts.
How the issue looks in Engine.
As seen above, projection onto a flat surface produces great results.
The second image shows stretching on the top surface as well as on the sides of the sphere.
And the last image shows stretching on multiple 90° surfaces.
POTENTIAL SOLUTIONS/ WORKAROUNDS
The first solution is to make the Z scaling of the decal projection box of a minimal size, so the decal is essentially 'flat'.


This lets you place the decal with only tiny amounts of stretching. This solution will work fine in many scenarios.
However, most things are perfectly flat, there are protrusions or indentations that you may also want the decal to project onto, especially for dirt and grime .


A second solution is to remove all near 90° surfaces. If that's not sensible to do with modelling, the answer might be just to rotate the projection angle of the decal.
Unreal Engine allows you to project the decal at any angle, and even has adjustable fade settings with distance to remove any hard edges.
Here I've taken the previous examples from earlier and projected the decal at an angle to all of them. No obvious stretching. Problem solved, well not properly.
This solution will work well for any irregular decals - dirt, grime etc - but would be a poor choice for other things with regular straight edges. Words, numbers, signage etc would all exhibit obvious distortion.

This may be mitigated by adjusting the scaling of the X and Y axis dependent on the situation, but it might be impossible to correct completely as the distortion will not be constant if you've rotated by more than one axis.
Comments