I’m generating procedural meshes (UProceduralMeshComponent) for both provinces and borders. The triangulation of the borders doesn’t align perfectly with that of the provinces and so I can’t just offset them by 0.01. I have to offset them by at least 2.0 (see the second picture) which makes the gap quite visible when close.
Coming from Unity, what I would just do is use a second camera rendering only the “border layer” GameObjects, with a camera depth +1 that of the main camera.
How can I render the borders on the top of the provinces in Unreal Engine?
Unfortunately unreal doesn’t really have separate user render passes out of the box.
You could have a separate flat version of the scene where you could render the terrain and borders off-screen (there the world offset should work fine).
Then use a capture component to render them out to a render texture that you could use as a materials for the sphere.
It’s a work around at best but you should have ok borders.
Unfortunately unreal doesn’t really have separate user render passes out of the box.
Doesn’t each material domain correspond to a separate render pass? I used a postprocessing material and it does render the borders in the custom depth pass on the top of the province meshes, but the pixels are “shaking”, there is a blur effect even when still.
I have 20.000 separate border meshes to render on the top of province meshes in the cheapest possible way. Decals are probably out of the question for lack of scalability. I’ll look into the runtime render texture solution you mention though.