scene.environment, a blurred sky and a fallback
The first url does not exist: the catch block warns and uses RoomEnvironment. The second works. The sky is the same picture, blurred with backgroundBlurriness. (The 404 text is trimmed so the page's own address is not printed.)
Shiny metal shows its surroundings, not the light. An environment map is a picture of the surroundings, turned by PMREMGenerator into light and reflections. Without one, chrome is black.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Write the lines that load /data/3d/hdr/studio_small_08_1k.hdr and make it the scene's environment, falling back to RoomEnvironment if it fails.
How do you make the sky behind the bike blurred but keep the reflections sharp?
Explain it without notes
Why is a chrome ball black in a scene that has several lights?
What does PMREMGenerator do, and what happens if you skip it?
Console
Nothing logged yet.Expected console output
environment failed, using RoomEnvironment: fetch responded with 404: Not Found
source: RoomEnvironment | scene.environment set: true
source: HDR image | scene.environment set: true