Smoke Volume Rendering with PBRT-v3: Scene File Configuration and Analysis

Integrator and Sampler Settings

The volpath integrator is essential for rendering participating media, such as smoke. The maxdepth parameter defines the maximum path length for light transport samplnig within the volume.

Integrator "volpath" "integer maxdepth" [50]
Sampler "02sequence" "integer pixelsamples" [2048]

The LookAt directive specifies the camera's position, focal point, and up vector.

LookAt 1 1 10   0 0 -1  0 1 0

Camera and Film Configuration

Camera "perspective" "float fov" [20]
PixelFilter "gaussian"
Film "image" "string filename" ["mycloud.exr"]
    "integer xresolution" [400] "integer yresolution" [400]

Light Source Definitions

PBRT-v3 supports several light source types.

Spotlight Example: Defines a conical light beam with specified origin, direction, intensity, and angular falloff.

AttributeBegin
    LightSource "spot" "rgb I" [3000 3000 3000]
                "point from" [-1 0.2 1.6] "point to" [2 0.2 1.6]
                "float coneangle" [3]
                "float conedeltaangle" [0]
AttributeEnd

Distant Light Example (Commented): A directional light source defined in camera space.

#AttributeBegin
#  CoordSysTransform "camera"
#  LightSource "distant"
#              "point from" [0 0 0] "point to" [0 0 1]
#              "color L" [10 10 10]
#AttributeEnd

Point Light Example (Commented): An omnidirectional point light.

#AttributeBegin
#    LightSource "point" "rgb I" [100 100 100]
#                "point from" [-1 0.5 1]
#AttributeEnd

Infinite Area Light Example: An environment light using an EXR texture for intensity distribution.

AttributeBegin
    Rotate 110 0 1 0
    Rotate -90 1 0 0
    LightSource "infinite" "string mapname" "textures/sky.exr"
                "rgb L" [5 4 3]
AttributeEnd

Volume Medium Definition and Geometry

Volume data is imported via an include file, specifying absorption (sigma_a) and scattering (sigma_s) coefficients.

TransformBegin
    Translate -0.9 0 -1.2
    Rotate 90 1 0 0
    Include "geometry/density_render.70.pbrt"
          "color sigma_a" [10 10 10] "color sigma_s" [90 90 90]
TransformEnd

The geometric bounds of the medium are defined by a PLY mesh.

AttributeBegin
    Translate -0.9 0 -1.2
    Rotate 90 1 0 0
    Material ""
    MediumInterface "smoke" ""
    Shape "plymesh" "string filename" "geometry/density_render.ply"
AttributeEnd

Density File Structure

The included density file (density_render.70.pbrt) defines a heterogeneous volume grid.

MakeNamedMedium "smoke" "string type" "heterogeneous"
                 "integer nx" 100 "integer ny" 100 "integer nz" 40
                 "point p0" [0.0 0.0 0.0] "point p1" [0.75 1.0 0.75]
                 "float density" [
                 ... # Density values arranged as [nz][nx][ny]
                 ]

Rendering Command

Execute the render using the PBRT executable, specifying the main scene file.

pbrt ~/pbrt-v3-scenes/cloud/cloud.pbrt

Tags: PBRT Volume Rendering Participating Media Computer Graphics Smoke Simulation

Posted on Wed, 12 Aug 2026 16:09:56 +0000 by shanu_040