I need to create a simple; proper mirror with sharp reflections. (I have a large outdoor scene with a miror-like sea). For outdoors sharp reflection like these the Reflection Environement and/or SSR don’t cut it quality wise.
In UDK this worked quite simply using the Scene Capture Reflect Actor, and feeding it into a texture with Screen Aligned UVs. This no longer exists in UE4. There is a Scene Capture 2D actor, but it doesn’t work the same way. For one it doesn’t update its capture view point acording to the player’s position. (ence why’s it’s called a 2D capture; and not a proper Reflect actor like in UDK)…
Is there any way to do this? I can’t believe there isn’t a way to do a simple mirror.
Thanks in advance for any help; as it stands my project is stuck in UDK just because of this…
Hey Aloys -
You can get an approximate effect using a Scene Capture 2D tied to your player’s Camera through a Vector Transformation. It is an approximation, but it will get you close.
Thanks I’ll give it a try!
Those screenshots look like the Content Examples scenes; but I just looked at all the Blueprints one and I can’t find it. Did I miss it or is that a scene of your own?
This was my own test bed. I use it to tet various issues we come across on the AnswerHub.
Few questions, as Im interested in this method. How does it know to orient around the object being used as the mirror? and also, what blueprint is this in and how did you get the scene actor 2d inside a blueprint aside from the Level Blueprint? Did you create it via blueprint inside the character’s blueprint and then reference it?
+1 to Grayve’s questions. Which blueprint does this go into, and how do you add the scene capture 2D node so that it works with the set world rotation node?
+1 AntSkilton and Grayve’s question. Could anyone provide some help please?
Hey Guys -
Sorry for not seeing your responses until now. I have setup a small test project with this particular effect running so you can see how I did it.
Thanks a lot! Looking for this for so long…GREAT!
many thanks! you’re a life saver
Ah not quite as realistic as I hoped the result would be, but it could be an interesting effect for somethings. I was hoping it would give relatively accurate reflections like screen space reflections do. There might be a different way to use that same concept to get more realistic results though
How can I remove player sphere in reflection?
In my sample from above, You would need to setup a new GameMode and New Player Character and New Pawn Class from the default versions in the engine. Assign them to the level via the World Settings and in the Default Pawn Class, check Owner Only See which will not allow the Render target to see the pawn but you will still be able to see it (assuming you are not just using the sphere in which case you could just Check Hidden in Game true as well.)
Hi Everyone, I tried all the examples about mirrors but no one “flip” the image like the real mirror do.
Someone know how to do it?
Hi ferpenas -
Plug a Texture Coordinate into the Render Target Texture in the Mirror’s Material and set the coordinate UTiling Value to -1 and the VTiling Value to 1. This will flip the image horizontally.
Thank you Eric, now it works perfect.
I ran into the same issue, the camera is just pointing back at the player so you don’t get bounced image like you actually would. I’ve update Eric’s BP to calculate the reflection vector (see Reflection Vector? - Rendering - Unreal Engine Forums). Along with implementing Eric’s image flip instructions above this delivers a fairly realistic mirror.
Thanks to have provided your file Eric, I’ve downloaded and modified a bit to have a more realistic reflection:
this is how I set the event graph of the blueprint
and then I flipped the captured scene on the material of my mirror
however setting it like this gives another issue: when you try to look at it by side you start to see the mirror itself reflected or, worse, behind the wall where is the mirror (it dipends on how you set the “Field of View” of the “Scene Capture Component” in the blueprint)
could it be possible to set a limit on the “Z (Yaw)” rotation result so that when you go too sided to the mirror it stop and you don’t see this error?
I tried both moving the “Scene Capture Component” respect to the mirror, and working with math operator in the blueprint (but for sure I’m not a blueprint genius so…)
could this be helpful in someway?
Yes add a Clamp for min and Max Allowed rotation on your Yaw. That should force the Max value to always be returned when the actual Yaw value goes over it (same for a min on the opposite side of the mirror.)
It worked! Thank you very much Eric!
I post the eventgraph modified to complete the example even for the others (the values of the clamp will obviously depend on the single projects)
However I hope epic will find a proper solution for mirror both on destop and mobile projects!