Light flickering on nearby static mesh

I have a blueprint which contains a static mesh object of a candle, and it also contains a point light about a foot above where the candle flame is. At a distance of about 6 feet away, the shading on the static mesh from that light changes drastically- in a rather unappealing way.

How might I go about fixing this? Here is a video of the problem: - YouTube

Hi Hypersapien,

This is because the mesh is no longer occluding light at longer distances. This is an optimization that is done by default to help keep performance from being tanked by lighting small objects that are at farther distances. Understandably this may not always be ideal and using something like subsurface in your material can make it more prominent in your scene where as using a default lit blend mode would not.

To workaround the culling of smaller objects at distances you can increase the bounds scale of the object so that it occludes light to further distances. If you select the mesh and then in the details panel you will see the option for “Bounds Scale” you can set this to a higher value. I would only increase it my single decimal points until you get your desireable distance. You can visualize the bounds scale by selecting the mesh and then in the Viewport go to Show > advanced > Bounds to see the bounds for an object.

I hope this helps.

Tim

Thanks! I will try this when I get home tonight. Fortunately, I don’t need to increase this distance very far before I am in an adjacent room and can’t see those candles anymore. I am optimistic about this fix. Thanks again =)

This solution worked for me, thank you!

The value I ended up needing to use was 5, and since you suggested only increasing by decimal points I am a little concerned about that magnitude of an increase. If the geometry I’m altering in this way is minimal in it’s poly count, but there may be dozens spawned in the level at any given time (though perhaps only half a dozen in line of sight at any given time)- should I be worried about optimization?

I tend to stay conservative with the values I’ve used because when you increase the bounds this can cause an item to stay rendered longer than it may need. Also, since this answer may be useful for someone else in the future I try to suggest smaller values because there can be an impact. If I err on the side of caution then hopefully others will to.

For a little more context to why I suggest the smaller values to start with. The bounds of an object is used for Occlusion and Frustum culling in the editor and not just lighting. So for instance, If I have a wall in front of that object and I were to increase the bounds exponentially, then yes it would solve some longer view distances, but since the bounds have now been scaled, this means that the object will be rendered even if you went around a corner, but the bounds were still in view of the camera. For a small object and some instances I wouldn’t see this being a problem, but I wouldn’t suggest anyone to really up this for all the objects in their scene. It can be hard to grasp the outcome of a solution sometimes without the understanding of these other systems and how it will affect them performance-wise, but in your case for this type of situation and depending on the distance you need this object to occlude light a value of 5 should not be that much of an issue, even with a few dozen of these.

I hope that helps explain it, if you have any follow-up concerns or I need be more clear I can help. :slight_smile:

Thanks, Tim. That makes sense. Perhaps when my level is more fleshed out with additional geometry I can stage the scene such that these objects are not visible at long distances. Then I would be able to reduce that number.