Download

Best way to do dynamic reflections?

I am making a game where you fly down a river. Basically Im trying to make a mirror-like material with maybe a small bit of distortion. Right now I have a very basic mirror material as seen in the first screenshot.

a78729b81414d0a1185cc82648502d58e16473c8.jpeg

When I apply this to a large plane I end up with big areas of black showing up around the reflections:

ce47601912acc35511ab7b720f937da9b947f280.jpeg

Ive been looking into screen shot 2d actor but they dont update dynamically.

I am more interested in the reflection than being able to see through the water to the ground, or have refraction or any of that.

Thanks!

Hey, this is because you have no indirect light built into your light maps. This is one slightly confusing aspect of the default reflection behavior right now. Screen space reflections do not rely on ambient light so they will also ways show up even if you don’t rebuild. But screen space reflections can only reflect what came from somewhere on the screen which is why you get what appears to be vanishing reflections along the edge of the screen.

Outside of those screens space reflections it should blend to the static cubemap reflections.

The quickest way to get some indirect light is to add a skylight and rebuild lighting. Make sure that your skybox geometry is further away from the skylight than the threshold set on the skylight actor. Or just manually specify a cubemap. Then add a sphere cubemap capture actor and set the radius bigger than your water.

You can also use an the levels world properties and specify an environment color and intensity there. Or you could use an ambient cubemap inside of a post process volume.

In terms of making reflections fully dynamic, you can still use a full render to texture reflection it will just be pretty slow. In most cases, the screen space reflection adds enough motion that it makes the reflections feel dynamic enough.

Awesome! Adding the skylight and rebuilding the lighting seemed to fix it, but it did give me this error at the end:
“No importance volume found and the scene is so large that the automatically synthesized volume will not yield good results. Please add a tightly bounding lightmass importance volume to optimize your scene quality and lighting build times.”

So I added a Lightmass importance volume and that seemed to fix the problem. Not exactly sure what i did tho. What is a lightmass importance volume for?

Also is there a way to generate cubemaps from a scene that I have built inside the editor?

Also how much of this is possible on mobile?

Thanks again

A lightmass importance volume generates higher quality lighting inside its bounds, and thereby also improves rebuild times as the engine knows it has to spend less time on anything not within that volume.

If you want to make your own cubemap, you can do that with SceneCaptureCube. It is an actor, check the Class Viewer panel to find it. It will then require an appropriate texture to write to. I am not sure if this is covered in the documentation, but if not look up UE3 tutorials as this is totally equal to how UE3 did it.

Note it can have a serious impact on your FPS. You best not run this in real time.

The scene capture cube works fine for me if I am applying the reflective material to a sphere but doesnt seem to work when I put it on a flat panel on the ground to simulate water. Rotating it 90 degrees so it acts more like a mirror on a wall seems to work ok.

I tried sceneCapture2d and rendered to a texture on a flat plane on the ground but the reflections seem somehow distorted. I have the camera pointing up, level with the plane and centered in the middle of the plane. Is there a trick to scaling the plane properly?

Ive been playing dishonored bridgemore witches DLC which was made in Unreal and they seem to have really nice full screen reflective and refractive water.

Any ideas?

Can I ask if you can tell me how to add the Lightmass importance volume? I am brand new and am getting this error as well. Where and how do you add it? Thanks

Hi Airwaves,

You can add a Lightmass Importance Volume to your scene by using the modes section in the top left of the editor. You’ll find a grouping listed as “Volumes.” Find the Lightmass Importance Volume and drag that into your scene. You’ll need to scale this up to encompass your playable area of your scene. You can also use multiples of these volumes in your scene.

Here is some more information on the basics of Lightmass Importance Volumes.

If you need further help just let us know!

Thank you!

Tim

Thank you for that. I appreciate it.