LookLightweight
Environment & IBL
A surrounding image lights the scene.
A picture of a room or a sky wrapped around the scene, lighting everything from every direction and showing up in reflections. This is what makes glossy things look real without placing a single lamp.
- Breaks when
- HDR files are largewrong color space washes everything out
- Also called
- HDRI, envMap, PMREM, RoomEnvironment
Prompts
Reflections that look expensive
Three.js: load a 1K HDRI (studio_small_09_1k.hdr) with RGBELoader, run it through PMREMGenerator, set scene.environment (not scene.background) and keep a plain color background. Two spheres: chrome (metalness 1, roughness 0.05) and matte (metalness 0, roughness 0.7). Rotate the environment with scene.environmentRotation from the pointer so highlights move without moving the camera. Compare the result with the built-in RoomEnvironment and say when each is enough.
Procedural environment, no file
Build an environment map in code: render a small scene of emissive rectangles and a gradient sky into a WebGLCubeRenderTarget once at startup, then use it as scene.environment. No HDR download. Explain the resolution/quality trade and why PMREM still matters.
Fix the wash-out
This scene with an HDRI looks blown out and pale. [paste]. Check texture.colorSpace, renderer.outputColorSpace, tone mapping and exposure, and envMapIntensity, in that order. Fix it in the fewest lines and show the corrected values.
Related
Resources · 2
- glTF Viewerdonrmccurdysite · code · demoMay 25, 2026
- three.js example: HDR environment mapsmrdoobsite · code · demoMar 18, 2026