Changes to Skybox Lighting After 1.51.0

Hello everyone,

I’m assuming it’s because of this PR: Refactor environment lighting by slimbuck · Pull Request #3783 · playcanvas/engine · GitHub, but a number of materials in my scene that rely on skybox lighting got a lot darker after the update

Here is an example in 1.50.2:

and the same in 1.51.5:

Unfortunately I can’t share the project publicly, but any pointers on how to brighten my materials again would be greatly appreciated. @yaustar suggested I ping @slimbuck for input.

Hi @eproasim,

One of the changes we made in the PR you referenced, is to correctly calculate environment ambient lighting. We were previously using a blurry glossiness as ambient. The new calculation usually doesn’t change ambient significantly, but perhaps in your case it does.

It is possible to generate ambient using the old method (see here).

I created a quick example which generates legacy ambient on the scene, then flips between old and new lighting. Check it out here.

Feel free to fork that project and try it with your own cubemap.


1 Like

Hi @slimbuck !

Thank you for the information. I will fiddle around with the cubemap to try and use the legacy calculations.

Is there a plan for the legacy lighting to remain in the engine? Or is it considered deprecated and marked for deletion?

Most likely yes. :slight_smile:


@slimbuck yes to which of the two options? :sweat_smile:

1 Like

Oooops. Updated post to actually make sense!

Hi @slimbuck !

So I tried out the method of regenerating the prefiltered atlas, and eventually even copying your script because I could not see a difference. When I copied you script, I could see the change, but it was pretty subtle. Were there other changes that could be affecting the skybox light that I might be able to play with? The materials still appear correctly in 1.50.2

Hi @eproasim,

Unfortunately it’s almost impossible to say without being able to inspect the scene and compare differences. If you’re able to create a slimed-down scene that we can investigate further that would really help.