Abstract

The BSDF class in pbrt software represents a collection of the bidirectional reflectance distribution functions (BRDFs) and bidirectional transmittance distribution functions (BTDFs). Grouping them in this manner allows the rest of the system to work with composite BSDFs directly, rather than having to consider all of the components they may have been built from. Although low-level BRDFs and BTDFs describe how light is scattered at a particular point on a surface, the renderer needs to determine which BRDFs and BTDFs to use at that point and how to set their parameters. This chapter describes a procedural shading mechanism that determines the BRDF and BTDF to use at points on surfaces. The basic idea is that a surface shader is bound to each primitive in the scene. The surface shader is represented by an instance of the Material interface class, which has a method that takes a point to be shaded and returns a BSDF object. The BSDF class holds a set of BxDFs that collectively describe scattering at a point. Materials, in turn, use instances of the Texture class to determine the material properties at particular points on surfaces. The abstract Material class defines two methods that material implementations must provide, Material::GetBSDF() and Material::GetBSSRDF(). Implementations of these methods are responsible for determining the reflective properties at the given point on the surface and returning an instance of the BSDF class that describes them. The Material class is defined in the files core/material.h and core/material.cpp.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call