HDRI (High Dynamic Range Image)
Definition
An HDRI is a 360° image containing lighting and color information from a real-world environment.
Unlike JPG or PNG images, HDRI stores:
- Bright sunlight
- Dark shadows
- Light intensity
- Reflection information
Why Use HDRI?
HDRI helps objects understand:
- Where light comes from
- How bright the scene is
- What should be reflected
Real-Life Example
Imagine holding a shiny spoon.
The spoon reflects:
- Ceiling
- Fan
- Windows
- Lights
A 3D object needs the same environmental information.
HDRI provides it.
Benefits
- Realistic lighting
- Better reflections
- Professional product renders
- Natural shadows
Import:
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader.js';
Example
const loader = new RGBELoader();
loader.load('studio.hdr', (texture) => {
texture.mapping =
THREE.EquirectangularReflectionMapping;
scene.environment = texture;
});