Change Skylight Intensity at Runtime

Hey there!

I would like to be able to make a BoxCollision which works as a PostProcessVolume because the PostProcessVolume has missing Features:

If the Player walks into the Volume, I want to set the Skylight intensity to 0. Unfortunately with the AmbientCubemap Feature from the PostProcessVolume I only can make the Skylight Brighter, not darker.

294881-ambiencubemap.png

So I need to make a Blueprint which does this job. But I want a soft transition like the Post Process Volume has.

294882-blendradius.png

The Radius would be quite big, so only a timed delay for a soft transition wouldn’t work.

Would anyone know how to solve this problem?

What about a collision volume which measures the distance of the player to it’s center and adjusts the skylight accordingly?

So you can have a BP containing a collision volume which by default has tick turned off.

When the player overlaps, tick starts and the skylight intensity is adjusted in accordance with distance from center.

When the player stops overlapping, the skylight is set to normal and tick is turned off again.

That would be my last option because it would make everything in my level extremely complex…
I want the Player to enter a location and the player should walk deeper into the location, I would have to place many blueprints, and of course, the Player would leave one blueprint and the settings shouldn’t get set back to default. Only when the Player leaves the complete location.

I am curious, what is the best (performant) way to activate Tick by overlap?
Only using a branch to block the tick wouldn’t be too great performance-wise…

Just start tick on overlap.

You don’t have to use tick, you could start a timer on overlap and kill it when the player leaves.

Each second ( for example ) the distance of the player from the center is measured and the skylight adjusted accordingly.

It’s easy to do and performant.

Have you looked into Blendables yet? Using several post process volumes with the ‘distance from center’ basis of skylight intensity change, all of which overlap at specific extents to cover the whole location, would probably be easier than utilizing a tick operation or by-the-second calculation. The blendables are applicable to materials, so they could also be used to adjust some of the location’s post process settings along with the skylight intensity changing.