WEBPery

HDR

.hdr

Radiance HDR from 1989, an early high-dynamic-range image format still widely used for 3D environment maps and image-based lighting workflows.

specializedlossless

Origin and purpose

HDR (Radiance HDR, file extension .hdr or .pic) was developed by Greg Ward in 1985 as part of the Radiance lighting simulation system at Lawrence Berkeley National Laboratory. The format was the first widely-adopted way to store images with intensities exceeding the 0-to-1 range that standard formats assumed.

Radiance is a physically-based lighting simulator used for architectural lighting analysis, daylighting studies, and global illumination research. Simulating real light requires storing real intensity values — a 100-watt bulb is not "white"; it has a specific luminance in candelas per square metre that may be a thousand times brighter than the matte surface it illuminates. Standard image formats couldn't represent that dynamic range.

The HDR format encoded high-dynamic-range pixel values in a compact, lossy-but-precise format that fit the needs of the time. It dominated HDR imaging for nearly two decades until OpenEXR arrived in 2002 with more capability and broader industry support.

Today, the Radiance HDR format remains in use specifically for image-based lighting (IBL) — environment maps used to illuminate 3D scenes in offline and real-time renderers.

File structure

A Radiance HDR file consists of:

  • Magic identifier (#?RADIANCE or #?RGBE) — first line.
  • Header lines — metadata as key=value pairs (FORMAT, EXPOSURE, GAMMA, comments).
  • Empty line — marks end of header.
  • Resolution string — encoding the image dimensions and pixel order (e.g., -Y 768 +X 1024).
  • Pixel data — RGBE-encoded pixels, optionally run-length-compressed.

The format is unusual in being partly text-based: the header is human-readable ASCII, while the pixel data that follows is binary. This made HDR files easy to debug in the era when image-processing tools were less sophisticated.

The RGBE encoding

The defining technical innovation of Radiance HDR is the RGBE pixel format. Each pixel is stored as four bytes:

  • R (1 byte) — red mantissa.
  • G (1 byte) — green mantissa.
  • B (1 byte) — blue mantissa.
  • E (1 byte) — shared exponent.

The actual RGB value is computed as:

R_actual = R / 256 × 2^(E - 128)
G_actual = G / 256 × 2^(E - 128)
B_actual = B / 256 × 2^(E - 128)

This is a custom floating-point representation that shares one exponent across three channels. The result is an effective dynamic range of around 76 orders of magnitude (10^38) in 32 bits per pixel — a remarkable density for the era.

The trade-off: the three channels share a single exponent, so the precision degrades when the channels have very different magnitudes. A pixel with bright red and dim blue gets the blue value quantised more aggressively than the red. For lighting reconstruction this is usually acceptable; for general HDR photography, OpenEXR's per-channel float representation is more flexible.

Compression

The format supports run-length encoding of pixel scanlines. The RLE is simple: consecutive runs of identical bytes are encoded as a count plus the value. For environment maps with large smooth regions (sky, walls, neutral lighting), this compresses well. For complex content, the compression saving is modest.

There is no DCT, wavelet, or other sophisticated compression. The format predates the techniques that would have allowed more aggressive compression of HDR content.

Modern relevance: image-based lighting

The dominant use case for HDR files in 2026 is image-based lighting (IBL):

  1. A 360° HDR environment is captured (with a HDR camera setup or a chrome-ball capture and HDR merging) or downloaded from libraries like Poly Haven.
  2. The HDR environment map is loaded into a 3D rendering tool (Blender, Unreal Engine, Unity, Maya, Houdini).
  3. The renderer uses the HDR data to illuminate the 3D scene — bright areas of the environment cast bright light, dim areas cast dim light, and the colour tone of the environment is reproduced naturally.

This produces dramatically more realistic rendering than synthetic light sources alone. Studio product photography, architectural visualisation, automotive rendering, and game environment art all rely on HDR environment maps for natural illumination.

The Radiance HDR format remains common for these environment maps because:

  • It's simple to parse — Radiance HDR support is straightforward to add to any renderer.
  • Files are smaller than equivalent OpenEXR at similar dynamic range (though OpenEXR offers more options).
  • Decades of free and commercial HDR environment libraries ship in HDR format.
  • The format's age means it has the broadest tool support in the IBL niche.

HDR vs EXR

The two HDR formats coexist in different roles:

AspectHDR (Radiance)EXR (OpenEXR)
Year introduced19851999/2002
Dynamic rangeExcellent (10^38)Excellent (HALF: 30 stops, FLOAT: 80)
ChannelsRGB onlyArbitrary (RGBA + AOVs, depth, etc.)
Per-channel floatShared exponentIndependent per channel
File sizeSmaller for simple casesLarger but more flexible compression
Multi-part filesNoYes
Tiled storageNoYes
Industry standardIBL / lightingVFX / film production
Tool supportUniversal in 3D toolsUniversal in VFX tools

For image-based lighting and reference HDR captures, both formats work. HDR is often the default because it's simpler and files are smaller. EXR is preferred when the lighting workflow integrates with VFX production where EXR is already standard.

File size

Rough file sizes for a 4K equirectangular environment map (4096×2048):

  • HDR (RLE compressed) — 10–25 MB.
  • EXR (HALF, ZIP compressed) — 20–60 MB.
  • EXR (FLOAT, ZIP compressed) — 40–120 MB.
  • EXR (HALF, DWAA lossy) — 5–15 MB.

The HDR format's compact RGBE encoding produces smaller files than EXR for the same content when no lossy compression is acceptable. For environment maps that will be sampled by a renderer (not viewed directly), the compactness is a real benefit.

Browser support

Web browsers do not render HDR files. No major browser displays .hdr content via <img> tags. For web delivery of HDR-derived content, the workflow is:

  1. Tone-map the HDR to a standard-dynamic-range image.
  2. Encode to WebP, JPEG, or PNG.
  3. Or encode to AVIF if HDR display is required and the audience uses HDR-capable hardware.

For 3D rendering on the web (Three.js, Babylon.js, native WebGL/WebGPU), HDR environment maps can be loaded as raw HDR files and used for image-based lighting. The renderer parses the RGBE encoding directly and uploads to the GPU.

Conversion guidance

For getting HDR content into web formats:

  • oiiotool (OpenImageIO) — supports HDR input and output:
    oiiotool input.hdr --tonemap reinhard -o output.jpg
    
  • ImageMagick — supports HDR reading:
    convert input.hdr -quality 85 output.jpg
    
  • Blender, Maya, Photoshop — open HDR natively; export to any standard format with tone-mapping options.
  • HDRShop, Photomatix — dedicated HDR processing tools.

Tone-mapping is the critical step. A naïve conversion from HDR to LDR clamps everything above 1.0 to white, losing the highlights' tonal detail. Tools like Reinhard tone-mapping, Filmic tone-mapping (used in Blender), and ACES (the cinema standard) compress the HDR range into LDR in a perceptually pleasing way.

When to use HDR today

Choose HDR (Radiance) when:

  • The use case is image-based lighting for 3D rendering.
  • The pipeline doesn't need the extra channels EXR provides.
  • File compactness matters and lossless storage is required.
  • You're working with environment-map libraries that distribute in HDR format.
  • The receiving tool has better HDR support than EXR support (rare in modern tools, but happens in some game engines).

Choose EXR when:

  • The pipeline is VFX or film production.
  • Multiple channels (depth, AOVs, mattes) need to travel with the colour data.
  • Multi-part files are useful.
  • The downstream tool prefers EXR (most VFX tools do).

Choose AVIF (or HEIC) when:

  • The target is web display of HDR content.
  • The audience has HDR-capable displays (modern phones, recent monitors).
  • File size matters for delivery.

Choose SDR formats (JPEG, WebP, PNG) when:

  • The content is for non-HDR delivery.
  • A tone-mapped LDR version is sufficient.

Common uses

3D scene lighting. Drop an HDR environment map into Blender or Unreal Engine to illuminate a scene with realistic ambient light.

Studio product photography. Use an HDR environment for reflections on glossy products (cars, jewellery, glass).

Reference for colour grading. HDR captures of real lighting conditions inform colour grading decisions.

HDR photography source. Bracketed exposures merged to HDR are sometimes saved as Radiance HDR for further processing.

Astronomical and scientific imaging. Capturing the full dynamic range of telescope data, microscope data, or simulated phenomena.

Further reading