Skip to content
CoreSource checked

Russian Roulette Path Termination

Randomly terminates low-contribution light paths while preserving an unbiased estimator.

Quick Facts

Compact metadata for implementation and discovery.

Category
Rendering
Difficulty
Intermediate
Family
Monte Carlo Rendering
Tier
Core
Status
Verified
Review
Source Checked
Sources
1
Formulas
1
Relationships
3
Code example
Ready
Visualization
Ready

Overview

Russian roulette path termination chooses whether to continue a rendering path based on survival probability, and scales surviving paths so expected contribution remains unchanged.

Core Concepts

unbiased estimatorsurvival probabilitypath throughputvariance tradeoff

Quick facts

Complexity

Runtime and memory behavior at a glance.

Best

O(path length)

Average

O(samples * expected path length)

Worst

O(samples * max depth)

Space

O(1)

When to Use

  • Use in Monte Carlo path tracing when many long paths contribute very little.
  • Use when unbiasedness matters and termination probability can be tied to throughput.

When Not to Use

  • Avoid in deterministic preview renderers where random termination noise is unacceptable.
  • Avoid when survival probabilities are so low that variance becomes excessive.

What It Does

  • Randomly terminates low-contribution light paths while keeping the estimator unbiased
  • Uses unbiased estimator and survival probability to guide the work.
  • Produces rendered image.

Use Cases

  • Real-time graphics
  • Offline rendering
  • Lighting and visibility effects

Inputs

  • Scene geometry
  • Materials
  • Camera and lighting state

Outputs

  • Rendered image
  • Visibility or shading buffers

Key Formulas (1)

Survivor weight

throughput = throughput / psurvive
throughput = throughput / p_survive

Compensates surviving paths so the expected contribution remains unchanged.

Pseudocode

  1. 1.After a minimum depth, compute survival probability p
  2. 2.Draw a random number r in [0, 1)
  3. 3.If r >= p, terminate the path
  4. 4.Otherwise divide path throughput by p
  5. 5.Continue tracing the surviving path

Canonical Example

Input
path throughput 0.25 and survival probability 0.25
Output
terminate 75% of such paths; multiply survivors by 4
Explanation
The expected contribution remains 0.25 while fewer paths continue.

Implementation Notes

  • Delay roulette until a minimum path depth.
  • Choose survival probability from path throughput or luminance.
  • Scale surviving contribution by 1 / probability.

Common Pitfalls

  • Not dividing surviving throughput by survival probability biases the result dark.
  • Terminating too early increases variance and can remove important indirect light.
  • Probability must be clamped away from zero for numerical safety.

Interactive Mechanism Walkthrough

Spatial Primitive & Sweep-Line Canvas

Show rays, samples, buffers, or shading terms that contribute to the final pixel.

Russian Roulette Path Termination mechanism walkthrough step 1 of 5
Step 1 of 5: After a minimum depth, compute survival probability p
rendering-mechanism

Notes

Russian roulette controls work, not noise directly; poor probabilities can increase variance.

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

Russian roulette and importance sampling are commonly combined to control Monte Carlo rendering cost and variance.

Path tracing uses Russian roulette to terminate paths without biasing estimates.

Tags

GraphicsPath TracingSamplingStochastic