I was just testing out some ideas to create a material that would allow me to blend two sets of normals together from separate UV channels on a single asset. The goal was to see if I could achieve something like the little edge chips/cracks seen in the P.T. Silent Hills demo (screenshot below).
What I was attempting to do is create one UV channel with all my surfaces unwrapped normally with standard UV seam placement for use with a tiling wall texture. On a second UV channel, I would unwrap all the chamfered edge polys and align them in a single direction that could then take a tiling ‘worn edges’ normal map. I can assign the multiple UV channels with the TextureCoords node in the material editor, but the way the normals plugged into the second UV channel react to lighting is wrong. UE3 had issues with correctly handling lighting direction from normal maps assigned to multiple UV channels, and I was hoping this may have changed in UE4, but that doesn’t appear to be the case.
Attached are a few images illustrating my test setup. Note that I made the bricks fairly extreme just to see what was going on. Also, it’s always the second UV channel that experiences the bad lighting flips. If I swap UV channels so the bricks are on UV0 and the tiled rough edges are on UV1, then the rough edges are reversed in odd directions (it’s just harder to see in a still image post).
If this issue with the way normals are handled on a second UV channel isn’t something that can be resolved, is there a particularly good way to go about adding a tiling strip of edge decals to corners like the P.T. image below? It’s definitely a tiled effect that gets repeated elsewhere, so they’re not just using high-res custom models everywhere. Also in particular, note the rounded corner, which isn’t conducive to using the standard decal sticker projectors. I’m guessing they have a setup similar to Cryengine, which allows the use of deferred decal materials to be applied to any arbitrary geometry (it just writes whatever material inputs are set in the decal material on top of the rest of the deferred render pass), but that’s currently not something UE4 allows (might make a request post later, since it’s an insanely useful tool for level art using tiling textures).
Reference image from P.T.
My test setup: