Dynamic objects black bottom with static lighting

Hey everybody,

I’m currently working on a VR project and for this we’re required to use static lighting. We have one issue which we can’t seem to resolve. Our dynamic objects are lit fine for the most part by the “Indirect Lighting Cache Sample Grid” but the bottom of the objects is always 100% black. It does not receive any bounced light.

Some things I’ve tried:

  • I set the skylight lower hemisphere = black to false.
  • I’ve added a directional light which faces straight up to light the bottom of the dynamic objects but this had no influence.

The scene is an outdoor landscape with a directional light and a skylight. All static objects are lit just fine and receive bounced light.

Can anyone help me out?

Thanks,
Frank

Hey FrankVanguard,

Is you directional light actor set to Stationary or Movable? The indirect lighting cache will not be available as dynamic indirect if you are using a Movable Directional Light.

Could you provide me with some screenshots of the issue so I can visualize what you are reporting?

Do you happen to have a way to reproduce this issue in a blank project and provide me with steps so I can get it to occur on my end?

Let me know if you have further questions.

Thanks,

Hey Again,

After changing some settings in our scene it became a bit better but we’re still having problems. In the following screenshot you can see the problem.

Both spheres are movable objects. The Lights are all static and the lighting has been build. As you can see from the screenshot the sphere which is underneath the floating geometry has a lighter bottom than the sphere in front. I would expect the sphere in front to be less dark on the bottom half as more light is being bounced on it compared to the sphere in the back.

Is there any way we can resolve this besides using hacks?

Hey FrankVanguard,

So your issue here is pretty straight forward, and is highlighted in our documentation. Movable objects cannot account for static lighting as they are completely dynamic (dynamic lighting and shadowing).

I would definitely suggest taking a look at the [Light Mobility][2] documentation to better familiarize yourself on how each light mobility type functions, and which actors can integrate into static or dynamic lighting and shadowing.

For your particular issue, since you would like movable objects and static shadows, use the ‘Stationary’ mobility type.

Let me know if you have further questions.

Thanks,

Hey Andrew, I understand that there’s no interaction between static lights and dynamic objects.

From my understanding dynamic objects are lit by the “Indirect Lighting Cache” when no movable or stationary lights are present. This seems to work, when we move a movable object in a dark area it becomes darker, it’s just the bottom lighting of the movable object which becomes very dark.

Link to the indirect lighting cache: Indirect Lighting Cache | Unreal Engine Documentation

Thanks,
Frank

So this is correct, but indirect lighting is used for things like contact shadows.

Also it looks like you have two Directional Lights, both with their indirect lighting intensity set to 1, which means your indirect lighting is going to be bright. This is exactly what you are seeing.

I did a test in my scene, and I am getting expected results.

Above I have set all the objects to ‘Movable’ and the lighting to ‘Static’. You can see how the shadows are no longer there, and the image seems flat. However, when you get close enough, you can see the contact shadow from the indirect lighting on the bottom most sphere.

Movable Object - Indirect Lighting/Shadowing

79441-movablesphere.png

Although it is faint, you can see the contact shadow below the sphere when it is set to ‘Movable’.

Above, I have set the platforms to ‘Static’ so they can be integrated into lightmass. As you can see, they cast shadows on the spheres and the indirect lighting is more apparent at this step for the spheres.

The final image, you can see how after setting all the objects to ‘Static’ the spheres are rendering as expected as well. Darker overall lighting and with indirect lighting and shadows with contact shadows.

Your issue here is just further understanding on how mobility of lights and objects interact with the lighting environment. Notice how I used a white color to get the full bounce from the indirect lighting bounces. The color is absorbed on the first bounce, and what isn’t absorbed gets projected back into the environment as another light bounce until all the set light bounces have been reached.

Let me know if you have further questions.

Cheers,

Hi again Andrew,

I’ve created another example scene to show the issue we have.

In the following screenshots you can see 2 spheres (both movable), the rest of the geometry is static. One of the spheres is in the shadow while the other is not. There’s 1 skylight which is set to static with intensity 1 and one directional light. In these 2 shots I’ve set the intensity of the directional light to 15 in the first screenshot and 2 in the second screenshot. Before both shots were taken I did a light rebuild.

The higher the intensity the directional light, the darker the bottom of the right sphere becomes. I would expect the bottom to become more bright instead of darker as more light would get bounced. The sphere which is in the shadow doesn’t become as dark underneath compared to the one which isn’t in the shadow.

As you can see from the shots, the bottom of the static geometry does get brighter due to more bounced light with a higher light intensity for the directional light.

Thanks for all the help thus far, I hope you can point us in the right direction. Using stationary lights isn’t an option for us due to performance requirement for our VR project.

So, my previous post explains why you are seeing the issue. The reason your object underneath the platform is brighter after building your lighting is due to the fact it bounces off the floor, then the ceiling of the floor above the sphere, then back down, and back up again. Further illuminating the object.

The sphere on the right only gets a single bounce from the floor beneath it, and then no consecutive bounces as the initial bounce flies into the sky. In regards to the VR performance, you can use a Stationary light, as it supports baked static lighting as well. You just need to make sure to edit the CSM (Cascaded Shadow Maps) so your performance is not impacted. This is highlighted in the VR guidelines documentation.

I would definitely take a thorough read through both the Rendering and Graphics section as well as the VR section to get a solid understanding of not only how lighting works in UE4, but also how to optimize your projects when creating content for VR.

Thanks,

Hi Andrew,

Thanks for the explanation, the sphere underneath the platform does indeed receive more bounced lighting and thus becomes brighter.

I’ve tried to use a stationary light but this has an impact of around .6 to .8 ms in our render target scene, this might not seem like much but on a budget of 11ms (90 fps) it’s too much for us. I’ve disabled Cascaded Shadow Maps for maximum performance.

I’ve gone through the rendering and graphics documentation before and done so again today but I still got a question:
In the screenshot with the directional light intensity set to 15 the bottom of the right sphere is darker than with a light intensity of 2. I would expect that with more light intensity more light gets bounced and thus the bottom of the sphere would be brighter as well.

See the attached image:

Thanks,
Frank

To have stronger Indirect Lighting, you need to increase the Indirect Lighting Value on your Directional Light Actor. The intensity is just the direct brightness in lumens, and doesn’t have anything to do with the indirect lighting strength. You can also increase the number of light bounces within the ‘World Settings’ under ‘Lightmass’ section.

As I mentioned before, ‘Movable’ objects do not account for bounced indirect lighting, but rather sample the indirect lighting cache to approximate the indirect lighting values. I hope this clarified your question.

Cheers,