PBRT_V2 总结记录 BSSRDF

BSSRDF 概述

(BSSRDF 的 意义 参考下面的图,比较好理解,S 函数 从了考虑 方向 wi,wo之外,还会考虑 位置 p0,p1)

Many materials exhibit a significant amount of subsurface(表面下的) light transport: light that
enters them at one point may exit quite far away(可能离得很远).
In general, subsurface light transport is
one of the key mechanisms that gives objects like wax, candles, marble, skin, and many
biological tissues their characteristic appearances.

The bidirectional scattering-surface reflectance distribution function (BSSRDF) is the formalism
that describes these kinds of scattering processes. It is a distribution function
S(po, ωo, pi , ωi) that describes the ratio of exitant differential radiance at point po in
direction ωo to the differential irradiance at pi from direction ωi:

The generalization of the scattering equation for the BSSRDF requires integration over
surface area and incoming direction, turning the 2D scattering Equation (5.8) into a 4D
integral.With two more dimensions to integrate over, it is substantially more complex to
use in rendering algorithms.

However, as the distance between points pi and po increases, the value of S generally diminishes(减少).
This fact can be a substantial help in implementations of subsurface scattering
algorithms.

Light transport beneath(在...之下) a surface is described by the same principles as volume light
transport in participating media and is described by the equation of transfer, which is
introduced in Section 16.1. Subsurface scattering is thus based on the same effects as light
scattering in clouds and smoke, just at a smaller scale.
The DipoleSubsurfaceIntegrator
in Section 16.5 implements an algorithm that applies an approximation to efficiently
approximate this integral.

volume light transport in participating media 也可以用BSSRDF来计算效果

Figure 5.19: The bidirectional scattering-surface reflectance distribution function generalizes the
BSDF to account for light that exits the surface at a point other than where it enters. It is often
more difficult to evaluate than the BSDF, although subsurface(表面下的) light transport can make a substantial
contribution to the appearance of many real-world objects.

(BSSRDF : 光线从表示一个点 射入,但是从其他的点 射出,而且光线在表面下的进行传输 )

BSSRDF 类

class BSSRDF {
public:
    // BSSRDF Public Methods
    BSSRDF(const Spectrum &sa, const Spectrum &sps, float et)
        : e(et), sig_a(sa), sigp_s(sps) { }
    float eta() const { return e; }
    Spectrum sigma_a() const { return sig_a; }
    Spectrum sigma_prime_s() const { return sigp_s; }
private:
    // BSSRDF Private Data
    float e;
    Spectrum sig_a, sigp_s;
};

类的作用:

(BSSRDF : 光线从表示一个点 射入,但是从其他的点 射出,而且光线在表面下的进行传输 )

The BSSRDF class plays a role similar to that of the BSDF in pbrt. While the BSDF describes
scattering from a surface due to illumination at a single point, the BSSRDF describes the
scattering properties for illumination that arrives at many points on the surface and
undergoes(经历) subsurface(表面下的) scattering before exiting at the point being shaded.
During the
shading process, BSSRDF pointers are returned by the Primitive::GetBSSRDF() method
if the object’s material exhibits subsurface scattering.

1. 构造函数

BSSRDF(const Spectrum &sa, const Spectrum &sps, float et)
        : e(et), sig_a(sa), sigp_s(sps) { }



float e;
Spectrum sig_a, sigp_s;

作用:

(BSSRDF 保存的属性,都是一些 低级的participating medium 散射属性,integrator 计算 表面下的散射效果,在他们的算法里面 传入 一对点和一对方向 给 BSSRDF ,BSSRDF  利用这些 散射的属性,就可以计算出 对应的值出来。

It’s up to the integrator that computes the effect of subsurface scattering  (to use these properties in whichever algorithm it uses to compute the value of the BSSRDF for given pairs of incident and exitant locations and directions ).

BSSRDF会保存:the index of refraction of the medium η,absorption coefficient σa, 

reduced scattering coefficient σ‘s = (1− g)σs, 

Unlike the BSDF class, which provides methods to evaluate the value of the BSDF given
pairs of angles, the BSSRDF only describes the lower-level scattering properties of the
participating medium.
It’s up to the integrator that computes the effect of subsurface
scattering to use these properties in whichever algorithm it uses to compute the value of
the BSSRDF for given pairs of incident and exitant locations and directions. (For example,
the DipoleSubsurfaceIntegrator of Section 16.5 uses them to compute a BSSRDF
approximation based on a closed-form solution for a semi-infinite slab.)

The properties that define the BSSRDF here are the index of refraction of the medium
η, its absorption coefficient σa, and its reduced scattering coefficient, which is defined as
σ‘s = (1− g)σs, where g is the medium’s anisotropy parameter and σs is the scattering
coefficient.
The reduced scattering coefficient is discussed further in Section 16.5.3.

2. 

 float eta() const { return e; }
    Spectrum sigma_a() const { return sig_a; }
    Spectrum sigma_prime_s() const { return sigp_s; }

作用:

The BSSRDF provides methods to get the values of the three properties. Note that the
abstraction here implicitly treats(处理) these 3D properties of the medium as properties that
only vary on the surface, since the Material returns a BSSRDF, and the BSSRDF doesn’t
represent any spatial variation(空间变化) of the scattering properties. Effectively, the entire medium
is treated as if it were homogeneous(均匀), with the scattering properties computed at the point
being shaded. This limitation is fine for homogeneous scattering media, but is inaccurate
for highly inhomogeneous media.

猜你喜欢

转载自blog.csdn.net/aa20274270/article/details/84100370