Download

Thunder light issues

Hello everyone,

I have a Directional Light in my map, i want it to have an impact on my game **ONLY **when the blueprint i’ve made order to switch on the light to cast a light (thunder storm like light)…

Actually my Directional Light is set to Visible “true” & **Actor Hidden in game **also “true”, so in the blueprint, i use “Set actor Hidden in Game” to “**false” **less than 1 s and then switch to true, to make a thunder storm light effect.

The problem is that when i’ve build lightning, there is many mesh who is affected by this light, and also in some building ! For exemple in a house there is an inside door, who reflect the light… & even if “Actor Hidden in Game” is selected…how can i please solve that ?
Any option in the Directional Light settings ?
Or make a blueprint instead of using a Directional Light ?

Thank you all :slight_smile:

try setting visablity to off instead of actor hidden in game. when you build lighting, you are " in editor" not “in game” so lightmass calculates the light from that actor. so, default will be visability checked off, and the blueprint will enable visability for the duration of the lightning, then set visability off again. it should have the same effect for the lightning but also allow lights to be built properly.

Hello, thanks for the reply !

I first tried this…but i don’t find the way to set enable visibility in a BP :confused:
Maybe you can help with this ?

So i put the light into “movable”, so it will not be taken into account in the light building, do you think it’s a good idea or not ?

Thanks a lot :slight_smile:

I’m confused. Why would you operate a thunder with a directional light?

Regardless. Copy the settings. Delete the light. Build lights. Create the direction light again. Make sure you set it to movable and it should remove the build warning message.

For thunders. Usually you’d make an emissive material on the mesh you use for the thunder if you need it in 3d.
otherwise you’d spark the intensity of the Skylight for a few milliseconds and return it to normal (in conjunction with a skysphere material change/update). That’s because skylight handles interiors as well.

Or, last but not least, a niagara particle effect scripted for some random branching of a billboard like mesh.
That could turn out to be complicated to build, but possibly the cheapest result that actually provides illumination via the material - and a randomized looking thunder.

**skylight **should never be used to simulate lightning, as lightning is directional lighting. you don’t want the basement/cave/closed off room lit up from a bolt.

OP drag a wire from the light in the bp, type “set visability” for the node :slight_smile:

Edit: also OP you can set the light to moveable and under cascade shadows set dynamic shadow distance to 0, enable distance field shadows and set the distance to cover the map. that will give you nice cheap shadows so the light doesn’t cost much in terms of shadows when it’s on, and also make sure the light doesn’t go through things it shouldn’t. you will also have to enable distance field lighting in project settings>rendering>lighting

Or you may want caves and other places to light because of thunder. It really depends on your setup / artistic direction.

Overall, the double directional light idea is probably the best since a thunder is after all a different source of light altogether then directional light (Which would really be taken care of by the emissive material in a perfect world setup).

Hello guys, Merry Christmas for all. :slight_smile:

Thanks a lot @ixicalibur and [USER=“3140864”]MostHost LA[/USER] for your good help, i appreciate !