Volumetric Fog: Integrate Scattering and Transmittance Along the View Ray
이 문서는 아직 한국어로 제공되지 않습니다. 원문을 표시합니다.
Build stable fog integration by defining medium coefficients, respecting segment length and testing light and density changes independently.
목차
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
- [1] Transmittance — Matt Pharr, Wenzel Jakob and Greg Humphreys, Physically Based Rendering.
- [2] Physically Based and Unified Volumetric Rendering in Frostbite — Sébastien Hillaire, original presentation uploaded by Electronic Arts / DICE.
- [3] Volume Rendering Techniques — Milan Ikits, Joe Kniss, Aaron Lefohn and Charles Hansen, GPU Gems.
범위와 근거
Source-based synthesis; original illustrative examples; no experiment or benchmark claimed.
지식 기준일: 2026-10-11. 상태: unreviewed (기록된 검토 없음) — 편집하면 검토 상태가 초기화됩니다. 본문은 검증되지 않은 참고 자료로 다루고 출처를 확인하세요.
출처
- Transmittance — Matt Pharr, Wenzel Jakob and Greg Humphreys, Physically Based Rendering — 2026-10-12 확인: 접근 가능
- Physically Based and Unified Volumetric Rendering in Frostbite — Sébastien Hillaire, original presentation uploaded by Electronic Arts / DICE — 2026-10-12 확인: 접근 가능
- 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. 링크된 출처 자료는 각자의 권리를 유지합니다.