Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::lta Namespace Reference

Light transport algorithms. More...

Classes

class  PDF
 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.
 

Detailed Description

Light transport algorithms.

Enumeration Type Documentation

◆ EDomain

enum class ph::lta::EDomain : uint8
strong

Type of the set of all possible inputs for a mathematical function.

Enumerator
Empty 
SolidAngle 
HalfSolidAngle 
Area 
UV01 
UVW01 
Discrete 

◆ EMISStyle

enum class ph::lta::EMISStyle : uint8
strong

Type of Multiple Importance Sampling (MIS).

Enumerator
Balance 
Power 

◆ ESidednessPolicy

enum class ph::lta::ESidednessPolicy
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.

Enumerator
DoNotCare 

Perform any calculations without caring sidedness agreement.

Strict 

A vector must lies in hemispheres defined by geometry normal and shading normal simultaneously.

TrustGeometry 

Judging sidedness agreement solely on geometry normal.

TrustShading 

Judging sidedness agreement solely on shading normal.

◆ ETransport

enum class ph::lta::ETransport
strong

Type of the transported quantity.

Enumerator
Radiance 
Importance 

Function Documentation

◆ importance_BSDF_Ns_corrector()

real ph::lta::importance_BSDF_Ns_corrector ( const math::Vector3R & Ns,
const math::Vector3R & Ng,
const math::Vector3R & V )
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.

Parameters
NsShading normal.
NgGeometry normal.
VDirection of excitant importance.
Note
All vectors are expected to be in unit length and leaving the surface.

◆ importance_scatter_Ns_corrector()

real ph::lta::importance_scatter_Ns_corrector ( const math::Vector3R & Ns,
const math::Vector3R & Ng,
const math::Vector3R & L,
const math::Vector3R & V )
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.

Parameters
NsShading normal.
NgGeometry normal.
LDirection of incident importance.
VDirection of excitant importance.
Note
All vectors are expected to be in unit length and leaving the surface.

◆ pdfA_to_pdfW()

real ph::lta::pdfA_to_pdfW ( const real pdfA,
const math::Vector3R & dAPosToTargetPos,
const math::Vector3R & dANormal )
inline

Transform area domain PDF to solid angle domain PDF w.r.t. a position.

◆ tamed_importance_BSDF_Ns_corrector()

real ph::lta::tamed_importance_BSDF_Ns_corrector ( const math::Vector3R & Ns,
const math::Vector3R & Ng,
const math::Vector3R & V )
inline

◆ tamed_importance_scatter_Ns_corrector()

real ph::lta::tamed_importance_scatter_Ns_corrector ( const math::Vector3R & Ns,
const math::Vector3R & Ng,
const math::Vector3R & L,
const math::Vector3R & V )
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).