Gazebo Rendering

API Reference

9.0.0~pre2
Ogre2GlobalIlluminationVct Class Reference

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

#include <Ogre2GlobalIlluminationVct.hh>

Public Member Functions

virtual ~Ogre2GlobalIlluminationVct () override
 Destructor.
 
virtual bool Anisotropic () const override
 Whether anisotropic setting is on.
 
virtual uint32_t BounceCount () const override
 Get number of bounces.
 
virtual void Build () override
 Build the internal structures required for producing GI This function may take significant time.
 
virtual bool ConserveMemory () const override
 Whether we're releasing memory as fast as possible.
 
virtual DebugVisualizationMode DebugVisualization () const override
 Returns current visualization mode.
 
virtual void Destroy () override
 Destroy the class.
 
virtual bool Enabled () const override
 Returns true if this GI configuration is currently enabled.
 
virtual bool HighQuality () const override
 Whether we're using 6 (true) or 4 (false) cones.
 
virtual void LightingChanged () override
 Called by Scene when lighting changes so that GI can be updated.
 
virtual const uint32_t * OctantCount () const override
 Returns number of octant subdivisions per axis.
 
uint32_t ParticipatingVisuals () const override
 Visuals that can bounce GI.
 
virtual const uint32_t * Resolution () const override
 Returns 3D Voxel resolution.
 
virtual void SetAnisotropic (bool _anisotropic) override
 Anisotropic VCT provides much higher quality because it better captures incoming indirect illumination from all directions.
 
virtual void SetBounceCount (uint32_t _bounceCount) override
 Set the number of GI bounces. Very high number can cause a large performance impact.
 
virtual void SetConserveMemory (bool _conserveMemory) override
 This will try to release resources that aren't needed when lights and static objects don't change.
 
virtual void SetDebugVisualization (DebugVisualizationMode _dvm) override
 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) override
 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]) override
 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.
 
void SetParticipatingVisuals (uint32_t _mask) override
 Set which visuals can bounce GI.
 
virtual void SetResolution (const uint32_t _resolution[3]) override
 Resolution of the 3D Voxel. Must be multiple of 2.
 
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.
 
virtual float ThinWallCounter () const override
 Value of SetThinWallCounter.
 
virtual void UpdateCamera () override
 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 () override
 Called by Scene on an active GlobalIlluminationBase whenever lighting changes. This implies Build has been called already.
 
- Public Member Functions inherited from BaseGlobalIlluminationVct< Ogre2Object >
virtual ~BaseGlobalIlluminationVct ()
 
- Public Member Functions inherited from GlobalIlluminationVct
 GlobalIlluminationVct ()
 Constructor.
 
virtual ~GlobalIlluminationVct ()
 Destructor.
 
- Public Member Functions inherited from GlobalIlluminationBase
 GlobalIlluminationBase ()
 Constructor.
 
virtual ~GlobalIlluminationBase ()
 Destructor.
 
- Public Member Functions inherited from Ogre2Object
virtual ~Ogre2Object ()
 Destructor.
 
virtual ScenePtr Scene () const override
 
- Public Member Functions inherited from BaseObject
virtual ~BaseObject ()
 
virtual unsigned int Id () const override
 
virtual std::string Name () const override
 
virtual void PostRender () override
 
virtual void PreRender () override
 

Protected Member Functions

 Ogre2GlobalIlluminationVct ()
 Constructor.
 
virtual void Init () override
 Initialize the class.
 
virtual void SetEnabled (bool _enabled) override
 Sets this GI solution as enabled.
 
- Protected Member Functions inherited from BaseGlobalIlluminationVct< Ogre2Object >
 BaseGlobalIlluminationVct ()
 
- Protected Member Functions inherited from Ogre2Object
 Ogre2Object ()
 Constructor.
 
- Protected Member Functions inherited from BaseObject
 BaseObject ()
 
virtual void Load ()
 

Additional Inherited Members

- Public Types inherited from GlobalIlluminationVct
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...
 
- Protected Attributes inherited from Ogre2Object
Ogre2ScenePtr scene
 Pointer to the ogre scene.
 
- Protected Attributes inherited from BaseObject
unsigned int id
 
std::string name
 

Detailed Description

Ogre2.x implementation of the GlobalIlluminationVct class.

Constructor & Destructor Documentation

◆ Ogre2GlobalIlluminationVct()

Constructor.

◆ ~Ogre2GlobalIlluminationVct()

virtual ~Ogre2GlobalIlluminationVct ( )
overridevirtual

Destructor.

Member Function Documentation

◆ Anisotropic()

virtual bool Anisotropic ( ) const
overridevirtual

Whether anisotropic setting is on.

Returns
Anisotropy setting

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ BounceCount()

virtual uint32_t BounceCount ( ) const
overridevirtual

Get number of bounces.

Returns
Number of bounces

Implements GlobalIlluminationBase.

◆ Build()

virtual void Build ( )
overridevirtual

Build the internal structures required for producing GI This function may take significant time.

Implements GlobalIlluminationBase.

◆ ConserveMemory()

virtual bool ConserveMemory ( ) const
overridevirtual

Whether we're releasing memory as fast as possible.

Returns
Conserve Memory setting

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ DebugVisualization()

virtual DebugVisualizationMode DebugVisualization ( ) const
overridevirtual

Returns current visualization mode.

Returns
Visualization mode

Implements GlobalIlluminationVct.

◆ Destroy()

virtual void Destroy ( )
overridevirtual

Destroy the class.

Implements GlobalIlluminationBase.

◆ Enabled()

virtual bool Enabled ( ) const
overridevirtual

Returns true if this GI configuration is currently enabled.

Returns
True if this GI solution is currently enabled

Implements GlobalIlluminationBase.

◆ HighQuality()

virtual bool HighQuality ( ) const
overridevirtual

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

Returns
High Quality setting

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ Init()

virtual void Init ( )
overrideprotectedvirtual

Initialize the class.

Implements GlobalIlluminationBase.

◆ LightingChanged()

virtual void LightingChanged ( )
overridevirtual

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

Implements GlobalIlluminationVct.

◆ OctantCount()

virtual const uint32_t * OctantCount ( ) const
overridevirtual

Returns number of octant subdivisions per axis.

Returns
Octant subdivisions. Length of array is 3

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ ParticipatingVisuals()

uint32_t ParticipatingVisuals ( ) const
overridevirtual

Visuals that can bounce GI.

Returns
See ParticipatingVisualsFlags

Implements GlobalIlluminationBase.

◆ Resolution()

virtual const uint32_t * Resolution ( ) const
overridevirtual

Returns 3D Voxel resolution.

Returns
Resolution in each axis. Length of array is 3

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ SetAnisotropic()

virtual void SetAnisotropic ( bool  _anisotropic)
overridevirtual

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

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ SetBounceCount()

virtual void SetBounceCount ( uint32_t  _bounceCount)
overridevirtual

Set the number of GI bounces. Very high number can cause a large performance impact.

Parameters
[in]_bounceCountValue in range [0; inf)

Implements GlobalIlluminationBase.

◆ SetConserveMemory()

virtual void SetConserveMemory ( bool  _conserveMemory)
overridevirtual

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

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ SetDebugVisualization()

virtual void SetDebugVisualization ( DebugVisualizationMode  _dvm)
overridevirtual

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

Implements GlobalIlluminationVct.

◆ SetEnabled()

virtual void SetEnabled ( bool  _enabled)
overrideprotectedvirtual

Sets this GI solution as enabled.

Remarks
Only one GI solution can be active at the same time
See also
Scene::SetActiveGlobalIllumination
Parameters
[in]_enabledTrue to enable, false otherwise

Implements GlobalIlluminationBase.

◆ SetHighQuality()

virtual void SetHighQuality ( bool  _highQuality)
overridevirtual

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

Parameters
[in]_highQualityQuality setting

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

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

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

◆ SetParticipatingVisuals()

void SetParticipatingVisuals ( uint32_t  _mask)
overridevirtual

Set which visuals can bounce GI.

Parameters
[in]_maskSee ParticipatingVisualsFlags

Implements GlobalIlluminationBase.

◆ SetResolution()

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

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

Reimplemented from BaseGlobalIlluminationVct< Ogre2Object >.

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

◆ ThinWallCounter()

virtual float ThinWallCounter ( ) const
overridevirtual

Value of SetThinWallCounter.

Returns
ThingWallCounter value

Implements GlobalIlluminationVct.

◆ UpdateCamera()

virtual void UpdateCamera ( )
overridevirtual

Called by Scene on an active GlobalIlluminationBase whenever first rendering happens for a new frame. This implies Build has been called already.

Implements GlobalIlluminationBase.

◆ UpdateLighting()

virtual void UpdateLighting ( )
overridevirtual

Called by Scene on an active GlobalIlluminationBase whenever lighting changes. This implies Build has been called already.

Implements GlobalIlluminationBase.


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