Activate Lights as Character gets close

I am making architectural visualizations for large projects with a lot of individual lights. I have been unsuccessful in creating lightmaps for most of my objects. Like walls for instance, would involve me having to unwrap and bring in individual walls, which would result in thousands of walls. Because of this, I am having to use dynamic lights and not be able to bake static lights. As I start adding a lot of lights this slows down my level.

Is there a blueprint strategy to turn off certain lights until my character gets a certain distance from them? That way the level is only processing the lights near me, and not some other random lights across the level that don’t matter? So say when I get within X distance to a light, it turns on, and when I leave X distance, it turns off. I have a feeling I can do this with triggers, but then I would have to create a ton of triggers throughout the model.

That should be fairly simple to implement. If you don’t want a bunch of extra actors in your level you could simply replace the lights themselves with blueprints that contain the light and the switching logic.

But first you might want to find out if this can’t be solved another way. For example there is no need for individual walls when baking to lightmaps. Just make sure that larger models have appropriately large lightmaps to have enough detail.

Another thing to try: Do the lights have shadows? Lights themselves are not that expensive, in a deffered renderer like UE4 their cost mainly scales with the number of pixels they touch, making far away lights quite cheap. So if you limit their radius you should be able to have hundreds of lights visible. Dynamic shadow casting lights on the other hand have far more overhead and as such are far more expensive to render. so maybe you just have to be selective with your shadows. (Or switch those off instead of the complete light)

Sorry for the long delay. I just haven’t had much success with getting the lightmaps right. I seem to be able to get them unwrapped fine in 3DS, especially using the SteamRoller script. But once I get the model into Unreal, I get lost with setting UV channels or UV channel coordinates. Then, every time I bake my lighting, I get the weird patterns on my objects.

My interior lights do not have shadows. And I limit their radius to be pretty small. That has helped a little. So it seems like my bigger problem is my directional (sun) light and my skylight, that are set to dynamic, because I can’t set them to static because I can’t bake my lights right.

Because of all of this, my FPS is hanging around in the 20s, which is definitely not ideal, and really bad for any VR experience.