Afer trying to make and failing a mirror in my bathroom for 1 month, I decided to make it with Scene Capture Cube and Render Target but I have a problem with this. Finally I created an mirror that its reflecting but the illumination or enviroment lighting is not matching with my real-time interior. Am I missing something?
you really wanna do that? with a cube capture you’ll render 6 more lumen scenes. your gpu may cry for help.
in the scene capture’s postprocessing settings just enable lumen in the GI box. and in the lumen GI settings enable scene capture cache resolution scale. it only works with a scale of 1.
you’re talking about this section right? its already scale of 1 but nothing is changed.
also, I do not want to do that but I just ‘‘have to’’… because none of the other solutions for my mirrors are not working… and, I unchecked the box of ‘‘capture every frame’’ (unfortunatelly). so, my gpu is not crying anymore
it’s basicly re-rendering an entire scene into a render target. it’s like a viewport render. in this case of a cube map capture, it will render 6 scenes. 1 for every cube face. and… the way your blueprint is setup it will still render every frame cause i assume you didn’t untick render on movement. that means… it will render on movement. and… you’re moving the capture location every frame.
okay. i thought it’s the same for all capture components. looks like the cube capture doesn’t support postprocessing. means… you can’t enable lumen in it.
if you don’t move it, you don’t need the blueprint, btw. it’s gonna be a static reflection.
not by default. you gotta do some blueprint math to get the capture source to reflect and reproject correctly. i was working on that. it’s not finished yet tho. i’ve never coded that. so…
Yes. In that video they are using a blueprint to move the capture component based on the player camera position. They say in the video description what they did. There are some issues with this kind of technique in more complex scenes, but you’ll have to try and see if they’re an issue for you.
Lumen has no effect on how this works, beyond you needing to enable it in the capture component.
lumen works for 2d captures. it doesn’t work in a cube capture tho. you cannot enable it, cause the component has no post processing settings in 5.3.2. my guess is epic decided to nuke the possibility to even try that. i reckon it’d be a lil too expensive to render it all with lumen enabled.
i’ll devote more time to get this clean 2d mirror, eventually. it’s a lot of math tho. you need a reflection vector, field of view math and a clipping frustum to get this to work. it’s like a portal. it’s been done. not by me tho. valve knows how this works. yeh…
I know - what I mean is that making a mirror with scene capture bp works exactly the same whether you are using lumen or not, except that you would need to enable lumen on the capture to match the scene.
I have, in the past, modified the cube capture component to allow lumen and it worked fine and performance impact was less than expected - although I needed it to make offline cube maps so the runtime cost was irrelevant.
I downloaded his mirror demo project with blueprint but perspective is not worked with me idk why. something is wrong but I do not know what is that… should I check smthng? can you help me with this? because if I can make it, I’m done with everything.
Necro-posting this, since I was looking for a way to create a perfecct 1:1 reflection with lumen and all, and I found out the mirror demo project posted up here. I opened it with unreal 5.4, but I think it was made with unreal 4.8 or something old like that, so you need to fix it a bit.
Open the Mirror BP and create a SceneCaptureComponent2D in the mirror blueprint and reference that instead of the default “SceneCapture” variable. Remember also to set the same render target in the new SceneCaptureComponent2D. Then just swap the two set actor location and set actor rotation with a compatible version with the newly created SceneCaptureComponent2D (drag a pin from the variable in the graph and search for “set world location” and “set world rotation”), and then, in the scene, delete the original scene capture actor. Now everything should work.
There’s a little misalignment at the bottom of the mirror as you move, and the movement is a bit jittered, but I think that could be due to some offsets between the scene capture and the mirror plane, or the use of world instead of relative location and rotation. I should investigate more, but for now it’s good enough for me! Good luck!