glTF-Tutorials

Previous: KHR_materials_transmission and KHR_materials_volume Table of Contents Next: Transmission Limitations

Using a Raytracer

When adjusting material parameters, it’s a good idea to check the “ground truth” appearance with a raytracer.

glTF models can be rendered on a variety of renderers, but some need to take shortcuts to update at an interactive frame rate. With augmented reality or virtual reality, rendering speed is of the utmost importance; rasterizers are typically used for these applications because they don’t require high-end raytracing GPUs.

The thicknessFactor and thicknessTexture are used by rasterizers to simulate the depth properties of volumetric surfaces. These are “hints” for the rasterizer to improve speed, but ignored by raytracers since they can use the actual geometry depth instead.

Image of glass vase rasterized Image of glass vase raytraced

A glTF model rendered in the Microsoft Babylon.js rasterizer (above left) and the Dassault Enterprise PBR pathtracer (above right). The thicknessFactor and thicknessTexture are inaccurate here, they should be adjusted to better match the raytraced ground truth.

Image of glass vase rasterized Image of glass vase raytraced

After adjustments, the rasterizer (above left) is a better match to the raytracer (above right).

Previous: KHR_materials_transmission and KHR_materials_volume Table of Contents Next: Transmission Limitations