Skip to content
SpecializedSource checked

Next Event Estimation

Reduces path tracing noise by sampling direct light sources at each shading point.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Advanced
Family
Monte Carlo Light Transport
Tier
Specialized
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
4
Code example
Ready
Visualization
Ready

Overview

Next Event Estimation explicitly samples a light after a surface hit and tests visibility, adding direct illumination without waiting for random paths to hit lights by chance.

Core Concepts

light samplingshadow rayBRDF weightsampling probability

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(lights)

Average

O(samples * visibility cost)

Worst

O(samples * visibility cost)

Space

O(1)

When to Use

  • Use when path tracing has noisy direct lighting from small or bright lights.
  • Use when path tracing direct lighting is a central requirement.

When Not to Use

  • Avoid when the lighting model has no sampleable light sources.
  • Avoid when the renderer cannot provide the buffers, samples, or lighting data the technique needs.

What It Does

  • Samples a point on a light
  • Tests visibility to the light
  • Adds a weighted direct-light contribution

Use Cases

  • Path tracing direct lighting
  • Reducing fireflies
  • Rendering small bright lights

Inputs

  • Shading point
  • Scene lights
  • BSDF or BRDF
  • Visibility test

Outputs

  • Direct lighting estimate

Key Formulas (1)

Direct-light estimate

contribution = BRDF · lightradiance · geometryterm · visibility / pdflight
contribution = BRDF * light_radiance * geometry_term * visibility / pdf_light

Weights an explicitly sampled light contribution by its probability.

Pseudocode

  1. 1.At a surface hit, choose a light sample
  2. 2.Trace a shadow ray to test visibility
  3. 3.Evaluate the BRDF and geometry term
  4. 4.Divide by the light sampling probability
  5. 5.Add the contribution to the path estimate

Canonical Example

Input
surface hit near a small lamp
Output
direct light sample adds visible lamp contribution
Explanation
The estimator reaches the lamp directly instead of waiting for random bounces.

Implementation Notes

  • Keep light sampling PDF, BSDF value, and visibility as separate debug outputs.
  • Debug with simple geometry, known lights, and visualized intermediate buffers.
  • Keep a tiny example with expected output beside the implementation.

Common Pitfalls

  • Forgetting the sampling PDF produces biased brightness.
  • Coordinate-space mismatches often cause artifacts that look like math errors.
  • Not defining boundary, empty, or degenerate inputs before implementation.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show a path-tracing bounce sending an explicit shadow ray toward a sampled light.

Next Event Estimation mechanism walkthrough step 1 of 5
Step 1 of 5: At a surface hit, choose a light sample
rendering-pipeline

Notes

Multiple importance sampling is often used with next event estimation to balance light and BSDF sampling.

Sources (1)

What each reference supports for this entry.

Physically Based Rendering

Book

Rendering reference for light transport, ray tracing, sampling, BRDFs, acceleration structures, and path termination.

Open source

Explore Next

Good next jumps from the relationship graph, ranked for useful discovery.

Often paired withImportance Sampling BRDF

Direct-light sampling and BRDF sampling are often combined.

Path tracing uses next-event estimation to sample direct lighting.

Tags

GraphicsGlobal IlluminationBRDFSampling