Lighting Changes Upon Approaching Source

Ello,

So I have an issue even after building the lighting it has an omni directional dispersion and no shadows but when closer it has shadows.

(I’m not referring to lenses flare)

When I’m standing a distance away from the lighting it looks like this.

When I approach the lighting source it looks like this.

Is there any reason as to why I am having these lighting issues ? is it something to do with the mesh not blocking out the light when at a distance ?

Cheers in advanced.

If you mean the lens flares, you need to disable them in a post processing volume.

Ah, I can see how this has got mistaken for my issue.

I’m referring to the lighting having an omni directional dispersion and no shadows but when closer it has shadows.

Cheers

Hi Kuuwahi,

This is a bounds issue for the mesh that is occluding the light. Dynamic shadowing can be expensive to use with many lights. The engine optimizes this by not occluding shadows for point lights at larger distances. This is especially easy to see on point lights that are being occluded by something like the light fixture you have. To work around this you can try increasing the bounds scale of the light fixture to have proper shadow casting for this mesh. You can adjust this in the detail panel when you select the mesh. By default it’ll be set to 1.0. Try increasing by smaller values until you get the furthest distance where you need it to be visible. For instance, 1.05, 1.1, 1.15, etc. Increasing the bounds keeps this mesh rendering longer than it may otherwise need to and shadow casting. If you do this for a lot of meshes you will hurt performance. An adjustment here or there probably won’t be too costly. Just something to keep in mind.

-Tim

Hello,

Thanks for your reply.

Am I correct in saying this is the Positive / Negative Bounds Extension in the details panels on the Mesh itself ? As they’re all currently set to 0.0 and some of them I have to extend to 750.0 to get the desired distance.

Also is there another way to get around this and have that shadowed effect continuous without the resource usage?

Cheers

The static mesh editor does everything in Centimeters for a more precise setting for the radius bounds. This will affect every instance of the mesh placed in your world. If you select that specific mesh in the viewport of your scene view you can change the bounds scale. This is a multiplier so it doesn’t rely on specific cm values.

To get around the dynamic light issue culling its shadows you can alternatively use Static lighting so that the shadow is baked and you don’t have to worry about it turning off shadow casting at a distance. if you need it to be turned on and off dynamically you’ll have to do this to get the proper results. As I previously mentioned, if you’re doing this with every light, I would expect to see some performance loss at a certain point. If it’s just this one or a few instances it’s likely to be ok. Use the Bounds view from the Show > Advanced > Bounds.

Oh that Bounds view is brilliant thanks for that.

I do have many different lights in this scene so would you advised switching from Dynamic to Static as going through each light individually is a very tedious task, especially since you have to select, alter the number and deselect to see the result.

If you’re going to need to turn them off/on then dynamic is the only way to go.

If you need them to cast shadows for movable objects, but don’t need to turn them off/on then use a stationary light. This is the best IMO because you get the baked lighting that works for longer distances. You also get dynamic shadow casting for any movable objects that are within the lights radius.

Lastly, if you don’t need it to ever cast any dynamic shadows then just set it to static to get the bake lighting.

Hmmm,

I have no clue how to do static lighting as I have always left it on default / Dynamic.

I looked into Baking the lighting and I seemed to have read up it requires some editing with secondary UVs etc.

This is out of my area and I short time for this project so I doubt this will be do-able.

Cheers.

Sorry for the delay. Got caught up with GDC work last week.

Static Lighting does require the second UV for lightmaps. Typically if you’ve imported a static mesh this gets generated for your automatically so you don’t have to worry too much, but it’s understandable if you don’t want to worry about it.

Good luck on your project. :slight_smile:

Ah, If it gets generated automatically I would be inclined to learn how to do this then for future projects.

Is there any link or tutorial that you are able to point me towards that could teach me on this ?

Cheers

I have a Wiki that covers basic lighting troubleshooting which you can find here: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums

We have basic documentation on using lightmappings and it’s benefits here: Understanding Lightmapping in Unreal Engine | Unreal Engine 5.1 Documentation

And World of Level Design has a really in-depth tutorial on Lightmapping. It’s for UE3/UDK, but it still applies to UE4 since the system for static lighting has not been changed greatly during this time: UDK: Lightmapping Basics and 18 Important Principles for Creating and Using Lightmaps for UDK

Brilliant, They have been saved for a rainy day :slight_smile:

Thanks for your help and support.