Gazebo Rendering

API Reference

9.0.0~pre2
GlobalIlluminationVct Class Referenceabstract

Implements Global Illumination using VCT (Voxel Cone Tracing) More...

#include <GlobalIlluminationVct.hh>

Public Types

enum  DebugVisualizationMode {
  DVM_Albedo , DVM_Normal , DVM_Emissive , DVM_Lighting ,
  DVM_None
}
 Debug visualization modes for GlobalIlluminationVct::SetDebugVisualization. More...
 
- Public Types inherited from GlobalIlluminationBase
enum  ParticipatingVisualsFlags { DYNAMIC_VISUALS = 1u << 0u , STATIC_VISUALS = 1u << 1u }
 Bitmask of which objects are considered by GI bounces. Note that all objects can receive indirect illumination. More...
 

Public Member Functions

 GlobalIlluminationVct ()
 Constructor.
 
virtual ~GlobalIlluminationVct ()
 Destructor.
 
virtual bool Anisotropic () const =0
 Whether anisotropic setting is on.
 
virtual bool ConserveMemory () const =0
 Whether we're releasing memory as fast as possible.
 
virtual DebugVisualizationMode DebugVisualization () const =0
 Returns current visualization mode.
 
virtual bool HighQuality () const =0
 Whether we're using 6 (true) or 4 (false) cones.
 
virtual void LightingChanged ()=0
 Called by Scene when lighting changes so that GI can be updated.
 
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 SetAnisotropic (bool _anisotropic)=0
 Anisotropic VCT provides much higher quality because it better captures incoming indirect illumination from all directions.
 
virtual void SetConserveMemory (bool _conserveMemory)=0
 This will try to release resources that aren't needed when lights and static objects don't change.
 
virtual void SetDebugVisualization (DebugVisualizationMode _dvm)=0
 Draws the voxels on screen for inspection and understand what is going on with GI. You should be looking at a minecraft-like world.
 
virtual void SetHighQuality (bool _highQuality)=0
 True for high quality (slower). VRAM consumption stays the same. Ogre2 will use 6 cones instead of 4.
 
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 when there is a lot of static Meshes; 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 SetThinWallCounter.
 
- Public Member Functions inherited from GlobalIlluminationBase
 GlobalIlluminationBase ()
 Constructor.
 
virtual ~GlobalIlluminationBase ()
 Destructor.
 
virtual uint32_t BounceCount () const =0
 Get number of bounces.
 
virtual void Build ()=0
 Build the internal structures required for producing GI This function may take significant time.
 
virtual bool Enabled () const =0
 Returns true if this GI configuration is currently enabled.
 
virtual uint32_t ParticipatingVisuals () const =0
 Visuals that can bounce GI.
 
virtual void SetBounceCount (uint32_t _bounceCount)=0
 Set the number of GI bounces. Very high number can cause a large performance impact.
 
virtual void SetParticipatingVisuals (uint32_t _mask)=0
 Set which visuals can bounce GI.
 
virtual void UpdateCamera ()=0
 Called by Scene on an active GlobalIlluminationBase whenever first rendering happens for a new frame. This implies Build has been called already.
 
virtual void UpdateLighting ()=0
 Called by Scene on an active GlobalIlluminationBase whenever lighting changes. This implies Build has been called already.
 

Additional Inherited Members

- Protected Member Functions inherited from GlobalIlluminationBase
virtual void Destroy ()=0
 Destroy the class.
 
virtual void Init ()=0
 Initialize the class.
 
virtual void SetEnabled (bool _enabled)=0
 Sets this GI solution as enabled.
 

Detailed Description

Implements Global Illumination using VCT (Voxel Cone Tracing)

gz/rendering/GlobalIlluminationVct.hh

Member Enumeration Documentation

◆ DebugVisualizationMode

Debug visualization modes for GlobalIlluminationVct::SetDebugVisualization.

Enumerator
DVM_Albedo 

Debug voxelized Albedo.

DVM_Normal 

Debug voxelized Normals.

DVM_Emissive 

Debug voxelized Emissive materials.

DVM_Lighting 

Debug VCT result (i.e. what's used by GI)

DVM_None 

Disable debugging.

Constructor & Destructor Documentation

◆ GlobalIlluminationVct()

Constructor.

◆ ~GlobalIlluminationVct()

virtual ~GlobalIlluminationVct ( )
virtual

Destructor.

Member Function Documentation

◆ Anisotropic()

virtual bool Anisotropic ( ) const
pure virtual

Whether anisotropic setting is on.

Returns
Anisotropy setting

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ ConserveMemory()

virtual bool ConserveMemory ( ) const
pure virtual

Whether we're releasing memory as fast as possible.

Returns
Conserve Memory setting

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ DebugVisualization()

virtual DebugVisualizationMode DebugVisualization ( ) const
pure virtual

Returns current visualization mode.

Returns
Visualization mode

Implemented in Ogre2GlobalIlluminationVct.

◆ HighQuality()

virtual bool HighQuality ( ) const
pure virtual

Whether we're using 6 (true) or 4 (false) cones.

Returns
High Quality setting

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ LightingChanged()

virtual void LightingChanged ( )
pure virtual

Called by Scene when lighting changes so that GI can be updated.

Implemented in Ogre2GlobalIlluminationVct.

◆ 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 BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ 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 BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ SetAnisotropic()

virtual void SetAnisotropic ( bool  _anisotropic)
pure virtual

Anisotropic VCT provides much higher quality because it better captures incoming indirect illumination from all directions.

However it consumes more VRAM and is slower. Recommended: true

Remarks
This setting has nothing to do with anistropic texture filtering in GPUs
Parameters
[in]_anisotropicAnisotropy setting

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ SetConserveMemory()

virtual void SetConserveMemory ( bool  _conserveMemory)
pure virtual

This will try to release resources that aren't needed when lights and static objects don't change.

When true, every time light changes we will recreate those resources, update the GI, and release them; causing VRAM spikes. This can be bad for memory fragmentation (and performance) if VCT is updated too often.

When false, those resources will stay loaded at all times

Parameters
[in]_conserveMemoryTrue to release memory as fast as possible

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ SetDebugVisualization()

virtual void SetDebugVisualization ( DebugVisualizationMode  _dvm)
pure virtual

Draws the voxels on screen for inspection and understand what is going on with GI. You should be looking at a minecraft-like world.

Parameters
[in]_dvmWhat component to visualize

Implemented in Ogre2GlobalIlluminationVct.

◆ SetHighQuality()

virtual void SetHighQuality ( bool  _highQuality)
pure virtual

True for high quality (slower). VRAM consumption stays the same. Ogre2 will use 6 cones instead of 4.

Parameters
[in]_highQualityQuality setting

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ 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 when there is a lot of static Meshes; but it may also decrease it. Profiling is required for each scene.

Parameters
[in]_octantsNumber of octant subdivisions per axis

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ SetResolution()

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

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

Remarks
To avoid wasting RAM, make this function your first call if you intend to change the defaults.
Parameters
[in]_resolutionResolution

Implemented in BaseGlobalIlluminationVct< T >, BaseGlobalIlluminationVct< Ogre2Object >, and Ogre2GlobalIlluminationVct.

◆ 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 Ogre2GlobalIlluminationVct.

◆ ThinWallCounter()

virtual float ThinWallCounter ( ) const
pure virtual

Value of SetThinWallCounter.

Returns
ThingWallCounter value

Implemented in Ogre2GlobalIlluminationVct.


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