I’m trying to create high quality car mirrors for my game and it’s driving me crazy. Google points me to making a simple reflective material exactly like the cars I’m using came with, but its not something a player can use.
Planar reflections were also mentioned, I tried that and the quality was only marginally better.
So I settled on render targets, having a SceneCapture 2D component render to a material that would be the car’s mirror. But getting it to work right has been a challenge. On a single car, it works very simply with the only issue being I need to flip the image to be mirrored. Like so
On all the rest, I get a working center mirror and the sides are blank like this
I tried turning to an AI assistant and it said this was happening because the sides got overwritten and to use multiple render targets. I can set them up individually, but getting them to display hasn’t worked for a few reasons:
- the mirrors and the car body are all one mesh only separated by material slots
- All three mirrors are a single material slot like so
If they were separate meshes or material slots I wouldn’t have a problem at all. The AI assistant pointed out several ways to do this with vertex colors, object/worldspace coordinates and strictly with UVs and gave sample graphs, but what it’s saying and the node options in the car blueprint and material graph don’t align completely.
I also tried using a Render Target 2D Array and have the same difficulties, the sample shows nodes having properties that the actually nodes in Unreal do not seem to possess. I can set the number of slices I need, but can’t find a way to assign a specific render target to a specific slice.