Photon Engine 2.0.0-beta
A physically based renderer.
|
Light transport algorithms. More...
Classes | |
class | |
A sample from a Probability Density Function (PDF). More... | |
class | PtVolumetricEstimator |
class | RussianRoulette |
Russian roulette random termination scheme. More... | |
class | SenseEvent |
class | SidednessAgreement |
class | SurfaceHitRefinery |
Algorithms for various hit point adjustments. For surface escaping routines, the generated ray is not guaranteed to "actually" avoid the surface. In other words, self-intersection may still happen under different circumstances dpending on the method used. More... | |
class | SurfaceTracer |
Common operations for surface tracing. This class also handles many subtle cases for surface tracing. You may take the implementations here as reference if a more fine-grained control is needed for a custom operation. More... | |
class | TDirectLightEstimator |
Estimate direct lighting for a surface point. This is a lightweight helper type for estimating direct lighting. Do not think "direct light" as lighting from a directional light source, it means the first-bounce lighting for any surface point, and the surface point can be the N-th one in a path. More... | |
class | TIndirectLightEstimator |
Estimate indirect lighting for a surface point. More... | |
class | TMIS |
Static helper for Multiple Importance Sampling (MIS). See the paper by Veach et al. [17] for more theoretical background. More... | |
Enumerations | |
enum class | EMISStyle : uint8 { Balance , Power } |
Type of Multiple Importance Sampling (MIS). More... | |
enum class | EDomain : uint8 { Empty = 0 , SolidAngle , HalfSolidAngle , Area , UV01 , UVW01 , Discrete } |
Type of the set of all possible inputs for a mathematical function. More... | |
enum class | ETransport { Radiance , Importance } |
Type of the transported quantity. More... | |
enum class | ESidednessPolicy { DoNotCare , Strict , TrustGeometry , TrustShading } |
Functions | |
real | pdfA_to_pdfW (const real pdfA, const math::Vector3R &dAPosToTargetPos, const math::Vector3R &dANormal) |
Transform area domain PDF to solid angle domain PDF w.r.t. a position. | |
real | importance_scatter_Ns_corrector (const math::Vector3R &Ns, const math::Vector3R &Ng, const math::Vector3R &L, const math::Vector3R &V) |
real | importance_BSDF_Ns_corrector (const math::Vector3R &Ns, const math::Vector3R &Ng, const math::Vector3R &V) |
real | tamed_importance_scatter_Ns_corrector (const math::Vector3R &Ns, const math::Vector3R &Ng, const math::Vector3R &L, const math::Vector3R &V) |
Smoother version of importance_scatter_Ns_corrector() . | |
real | tamed_importance_BSDF_Ns_corrector (const math::Vector3R &Ns, const math::Vector3R &Ng, const math::Vector3R &V) |
Smoother version of importance_BSDF_Ns_corrector() . See tamed_importance_scatter_Ns_corrector() for explanation. | |
Light transport algorithms.
|
strong |
|
strong |
|
strong |
Options for dealing with situations where a vector is within the hemisphere defined by geometry normal but outside the one defined by shading normal or vice versa.
|
strong |
|
inline |
This correction factor is for the same reason as importance_scatter_Ns_corrector()
, to restore the consistency of importance transport when shading normal is used for light transport. This factor works on the BSDF itself only. Using this factor accounts the fact that shading normals make a BSDF asymmetric during light/importance transport.
This factor does not take the geometry factor Ns.dot(L)
into account. It considers the BSDF only.
Ns | Shading normal. |
Ng | Geometry normal. |
V | Direction of excitant importance. |
|
inline |
Using shading normal for light transport algorithms is equivalent to using asymmetric BSDFs. This can lead to inconsistent results between regular and adjoint algorithms. This correction factor, when multiplied with the weight of an importance scatter event, restores the consistency when adjoint algorithms also use shading normals during importance transport.
This factor also considers the geometry factor Ns.dot(L)
. The geometry factor is expected to be used (multiplied) together with this factor.
References: [1] Eric Veach, "Non-symmetric Scattering in Light Transport Algorithms", Eurographics Rendering Workshop 1996 Proceedings.
Ns | Shading normal. |
Ng | Geometry normal. |
L | Direction of incident importance. |
V | Direction of excitant importance. |
|
inline |
|
inline |
Smoother version of importance_BSDF_Ns_corrector()
. See tamed_importance_scatter_Ns_corrector()
for explanation.
|
inline |
Smoother version of importance_scatter_Ns_corrector()
.
The weighting for importance transport is only correct (same scene interpretation and rendered result) if we account for the BSDF asymmetry when shading normal is used. However, this factor introduces high variance (big firefly marks). This version attempts to lower the variance by removing large correction factor (and this introduces bias, though not easily noticeable).
In PBRT-v3, this factor is completely ignored. In Mitsuba 0.6, this factor is only applied on last bounce, i.e., during radiance estimation (applying the importance_BSDF_Ns_corrector()
, not the scattering/throughput one).