Loading...
Searching...
No Matches
Classes | Namespaces | Enumerations | Functions
he.h File Reference

Implements: "A Comprehensive Physical Model for Light Reflection" [He 1991]: https://doi.org/10.1145/127719.122738. More...

#include "bbm/bsdfmodel.h"
#include "bbm/ndf_sampler.h"
#include "bsdfmodel/lambertian.h"

Go to the source code of this file.

Classes

class  he_base< CONF, Fresnel, EQ25, EQ78, NewtonRaphsonSteps, TaylorTerms, AdaptiveTaylor, RoughApproxThreshold, NAME >
 The directional specular component of the He et al. BSDF model. More...
 

Namespaces

namespace  bbm
 

Typedefs

He BSDF Variants with data-driven importance sampling
template<typename CONF , string_literal NAME = "He">
using he = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::WithoutExp, he_eq78::Regular, 4, 64, true, 18 >, 90, 1, NAME >
 
template<typename CONF , string_literal NAME = "HeWestin">
using hewestin = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::Errata, he_eq78::Westin, 4, 64, true, 18 >, 90, 1, NAME >
 
template<typename CONF , string_literal NAME = "HeHolzschuch">
using heholzschuch = ndf_sampler< he_base< CONF, fresnel::complex< CONF, Spectrum_t< CONF > >, he_eq25::Errata, he_eq78::Regular, 4, 10, false >, 90, 1, NAME >
 

Enumerations

enum struct  he_eq25 { WithoutExp , Errata }
 Masking term scale in Eq 25. More...
 
enum struct  he_eq78 { Regular , Westin }
 Eq. 78 variants: More...
 

Functions

 BBM_CHECK_CONCEPT (concepts::bsdfmodel, he_base< config >)
 

Detailed Description

Implements: "A Comprehensive Physical Model for Light Reflection" [He 1991]: https://doi.org/10.1145/127719.122738.

Follows additonal advice from "Demystifying the He, Torrance, Sillion and Greenberg BRDF The BRDF Model" by Pacanowski and Holzschuch: https://manao.inria.fr/perso/~pac/hugo/posts/hedemystified/ especially the errata: https://manao.inria.fr/perso/~pac/hugo/posts/hedemystified/he_errata.pdf

Additional information was gleaned from the reference implementation of Westin et al.: http://www.graphics.cornell.edu/~westin/heBRDF/heBRDF.tar.gz with the following bugs fixed in the Vector3 class in Westin et al.'s code: z component in 'length' and 'MakeUnitVector', the z component of 'other' in operator-, operator+, and the y-component in the solution of the cross product.

Three variants are implemented:

The differences can be summarized by:

Experimentally we see that:

Westin et al.'s implementation give the most consistent approximation between the Taylor expansion and the rough approximation, and is therefore likely the most correct.