Gazebo Rendering

API Reference

9.0.0
CiVctCascade Class Referenceabstract

#include <GlobalIlluminationCiVct.hh>

Public Member Functions

 CiVctCascade ()
 Constructor.
 
virtual ~CiVctCascade ()
 Destructor.
 
virtual gz::math::Vector3d AreaHalfSize () const =0
 Returns area in units around the camera to voxelize.
 
virtual bool AutoMultiplier () const =0
 Retrieve current setting. See SetAutoMultiplier.
 
virtual gz::math::Vector3d CameraStepSize () const =0
 Returns the camera step size.
 
virtual bool CorrectAreaLightShadows () const =0
 Retrieve current setting. See SetCorrectAreaLightShadows.
 
virtual const uint32_t * OctantCount () const =0
 Returns number of octant subdivisions per axis.
 
virtual const uint32_t * Resolution () const =0
 Returns 3D Voxel resolution.
 
virtual void SetAreaHalfSize (const gz::math::Vector3d &_areaHalfSize)=0
 The area in units around the camera to voxelize Each cascade area size must be >= than the previous one i.e. assert( cascade[i]->AreaHalfSize >= cascade[i-1]->AreaHalfSize );.
 
virtual void SetAutoMultiplier (bool _autoMultiplier)=0
 Whether we should calculate the ideal multiplier based on lights on scene to minimize quantization loss from storing all GI data in RGBA8_UNORM_sRGB (which is not enough for HDR). For more info see Ogre's VctLighting::setBakingMultiplier.
 
virtual void SetCameraStepSize (const gz::math::Vector3d &_stepSize)=0
 How much we let the camera move before updating the cascade Value is in range [1; inf)
 
virtual void SetCorrectAreaLightShadows (bool _correctAreaLightShadows)=0
 Sets whether to correctly calculate GI occlusion caused by occluders against area lights. Consumes more VRAM. This option is not needed if you're not using area lights.
 
virtual void SetOctantCount (const uint32_t _octants[3])=0
 Number of divisions per axis to divide the scene into multiple octants. Setting this value > 1 may improve voxelization performance but it may also decrease it. Profiling is required for each scene.
 
virtual void SetResolution (const uint32_t _resolution[3])=0
 Resolution of the 3D Voxel. Must be multiple of 2.
 
virtual void SetThinWallCounter (float _thinWallCounter)=0
 Shadows are calculated by raymarching towards the light source. However sometimes the ray 'may go through' a wall due to how bilinear interpolation works.
 
virtual float ThinWallCounter () const =0
 Value of CiVctCascade::SetThinWallCounter.
 

Constructor & Destructor Documentation

◆ CiVctCascade()

Constructor.

◆ ~CiVctCascade()

virtual ~CiVctCascade ( )
virtual

Destructor.

Member Function Documentation

◆ AreaHalfSize()

virtual gz::math::Vector3d AreaHalfSize ( ) const
pure virtual

Returns area in units around the camera to voxelize.

Returns
area in units around the camera to voxelize

Implemented in Ogre2CiVctCascade.

◆ AutoMultiplier()

virtual bool AutoMultiplier ( ) const
pure virtual

Retrieve current setting. See SetAutoMultiplier.

Returns
True if the feature is enabled

Implemented in Ogre2CiVctCascade.

◆ CameraStepSize()

virtual gz::math::Vector3d CameraStepSize ( ) const
pure virtual

Returns the camera step size.

Returns
Camera step size

Implemented in Ogre2CiVctCascade.

◆ CorrectAreaLightShadows()

virtual bool CorrectAreaLightShadows ( ) const
pure virtual

Retrieve current setting. See SetCorrectAreaLightShadows.

Returns
True if the feature is enabled

Implemented in Ogre2CiVctCascade.

◆ OctantCount()

virtual const uint32_t * OctantCount ( ) const
pure virtual

Returns number of octant subdivisions per axis.

Returns
Octant subdivisions. Length of array is 3

Implemented in Ogre2CiVctCascade.

◆ Resolution()

virtual const uint32_t * Resolution ( ) const
pure virtual

Returns 3D Voxel resolution.

Returns
Resolution in each axis. Length of array is 3

Implemented in Ogre2CiVctCascade.

◆ SetAreaHalfSize()

virtual void SetAreaHalfSize ( const gz::math::Vector3d _areaHalfSize)
pure virtual

The area in units around the camera to voxelize Each cascade area size must be >= than the previous one i.e. assert( cascade[i]->AreaHalfSize >= cascade[i-1]->AreaHalfSize );.

For best results, area half sizes from each cascade should be multiples of each other

Parameters
[in]_areaHalfSize

Implemented in Ogre2CiVctCascade.

◆ SetAutoMultiplier()

virtual void SetAutoMultiplier ( bool  _autoMultiplier)
pure virtual

Whether we should calculate the ideal multiplier based on lights on scene to minimize quantization loss from storing all GI data in RGBA8_UNORM_sRGB (which is not enough for HDR). For more info see Ogre's VctLighting::setBakingMultiplier.

Parameters
[in]_autoMultiplierTrue to enable the feature. Default.

Implemented in Ogre2CiVctCascade.

◆ SetCameraStepSize()

virtual void SetCameraStepSize ( const gz::math::Vector3d _stepSize)
pure virtual

How much we let the camera move before updating the cascade Value is in range [1; inf)

Camera is evaluated in quantized steps. i.e. stepSize = cameraStepSize * 2.0 * areaHalfSize / resolution stepSize = cameraStepSize * getVoxelCellSize()

If cameraStepSize = 1, after the camera moves stepSize units, we will move & update the cascades If cameraStepSize = 2, after the camera moves 2 * stepSize units, we will move & update the cascades

Small step sizes may cause too much brightness jumping as VCT may not be stable. Very big step sizes may cause periodic performance spikes or sudden changes in brightness.

Parameters
[in]_stepSizeStep size in units

Implemented in Ogre2CiVctCascade.

◆ SetCorrectAreaLightShadows()

virtual void SetCorrectAreaLightShadows ( bool  _correctAreaLightShadows)
pure virtual

Sets whether to correctly calculate GI occlusion caused by occluders against area lights. Consumes more VRAM. This option is not needed if you're not using area lights.

Remarks
Recommended setting is true for the first cascade, false for the rest. Or just false if you don't plan on using area lights (saves memory and performance)
Parameters
[in]_correctAreaLightShadowsTrue to enable the feature

Implemented in Ogre2CiVctCascade.

◆ SetOctantCount()

virtual void SetOctantCount ( const uint32_t  _octants[3])
pure virtual

Number of divisions per axis to divide the scene into multiple octants. Setting this value > 1 may improve voxelization performance but it may also decrease it. Profiling is required for each scene.

Parameters
[in]_octantsNumber of octant subdivisions per axis

Implemented in Ogre2CiVctCascade.

◆ SetResolution()

virtual void SetResolution ( const uint32_t  _resolution[3])
pure virtual

Resolution of the 3D Voxel. Must be multiple of 2.

Parameters
[in]_resolutionResolution

Implemented in Ogre2CiVctCascade.

◆ SetThinWallCounter()

virtual void SetThinWallCounter ( float  _thinWallCounter)
pure virtual

Shadows are calculated by raymarching towards the light source. However sometimes the ray 'may go through' a wall due to how bilinear interpolation works.

Bilinear interpolation can produce nicer soft shadows, but it can also cause this light leaking from behind a wall.

Increase this value (e.g. to 2.0f) to fight light leaking. This should generally (over-)darken the scene

Lower values will lighten the scene and allow more light leaking

Note that thinWallCounter can not fight all sources of light leaking, thus increasing it to ridiculous high values may not yield any benefit.

Parameters
[in]_thinWallCounterValue in range (0; inf)

Implemented in Ogre2CiVctCascade.

◆ ThinWallCounter()

virtual float ThinWallCounter ( ) const
pure virtual

Value of CiVctCascade::SetThinWallCounter.

Returns
ThinWallCounter value

Implemented in Ogre2CiVctCascade.


The documentation for this class was generated from the following file: