Gazebo Rendering

API Reference

8.2.1
Ogre2CiVctCascade Class Reference

Ogre2.x implementation of the CiVctCascade class. More...

#include <Ogre2GlobalIlluminationCiVct.hh>

Public Member Functions

 Ogre2CiVctCascade ()
 Constructor. More...
 
 ~Ogre2CiVctCascade () override
 
virtual gz::math::Vector3d AreaHalfSize () const override
 Returns area in units around the camera to voxelize. More...
 
virtual bool AutoMultiplier () const override
 Retrieve current setting. See SetAutoMultiplier. More...
 
virtual gz::math::Vector3d CameraStepSize () const override
 Returns the camera step size. More...
 
virtual bool CorrectAreaLightShadows () const override
 Retrieve current setting. See SetCorrectAreaLightShadows. More...
 
void Init (Ogre::VctCascadeSetting *_cascade, const CiVctCascade *_ref)
 Initializes the cascade. More...
 
virtual const uint32_t * OctantCount () const override
 Returns number of octant subdivisions per axis. More...
 
void ReInit (Ogre::VctCascadeSetting *_cascade)
 Re-initializes the cascade. See Ogre2GlobalIlluminationCiVct::Reset. More...
 
virtual const uint32_t * Resolution () const override
 Returns 3D Voxel resolution. More...
 
virtual void SetAreaHalfSize (const gz::math::Vector3d &_areaHalfSize) override
 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 );. More...
 
virtual void SetAutoMultiplier (bool _autoMultiplier) override
 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. More...
 
virtual void SetCameraStepSize (const gz::math::Vector3d &_stepSize) override
 How much we let the camera move before updating the cascade Value is in range [1; inf) More...
 
virtual void SetCorrectAreaLightShadows (bool _correctAreaLightShadows) override
 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. More...
 
virtual void SetOctantCount (const uint32_t _octants[3]) override
 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. More...
 
virtual void SetResolution (const uint32_t _resolution[3]) override
 Resolution of the 3D Voxel. Must be multiple of 2. More...
 
virtual void SetThinWallCounter (float _thinWallCounter) override
 Shadows are calculated by raymarching towards the light source. However sometimes the ray 'may go through' a wall due to how bilinear interpolation works. More...
 
virtual float ThinWallCounter () const override
 Value of CiVctCascade::SetThinWallCounter. More...
 
- Public Member Functions inherited from CiVctCascade
 CiVctCascade ()
 Constructor. More...
 
virtual ~CiVctCascade ()
 Destructor. More...
 

Detailed Description

Ogre2.x implementation of the CiVctCascade class.

Constructor & Destructor Documentation

◆ Ogre2CiVctCascade()

Ogre2CiVctCascade ( )
explicit

Constructor.

◆ ~Ogre2CiVctCascade()

~Ogre2CiVctCascade ( )
override

Member Function Documentation

◆ AreaHalfSize()

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

Returns area in units around the camera to voxelize.

Returns
area in units around the camera to voxelize

Implements CiVctCascade.

◆ AutoMultiplier()

virtual bool AutoMultiplier ( ) const
overridevirtual

Retrieve current setting. See SetAutoMultiplier.

Returns
True if the feature is enabled

Implements CiVctCascade.

◆ CameraStepSize()

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

Returns the camera step size.

Returns
Camera step size

Implements CiVctCascade.

◆ CorrectAreaLightShadows()

virtual bool CorrectAreaLightShadows ( ) const
overridevirtual

Retrieve current setting. See SetCorrectAreaLightShadows.

Returns
True if the feature is enabled

Implements CiVctCascade.

◆ Init()

void Init ( Ogre::VctCascadeSetting *  _cascade,
const CiVctCascade _ref 
)

Initializes the cascade.

Parameters
[in]_cascadeCascade we control
[in]_refReference to clone settings from (can be nullptr)

◆ OctantCount()

virtual const uint32_t* OctantCount ( ) const
overridevirtual

Returns number of octant subdivisions per axis.

Returns
Octant subdivisions. Length of array is 3

Implements CiVctCascade.

◆ ReInit()

void ReInit ( Ogre::VctCascadeSetting *  _cascade)

Re-initializes the cascade. See Ogre2GlobalIlluminationCiVct::Reset.

Parameters
[in]_cascadeCascade we control. All data already filled.

◆ Resolution()

virtual const uint32_t* Resolution ( ) const
overridevirtual

Returns 3D Voxel resolution.

Returns
Resolution in each axis. Length of array is 3

Implements CiVctCascade.

◆ SetAreaHalfSize()

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

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

Implements CiVctCascade.

◆ SetAutoMultiplier()

virtual void SetAutoMultiplier ( bool  _autoMultiplier)
overridevirtual

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.

Implements CiVctCascade.

◆ SetCameraStepSize()

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

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

Implements CiVctCascade.

◆ SetCorrectAreaLightShadows()

virtual void SetCorrectAreaLightShadows ( bool  _correctAreaLightShadows)
overridevirtual

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

Implements CiVctCascade.

◆ SetOctantCount()

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

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

Implements CiVctCascade.

◆ SetResolution()

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

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

Parameters
[in]_resolutionResolution

Implements CiVctCascade.

◆ SetThinWallCounter()

virtual void SetThinWallCounter ( float  _thinWallCounter)
overridevirtual

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)

Implements CiVctCascade.

◆ ThinWallCounter()

virtual float ThinWallCounter ( ) const
overridevirtual

Value of CiVctCascade::SetThinWallCounter.

Returns
ThinWallCounter value

Implements CiVctCascade.


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