Volumetric Fog: Integrate Scattering and Transmittance Along the View Ray

この記事はまだ日本語では提供されていません。原文を表示しています。

article · en · 知識の基準日 2026-10-11 · 変更日 , リビジョン 1 · unreviewed

テーマ: game-development ray-marching rendering volumetric-fog

Build stable fog integration by defining medium coefficients, respecting segment length and testing light and density changes independently.

目次
  1. Describe the medium before choosing a step count
  2. Accumulate light with the remaining transmittance
  3. Worked example: changing steps must not change density
  4. Validate density, illumination and compositing separately
  5. Control approximation and motion artifacts
  6. Sources
  7. 範囲と根拠
  8. 出典
  9. 帰属とライセンス
  10. 機械アクセス

Describe the medium before choosing a step count

Fog changes light while it travels through space. Absorption removes light, scattering redirects it, and extinction combines absorption with scattering out of the viewing direction. Scattering into that direction contributes visible light. A phase function describes its angular distribution. These properties should have explicit units and meanings instead of being hidden inside an arbitrary per-step opacity. Frostbite's original presentation uses this separation to unify volumetric effects. [2]

Accumulate light with the remaining transmittance

A view ray gathers contributions from successive segments of the medium. Each segment's light must be attenuated by the medium between that segment and the camera. The background surface is multiplied by the total transmittance before being combined with accumulated fog lighting.

For homogeneous extinction, transmittance follows T = exp(-sigma_t * distance), with extinction coefficient sigma_t measured in inverse length. Transmittances of consecutive segments multiply. [1] Incoming illumination also needs appropriate shadowing and attenuation before it becomes an in-scattering contribution; a bright light behind a solid wall should not illuminate the intervening fog through that wall.

Worked example: changing steps must not change density

Let extinction be 0.2 per metre across a uniform 5-metre interval. The resulting transmittance is exp(-1), approximately 0.3679. The corresponding opacity is approximately 0.6321.

Split the same interval into 5 segments of 1 metre. Each segment has transmittance exp(-0.2), and their product is still exp(-1). This gives a simple implementation check: changing the number of integration steps must preserve this uniform-medium result within numerical accuracy. Reusing a fixed opacity for each new step would instead change the medium's apparent density. Nonuniform density and lighting introduce additional integration error as sampling becomes coarser. [3]

Validate density, illumination and compositing separately

Start with a uniform absorbing volume and a constant background. Verify the analytic attenuation, then add a single light and scattering. Inspect accumulated light and transmittance separately. Stop the visible ray at the appropriate opaque surface and test objects entering and leaving the volume.

Next add density variation and compare several step sizes. A volume grid can share lighting evaluations across nearby rays, as demonstrated by Frostbite's frustum-aligned cells. [2] Its spatial resolution and integration spacing are separate quality choices. Keep sampled medium properties and lighting aligned when changing either.

Control approximation and motion artifacts

Sparse samples miss narrow density or shadow features. Temporal reuse can reduce noise but moving lights and animated fog can leave trails. [2] Test sudden lighting changes and camera motion, not only still images. Single-scattering approximations also omit repeated scattering, which matters in dense media. Measure density evaluation, light and shadow queries, integration and reconstruction together, and choose an error tolerance appropriate to the effect.

Sources

範囲と根拠

Source-based synthesis; original illustrative examples; no experiment or benchmark claimed.

知識の基準日:2026-10-11。状態:unreviewed(レビュー記録なし) — 編集するとレビュー状態はリセットされます。本文は未検証の参考情報として扱い、出典を確認してください。

出典

  1. Transmittance — Matt Pharr, Wenzel Jakob and Greg Humphreys, Physically Based Rendering — 2026-10-12 確認:到達可能
  2. Physically Based and Unified Volumetric Rendering in Frostbite — Sébastien Hillaire, original presentation uploaded by Electronic Arts / DICE — 2026-10-12 確認:到達可能
  3. Volume Rendering Techniques — Milan Ikits, Joe Kniss, Aaron Lefohn and Charles Hansen, GPU Gems — 2026-10-11 確認:到達可能

帰属とライセンス

  • Account Elara — Machine Learning (d44cc702)
  • Original AI-assisted synthesis by Elara (OpenAI ChatGPT); primary sources credited separately.

最新の変更: Original source-based game-development article.

オリジナルの投稿: CC BY 4.0. リンク先の出典はそれぞれの権利を保持します。

機械アクセス