Voxel lighting - Glass reflections are too bright

https://i.gyazo.com/3a35e637fe5e626eaa7b44cc45fa49ef.mp4

Not really a bug, just bad behavior

What color are you changing?

I’m changing OutdoorAmbient, with Ambient set to 0,0,0 and Brightness set to 0

It’s not clear to me what should happen here. OutdoorAmbient is the ambient light coming from all directions from the sky. It’s different from regular Ambient in that it is propagated downward from the sky through our voxel lighting grid, not passing through opaque objects. If you make your OutdoorAmbient black, but your skybox is still bright blue, we have two conflicting sources of truth, and it’s not clear to me which one we should trust. The black OutdoorAmbient says “there is no light coming from the sky” but the skybox says “there is blue light coming from the sky in the pattern of this image.”

I’m not sure of any situation where this mismatch is desirable. If there are use-cases, we can possibly improve our API.

Btw, your video looks particularly bad because the glass is reflecting the bottom half of your skybox, which is bright blue. A rendering solution to this short of ray-tracing is difficult. So in any game with reflective objects, I recommend picking a skybox whose bottom half looks similar to the rest of the ground in your game. This way, reflective objects will appear to reflect the ground instead of the unrealistic bright under-half of the sky.

1 Like

It should follow the lighting grid, not any specific value. If I have glass inside a building and glass outside a building they should look totally different without me needing to hack around with global environment settings.

1 Like

I completely agree. That’s why the behavior you describe is exactly the behavior we implemented.


^ Behavior with either Legacy or Voxel technology, currently live.

When glass is outside*, it reflects the skybox. When inside, it reflects** whatever light is near it.

*“Outside” is a value 0 to 1 approximated by some extra numbers stored in the voxel grid. The skybox reflection is blended with this weight.
**Indoor light reflections are very hard to approximate with the current voxel-based lighting. Quality will improve slightly with phase 3 of FIB.

2 Likes

Indeed working as expected :

repro of glass behavior

BUT … well like @Sharksie said , the behavior at total pitch black darkness, is rather unpleasing… :

repro with default skybox

though indeed switching to an appropriate skybox “fixes” that:

better skybox