What is the relationship between `AmbientColor::brightness`, Filament's IBL intensity, and Blender's background color strength?
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## How can Bevy's documentation be improved?
During Bevy 0.13's development, lots of attention went to `PointLight`, `DirectionalLight` and `Spotlight`. However, I failed to find any significant discussion of `AmbientLight` either on GitHub nor Discord. I'd be glad to be proved wrong if anyone's got a link though :)
The reason I care about this because the general consensus has been "let's try to have some kind of conformance with Blender", using Blender's EV100 and render outputs as direct references for how Bevy should behave. This worked out (mostly, there's still talk about Blender itself being wrong in places) for the lights mentioned, but `AmbientLight` kind of got left behind.
In Blender, under the tab "World", you can find the background light (aka environment light). The meaning behind its `strength` param is a bit elusive to me, and [the docs are not helping](https://docs.blender.org/manual/en/latest/render/shader_nodes/shader/background.html).
This is how Blender renders a scene with no lights and only a background light of strength 1:

This is how Bevy renders the same scene with no lights and an `AmbientLight` of the same color with brightness 1:

As you can see, Bevy is *much* darker. (Ignore the procedural sky and the glowing orb, I just modified Foxtrot for the screenshots because it was handy)
Let's bump the brightness to the [slightly magic constant 683](https://github.com/search?q=repo%3AKhronosGroup%2FglTF-Blender-IO%20PBR_WATTS_TO_LUMENS%20&type=code):

Better, but very blue.
https://github.com/google/filament/issues/1667 says that using Blender's exposure settings (which are Bevy's standard settings), the background strength should be the same as their IBL intensity, which I believe corresponds to Bevy's [`EnvironmentMapLight::intensity`](https://docs.rs/bevy/latest/bevy/pbr/prelude/struct.EnvironmentMapLight.html#structfield.intensity). I would love to test this, but I fail to create a valid environment map from a simple `Color` using `Image::new` since I keep getting an error like "Texture binding 13 expects dimension = Cube, but given a view with dimension = D(1, 2 or 3)" no matter what I do. I am not an expert in the `Image` API, so this is probably possible in some way.
Until someone confirms or denies this, my working hypothesis is that Blender's background shader strength corresponds to the intensity of an environment map with a single color.
Contributor guide
Research direction
Start with Bevy's AmbientLight and EnvironmentMapLight APIs and the Image::new reproduction described here; the issue provides no file or test path. Compare the reported Blender, Filament, and Bevy intensity behavior, then document a confirmed relationship or correction and a reproducible environment-map setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100