Simulating Leaves in glTF with Diffuse Transmission

The KHR_materials_diffuse_transmission extension in glTF enables realistic rendering of thin, translucent objects by simulating diffuse light passing through surfaces. In 3D vegetation rendering, it resolves the visual limitations of traditional opaque Physically Based Rendering (PBR), allowing sunlight to penetrate leaves and illuminate their undersides. This article explains the technical mechanics of the extension, its role in accurately depicting foliage, and how it improves visual fidelity in real-time graphics engines.

The Limitation of Standard PBR for Foliage

Standard glTF materials rely on opaque surface reflection models defined by the core pbrMetallicRoughness specification. Under standard lighting, when light strikes an opaque surface, it either reflects specularly or scatters diffusely from the same side it arrived.

For leaves, this approach produces unnatural results. Plant leaves are thin biological membranes containing chlorophyll and cell structures that scatter light internally. When viewed from beneath a backlit canopy, standard PBR leaves appear completely dark and in shadow because light does not pass through to the opposite face. Artists historically worked around this by artificially boosting ambient light, using unlit materials, or baking fake translucency into textures, all of which break dynamic lighting consistency.

The Role of Diffuse Transmission

The KHR_materials_diffuse_transmission extension models the transmission of light through thin, translucent surfaces where the light is scattered randomly rather than refracted along a clean path.

When applied to leaf geometry, the extension takes light reaching the illuminated side (such as direct sunlight on the top of a canopy) and transmits a portion of it to the back face as diffuse illumination. This produces the characteristic "glow" of backlit leaves, correctly conveying their natural translucency and thinness in dynamic lighting environments.

Unlike KHR_materials_transmission—which models specular transmission for clear, refractive media like glass, clean water, or clear plastics—diffuse transmission scatters light thoroughly. This diffuse scattering is physically appropriate for organic materials like leaves, petals, paper, and thin fabric.

Core Parameters for Simulating Leaves

The extension introduces properties that allow technical artists to fine-tune foliage behavior:

  • diffuseTransmissionFactor: A scalar value (0.0 to 1.0) defining the proportion of diffuse light transmitted through the material. A value of 0.0 behaves like standard opaque PBR, while higher values simulate thinner or more translucent leaves.
  • diffuseTransmissionTexture: A grayscale texture map used to vary transmission across the surface. This is critical for leaves, where thick central veins transmit significantly less light than the thinner, outer blade of the leaf.
  • diffuseTransmissionColorFactor: A color multiplier that tints the transmitted light. Light filtering through a leaf absorbs blue and red wavelengths while passing green and yellow tones, creating a vibrant subsurface color distinct from the surface reflectance.
  • diffuseTransmissionColorTexture: A color map defining spatial variations in transmission color, useful for modeling autumn leaves, disease spots, or variegated foliage.

Performance and Workflow Advantages

Simulating full volumetric subsurface scattering (SSS) is computationally expensive and generally impractical for rendering thousands of foliage instances in real-time applications such as games or web-based 3D viewers.

KHR_materials_diffuse_transmission provides a thin-surface approximation that adds minimal shader overhead. Because it computes transmission directly within standard lighting loops, real-time renderers can evaluate leaf translucency efficiently without requiring multi-pass screen-space blur techniques or complex volume raymarching. Combined with double-sided rendering (doubleSided: true), it allows single-polygon leaf meshes to respond accurately to light from any angle.