Irradiance cache data structure based on "A Ray Tracing Solution for Diffuse Interreflection" by Greg J. Ward, Francis M. Rubinstein and Robert D. Clear (Computer Graphics, Volume 22, Number 4, August 1988) More...
#include <mitsuba/render/irrcache.h>
Classes | |
struct | Record |
Public Member Functions | |
IrradianceCache (const AABB &aabb) | |
IrradianceCache (Stream *stream, InstanceManager *manager) | |
void | setQuality (Float quality) |
void | clampInfluence (Float min, Float max) |
void | clampScreen (bool active) |
void | clampNeighbor (bool active) |
void | useGradients (bool active) |
Record * | put (const RayDifferential &ray, const Intersection &its, const HemisphereSampler &hs) |
bool | get (const Intersection &its, Spectrum &E) const |
void | insert (Record *rec) |
Manually insert an irradiance record. More... | |
void | serialize (Stream *stream, InstanceManager *manager) const |
std::string | toString () const |
Return a string representation. More... | |
virtual const Class * | getClass () const |
Retrieve this object's class. More... | |
Public Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject (Stream *stream, InstanceManager *manager) | |
Unserialize a serializable object. More... | |
Public Member Functions inherited from Object | |
Object () | |
Construct a new object. More... | |
int | getRefCount () const |
Return the current reference count. More... | |
void | incRef () const |
Increase the reference count of the object by one. More... | |
void | decRef (bool autoDeallocate=true) const |
Decrease the reference count of the object and possibly deallocate it. More... | |
Static Public Attributes | |
static Class * | m_theClass |
Static Public Attributes inherited from mitsuba::SerializableObject | |
static Class * | m_theClass |
Static Public Attributes inherited from Object | |
static Class * | m_theClass |
Pointer to the object's class descriptor. More... | |
Protected Member Functions | |
virtual | ~IrradianceCache () |
Release all memory. More... | |
Protected Member Functions inherited from mitsuba::SerializableObject | |
SerializableObject () | |
Construct a serializable object. More... | |
virtual | ~SerializableObject () |
Virtual deconstructor. More... | |
Protected Member Functions inherited from Object | |
virtual | ~Object () |
Virtual private deconstructor. (Will only be called by ref) More... | |
Protected Attributes | |
DynamicOctree< Record * > | m_octree |
std::vector< Record * > | m_records |
Float | m_kappa |
Float | m_sceneSize |
Float | m_minDist |
Float | m_maxDist |
bool | m_clampScreen |
bool | m_clampNeighbor |
bool | m_useGradients |
ref< Mutex > | m_mutex |
Additional Inherited Members | |
Static Public Member Functions inherited from Object | |
static void | staticInitialization () |
Initializes the built-in reference count debugger (if enabled) More... | |
static void | staticShutdown () |
Free the memory taken by staticInitialization() More... | |
Irradiance cache data structure based on "A Ray Tracing Solution for Diffuse Interreflection" by Greg J. Ward, Francis M. Rubinstein and Robert D. Clear (Computer Graphics, Volume 22, Number 4, August 1988)
with extensions from "Irradiance Gradients" by Greg J. Ward and Paul S. Heckbert (1992 Eurographics Workshop on Rendering).
Includes optimizations proposed by Jaroslav Krivanek et al. in "Making Radiance and Irradiance Caching Practical: Adaptive Caching and Neighbor Clamping" (in EGSR 2006),
and
"An Approximate Global Illumination System for Computer Generated Films" by E. Tabellion and A. Lamorlette (SIGGRAPH 2004)
mitsuba::IrradianceCache::IrradianceCache | ( | const AABB & | aabb | ) |
Create an empty irradiance of the given size
mitsuba::IrradianceCache::IrradianceCache | ( | Stream * | stream, |
InstanceManager * | manager | ||
) |
Unserialize an irradiance cache from a binary data stream
|
protectedvirtual |
Release all memory.
Set the influence region cutoff values of samples in the cache. Will be multiplied by the scene size
|
inline |
Enable neighbor clamping?
|
inline |
Minimal influence region falloff with increasing distance
bool mitsuba::IrradianceCache::get | ( | const Intersection & | its, |
Spectrum & | E | ||
) | const |
Use the irradiance cache to interpolate/extrapolate an irradiance value for the given position and surface normal Returns false on a cache miss
|
virtual |
Retrieve this object's class.
Reimplemented from mitsuba::SerializableObject.
void mitsuba::IrradianceCache::insert | ( | Record * | rec | ) |
Manually insert an irradiance record.
Record* mitsuba::IrradianceCache::put | ( | const RayDifferential & | ray, |
const Intersection & | its, | ||
const HemisphereSampler & | hs | ||
) |
Add a sample to the irradiance cache
ray | Ray differentials (if they exist) |
its | The position/normal of the surface in question |
sample | Record containing all hemispherical samples and derived gradient information |
|
virtual |
Serialize an irradiance cache to a binary data stream
Implements mitsuba::SerializableObject.
|
inline |
Set the quality parameter from the Tabellion and Lamorlette paper. Once samples have been stored, this should only be decreased.
|
virtual |
Return a string representation.
Reimplemented from Object.
|
inline |
Enable/disable irradiance gradients
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
protected |