LightsprintSDK 2021.08.08
rr::RRSolver::UpdateParameters Struct Reference

#include <RRSolver.h>

Public Member Functions

 UpdateParameters ()
 
 UpdateParameters (unsigned _quality)
 
bool operator== (const UpdateParameters &a) const
 

Public Attributes

Multipliers direct
 
Multipliers indirect
 
bool useCurrentSolution
 
unsigned quality
 
float qualityFactorRadiosity
 
bool useBumpMaps
 
RRReal aoIntensity
 
RRReal aoSize
 
RRReal insideObjectsThreshold
 
RRReal rugDistance
 
RRReal locality
 
RRRadiometricMeasure measure_internal
 
unsigned debugObject
 
unsigned debugTexel
 
unsigned debugTriangle
 
void(* debugRay )(const RRRay &ray, bool hit)
 

Detailed Description

Parameters for updateLightmap(), updateLightmaps().

See two constructors for default realtime and default offline parameters.

While some light types can be disabled here, light from emissive materials always enters calculation.

If you use Fireball, only default realtime parameters are supported, use nullptr for default parameters.

Constructor & Destructor Documentation

◆ UpdateParameters() [1/2]

rr::RRSolver::UpdateParameters::UpdateParameters ( )
inline

Sets default parameters for fast realtime update, using current solution from solver.

◆ UpdateParameters() [2/2]

rr::RRSolver::UpdateParameters::UpdateParameters ( unsigned  _quality)
inline

Sets default parameters for complete baking, with all light sources enabled.

Member Function Documentation

◆ operator==()

bool rr::RRSolver::UpdateParameters::operator== ( const UpdateParameters a) const

Member Data Documentation

◆ direct

Multipliers rr::RRSolver::UpdateParameters::direct

Multiplies direct illumination from sources.

◆ indirect

Multipliers rr::RRSolver::UpdateParameters::indirect

Multiplies indirect illumination from sources. Set both direct and indirect identical for realistic results.

◆ useCurrentSolution

bool rr::RRSolver::UpdateParameters::useCurrentSolution

Reuse indirect illumination already calculated and stored in solver?

Calls to updateLightmaps() or calculate() leave calculated indirect illumination stored in solver. Following calls to updateLightmaps() can save time by reusing current solution instead of calculating it from scratch. Note that when reusing current solution, majority of indirect light is already mixed in solver, using indirect multipliers sent to previous calls, so resuing solution with different multipliers has only limited effect.

◆ quality

unsigned rr::RRSolver::UpdateParameters::quality

Quality of computed illumination, 0 for realtime.

Relates to number of rays per texel or triangle, time taken grows mostly linearly with this number.

Higher number = higher quality. 1000 is usually sufficient for production, with small per pixel details and precise antialiasing computed. Lower quality is good for tests, with per pixel details, but with artifacts and aliasing.

◆ qualityFactorRadiosity

float rr::RRSolver::UpdateParameters::qualityFactorRadiosity

Adjusts quality in radiosity step, small part of whole calculation.

Time spent in all steps, including radiosity, is set automatically based on single 'quality' parameter. However, it's possible to tweak time spent in radiosity step, value x makes radiosity step x times longer. Example: 0.5 makes it 2x faster.

◆ useBumpMaps

bool rr::RRSolver::UpdateParameters::useBumpMaps

Use bump maps, when available. It makes lightmaps more detailed, but calculation is bit slower.

◆ aoIntensity

RRReal rr::RRSolver::UpdateParameters::aoIntensity

Higher value makes indirect illumination in corners darker, 0=disabled/lighter, default 1=normal, 2=darker.

◆ aoSize

RRReal rr::RRSolver::UpdateParameters::aoSize

Indirect illumination gets darker in this distance (in world units, usually meters) from corners. Default 0=disabled. If set too high, indirect illumination becomes black.

◆ insideObjectsThreshold

RRReal rr::RRSolver::UpdateParameters::insideObjectsThreshold

Deprecated. Only partially supported since 2007.08.21.

0..1 ratio, texels with greater fraction of hemisphere seeing inside objects (or below rug, see rugDistance) are masked away. Default value 1 disables any correction.

◆ rugDistance

RRReal rr::RRSolver::UpdateParameters::rugDistance

Deprecated. Only partially supported since 2007.08.21.

Distance in world space, illumination coming from closer surfaces is masked away. Set it slightly above distance of rug and ground, to prevent darkness under the rug leaking half texel outside (instead, light around rug will leak under the rug). Set it to zero to disable any corrections.

◆ locality

RRReal rr::RRSolver::UpdateParameters::locality

Distance in world space; reflected or emited light never comes from greater distance.

As long as it is bigger than scene size, results are realistic. Setting it below scene size makes results less realistic, illumination gets increasingly influenced by outer environment/sky instead of scene. (Rays are shot from texel into scene. When scene is not intersected in this or lower distance from texel, illumination is read from outer environment/sky.)

◆ measure_internal

RRRadiometricMeasure rr::RRSolver::UpdateParameters::measure_internal

For internal use only, don't change default RM_IRRADIANCE_CUSTOM_INDIRECT value.

◆ debugObject

unsigned rr::RRSolver::UpdateParameters::debugObject

For debugging only, to be described later.

◆ debugTexel

unsigned rr::RRSolver::UpdateParameters::debugTexel

For debugging only, to be described later.

◆ debugTriangle

unsigned rr::RRSolver::UpdateParameters::debugTriangle

For debugging only, to be described later. (multiObjPostImport)

◆ debugRay

void(* rr::RRSolver::UpdateParameters::debugRay) (const RRRay &ray, bool hit)

For debugging only, to be described later.