Car Mirror creation

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:

  1. the mirrors and the car body are all one mesh only separated by material slots
  2. 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.

this is not a simple solution. you’d have to render a seperate capture for every mirror, cause the capture location is different. and that would need a lumen scene for every mirror scene capture. you cannot do this in one capture. you could compact the rendertarget and do some smart uv mapping to get it on screen, but the capture points are not lining up. it’s mirrored vectors not the direct view.

approximate representation of where scene capture points would land after the mirror projection.

you can’t do this accurately in one (capture) shot. hmm…

maybe find a nice fake technique. or prioritize the rear mirror for ease of development. old school car game mirror. or deal with the multi capture of lumen scenes. or cheapen the capture if you disable lumen in it. all the possibilities. : )

Yeah I want to set up multiple captures, either independent render targets or one render target 2d array. The problem is getting each of those captures to show on the associated mirror. The documentation for the Render Target 2D Array is sorely lacking.

I still haven’t gotten any answer or figured out how to get this working. Anyone? Surely someone has done this before.