Download

Mirrors

Hi Every One
Im new in Ue4 and im trying to create a simple mirror material

Take a look at this thread: mirror material creation - Content Creation - Unreal Engine Forums :slight_smile:

"There is a level called Reflections in Content Examples project. Open it and then head to 1.7.

What you see there is a SceneCapture2D actor facing the direction you want reflected. Once you set it up, create a TextureRenderTarget2D in the content browser and insert it to SceneCapture2D’s Texture Target. And then use that texture in the material of your mirror mesh. You can also see the material setup in that same project. "

Hi all, I am a newbie in UE4 as well trying to do a crash course fora University project.
I have managed to create a mirror and I have managed to hook my Kinect to where I have real time animation (albeit a bit jerky)
I would like to create a mirror room … 1 mirror is functional, now I would like to have 2 next to each other at 90 degrees.
Both mirrors reflect the same reflection. The mirror to the right of the Avatar shows correct reflection but the mirror behind the Avatar does not (it should reflect the back of the Avatar). thought creating target texture instances would solve the problem but it does not … is it even possible to do independent SceneCaptures and have each mirror show the proper reflection?
b9484205f9e5841e44b582874f58533c5ff54da8.jpeg

I think the answer might be in a blueprint but besides being new to UE4 I am not a programmer either.
I am about to give up on my little infinity room project so any help at this point would be greatly appreciated.

You don´t need Blueprint. But you need two separate RenderTarget-Textures.
It´s possible to make endless mirrors :slight_smile:

Hey there, thanks for your reply
I tried your suggestion but it does not seem to make a difference …
I made instances of all the textures and materials used and renamed them as you can see in the image.
Is it because I made instances versus copies?
ff91257889a0d0054cec72bea947065ca7f2fb36.jpeg

Hmmm, SceneCapture2D appears to be a bit buggy.
After reopening the level I now have 2 green screens but I can see in the Scene Capture that the target texture is working correctly …
It is just not updating in the main window but mirror 2 shows the avatar from the correct side view …
Guess I’ll have to rebuild the mirrors again from scratch, grrrrr
309b3cef2ac69a05c06636747fe40d7597a35596.jpeg

Hey Mars007,

I finally managed to get it to work. I figured out that I needed to do the following steps:
CAMERA
1> Create a new SceneCapture2D: Models > All Classes > Scene Capture 2D > drag drop in view port where needed
2> Create Render Target: Content > R-click in Filter section > Create Advanced Asset > Materials & Textures > select Render Target > rename the NewTextureRenderRaget2D > Place as Texture Target for SceneCapture2D
MIRROR
3> Create mirror surface form Static Mesh
4> Create NewRenderTarget_Mat for mirror: R-click on NewTextureRenderRaget2D you just created > Create Material (creates a new material using this texture) > rename (very important, will not work without this step) > Place as Element 0 in the mirror material section

The reason I kept getting the wrong result is because I tried duplicating materials or create instances from existing materials and simply renamed them. When I finally figured out step 4 is when I had my correct mirror reflections.
Minor detail for the UE4 pro’s but major detail when you are just starting out.

Thanks for the setup Mars007,
As you can see from the image I still have some tweaking to do but now I can move on to the next hurdle :slight_smile:
I might just have to move onto a cave environment, Unreal seems to excel in those:)