Torque3D Documentation / _generateds / ReflectionProbe

ReflectionProbe

Engine/source/T3D/lighting/reflectionProbe.h

More...

Public Types

enum
ReflectionModeType {
  NoReflection = 0
  StaticCubemap = 1
  BakedCubemap = 2
  DynamicCubemap = 5
}

Used to dictate what sort of cubemap the probes use when using IBL

Protected Types

enum
MaskBits {
  TransformMask = Parent::NextFreeMask << 0
  StaticDataMask = Parent::NextFreeMask << 1
  EnabledMask = Parent::NextFreeMask << 2
  NextFreeMask = Parent::NextFreeMask << 3
}

Private Types

Parent 

Public Friends

Protected Attributes

bool

Only used for interfacing with the editor's inspector bake button

bool

Whether this probe's cubemap is dirty or not

This is used when a static cubemap is used.

bool
bool

Only used for interfacing with the editor's inspector edit offset button

bool

Whether this probe is enabled or not

This is effectively a packed cache of the probe data actually utilized for rendering.

The reference positional offset for the probe.

The reference scale for the probe.

This is calculated based on the object's persistantID.

The radius of the probe's influence.

Used to dictate what sort of cubemap the probes use when using IBL

bool

Prevents us from saving out the cubemaps(for now) but allows us the full HDR range on the in-memory cubemap captures.

Protected Static Attributes

Public Functions

bake()

Invokes a cubemap bake action for this probe

This gets the filepath to the irradiance cubemap associated to this probe.

This gets the filepath to the prefilter cubemap associated to this probe.

Returns the scale of the object.

Returns the transform which can be used to convert object space to world space.

This is called when the object is deleted.

Called after any property of the object is changed in the world editor.

bool

Called when the object is added to the sim.

Called when the object is removed from the sim.

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Instructs this object to pack its state for transfer over the network.

Called when the SceneManager is ready for the registration of render instances.

Updates the probe's cubemaps in the array when using baked cubemaps

Updates the probe's cubemaps in the array when using dynamic reflections

Updates the probe's cubemaps in the array when using a static cubemaps

Sets the scale for the object.

Sets the Object -> World transform.

Instructs this object to read state data previously packed with packUpdate.

Updates the probe rendering data

bool
writeField(StringTableEntry fieldname, const char * value)

Determine whether or not a field should be written.

Public Static Functions

bool
_doBake(void * object, const char * index, const char * data)
bool
_setEnabled(void * object, const char * index, const char * data)
bool
_setRadius(void * object, const char * index, const char * data)
bool
_setReflectionMode(void * object, const char * index, const char * data)
bool
_toggleEditPosOffset(void * object, const char * index, const char * data)

Detailed Description

Public Types

ReflectionModeType

Enumerator

NoReflection = 0
StaticCubemap = 1
BakedCubemap = 2
DynamicCubemap = 5

Used to dictate what sort of cubemap the probes use when using IBL

Protected Types

MaskBits

Enumerator

TransformMask = Parent::NextFreeMask << 0
StaticDataMask = Parent::NextFreeMask << 1
EnabledMask = Parent::NextFreeMask << 2
NextFreeMask = Parent::NextFreeMask << 3

Private Types

typedef SceneObject Parent 

Public Friends

Protected Attributes

U32 cubeDescId 
String cubeDescName 
bool mBakeReflections 

Only used for interfacing with the editor's inspector bake button

U32 mCaptureMask 
bool mCubemapDirty 

Whether this probe's cubemap is dirty or not

String mCubemapName 

This is used when a static cubemap is used.

The name of the cubemap is looked up and loaded for the IBL calculations

bool mDirty 
GFXCubemapHandle mDynamicCubemap 
U32 mDynamicLastBakeMS 
bool mEditPosOffset 

Only used for interfacing with the editor's inspector edit offset button

bool mEnabled 

Whether this probe is enabled or not

CubemapData * mIrridianceMap 
F32 mMaxDrawDistance 
CubemapData * mPrefilterMap 
U32 mPrefilterMipLevels 
U32 mPrefilterSize 
ProbeRenderInst mProbeInfo 

This is effectively a packed cache of the probe data actually utilized for rendering.

The RenderProbeManager uses this via the probe calling registerProbe on creation, and unregisterProbe on destruction When the manager goes to render it has the compacted data to read over more efficiently for setting up what probes should Actually render in that frame

Point3F mProbeRefOffset 

The reference positional offset for the probe.

This is used for adjusting the perceived center and area of influence. Helpful in adjusting parallax issues

Point3F mProbeRefScale 

The reference scale for the probe.

This is used for adjusting the perceived center and area of influence. Helpful in adjusting parallax issues

ProbeRenderInst::ProbeShapeType mProbeShapeType 

The shape of the probe

String mProbeUniqueID 

This is calculated based on the object's persistantID.

Effectively a unique hash ID to set it apart from other probes Used to ensure the cubemaps named when baking are unique

F32 mRadius 

The radius of the probe's influence.

Only really relevent in Sphere probes

ReflectionModeType mReflectionModeType 

Used to dictate what sort of cubemap the probes use when using IBL

U32 mRefreshRateMS 
bool mResourcesCreated 
CubemapData * mStaticCubemap 
bool mUseHDRCaptures 

Prevents us from saving out the cubemaps(for now) but allows us the full HDR range on the in-memory cubemap captures.

ReflectorDesc * reflectorDesc 

Protected Static Attributes

bool smRenderPreviewProbes 

Public Functions

ReflectionProbe()

~ReflectionProbe()

_onRenderViz(ObjectRenderInst * ri, SceneRenderState * state, BaseMatInstance * overrideMat)

bake()

Invokes a cubemap bake action for this probe

createClientResources()

createEditorResources()

DECLARE_CONOBJECT(ReflectionProbe )

getIrradianceMapPath()

This gets the filepath to the irradiance cubemap associated to this probe.

In the event the probe is set to use a static cubemap, it is the irradiance version of the cubemap's file

return:

The filepath to the irradiance cubemap

getPrefilterMapPath()

This gets the filepath to the prefilter cubemap associated to this probe.

In the event the probe is set to use a static cubemap, it is the prefiltered version of the cubemap's file

return:

The filepath to the prefilter cubemap

getScale()

Reimplemented from: SceneObject

getTransform()

Reimplemented from: SceneObject

handleDeleteAction()

Reimplemented from: SimObject

inspectPostApply()

Reimplemented from: SceneObject

Reimplemented by: BoxEnvironmentProbe, Skylight, SphereEnvironmentProbe

onAdd()

Reimplemented from: SceneObject

Reimplemented by: Skylight, SphereEnvironmentProbe

onRemove()

Reimplemented from: SceneObject

Reimplemented by: Skylight, SphereEnvironmentProbe

packUpdate(NetConnection * conn, U32 mask, BitStream * stream)

Reimplemented from: SceneObject

Reimplemented by: Skylight, SphereEnvironmentProbe

prepRenderImage(SceneRenderState * state)

Reimplemented from: SceneObject

Reimplemented by: Skylight, SphereEnvironmentProbe

processBakedCubemap()

Updates the probe's cubemaps in the array when using baked cubemaps

processDynamicCubemap()

Updates the probe's cubemaps in the array when using dynamic reflections

processStaticCubemap()

Updates the probe's cubemaps in the array when using a static cubemaps

setPreviewMatParameters(SceneRenderState * renderState, BaseMatInstance * mat)

setScale(const VectorF & scale)

Reimplemented from: SceneObject

setTransform(const MatrixF & mat)

Reimplemented from: SceneObject

unpackUpdate(NetConnection * conn, BitStream * stream)

Reimplemented from: SceneObject

Reimplemented by: Skylight, SphereEnvironmentProbe

updateProbeParams()

Updates the probe rendering data

Reimplemented by: BoxEnvironmentProbe, Skylight, SphereEnvironmentProbe

writeField(StringTableEntry fieldname, const char * value)

Reimplemented from: SceneObject

Public Static Functions

_doBake(void * object, const char * index, const char * data)

_setEnabled(void * object, const char * index, const char * data)

_setRadius(void * object, const char * index, const char * data)

_setReflectionMode(void * object, const char * index, const char * data)

_toggleEditPosOffset(void * object, const char * index, const char * data)

initPersistFields()