#include <GlobalIlluminationCiVct.hh>
Public Member Functions | |
CiVctCascade () | |
Constructor. More... | |
virtual | ~CiVctCascade () |
Destructor. More... | |
virtual gz::math::Vector3d | AreaHalfSize () const =0 |
Returns area in units around the camera to voxelize. More... | |
virtual bool | AutoMultiplier () const =0 |
Retrieve current setting. See SetAutoMultiplier. More... | |
virtual gz::math::Vector3d | CameraStepSize () const =0 |
Returns the camera step size. More... | |
virtual bool | CorrectAreaLightShadows () const =0 |
Retrieve current setting. See SetCorrectAreaLightShadows. More... | |
virtual const uint32_t * | OctantCount () const =0 |
Returns number of octant subdivisions per axis. More... | |
virtual const uint32_t * | Resolution () const =0 |
Returns 3D Voxel resolution. More... | |
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 );. More... | |
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. More... | |
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) More... | |
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. More... | |
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. More... | |
virtual void | SetResolution (const uint32_t _resolution[3])=0 |
Resolution of the 3D Voxel. Must be multiple of 2. More... | |
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. More... | |
virtual float | ThinWallCounter () const =0 |
Value of CiVctCascade::SetThinWallCounter. More... | |
Constructor & Destructor Documentation
◆ CiVctCascade()
CiVctCascade | ( | ) |
Constructor.
◆ ~CiVctCascade()
|
virtual |
Destructor.
Member Function Documentation
◆ AreaHalfSize()
|
pure virtual |
Returns area in units around the camera to voxelize.
- Returns
- area in units around the camera to voxelize
Implemented in Ogre2CiVctCascade.
◆ AutoMultiplier()
|
pure virtual |
Retrieve current setting. See SetAutoMultiplier.
- Returns
- True if the feature is enabled
Implemented in Ogre2CiVctCascade.
◆ CameraStepSize()
|
pure virtual |
◆ CorrectAreaLightShadows()
|
pure virtual |
Retrieve current setting. See SetCorrectAreaLightShadows.
- Returns
- True if the feature is enabled
Implemented in Ogre2CiVctCascade.
◆ OctantCount()
|
pure virtual |
Returns number of octant subdivisions per axis.
- Returns
- Octant subdivisions. Length of array is 3
Implemented in Ogre2CiVctCascade.
◆ Resolution()
|
pure virtual |
Returns 3D Voxel resolution.
- Returns
- Resolution in each axis. Length of array is 3
Implemented in Ogre2CiVctCascade.
◆ SetAreaHalfSize()
|
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()
|
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] _autoMultiplier True to enable the feature. Default.
Implemented in Ogre2CiVctCascade.
◆ SetCameraStepSize()
|
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] _stepSize Step size in units
Implemented in Ogre2CiVctCascade.
◆ SetCorrectAreaLightShadows()
|
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] _correctAreaLightShadows True to enable the feature
Implemented in Ogre2CiVctCascade.
◆ SetOctantCount()
|
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] _octants Number of octant subdivisions per axis
Implemented in Ogre2CiVctCascade.
◆ SetResolution()
|
pure virtual |
Resolution of the 3D Voxel. Must be multiple of 2.
- Parameters
-
[in] _resolution Resolution
Implemented in Ogre2CiVctCascade.
◆ SetThinWallCounter()
|
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] _thinWallCounter Value in range (0; inf)
Implemented in Ogre2CiVctCascade.
◆ ThinWallCounter()
|
pure virtual |
Value of CiVctCascade::SetThinWallCounter.
- Returns
- ThinWallCounter value
Implemented in Ogre2CiVctCascade.
The documentation for this class was generated from the following file: