class MRenderShadowData

Jump to documentation

Access Rendering Shadow Map Data (OpenMayaRender) (OpenMayaRender.py)

public members:

MRenderShadowData ()
void worldToZbuffer ( const MFloatPoint & worldPoint, MFloatPoint & screenPoint) const
void zbufferToWorld ( const MFloatPoint & screenPoint, MFloatPoint & worldPoint) const
bool perspective
set if the light has a perspective projection
bool useMidDistMap
set if the light generates a depth and midDist map
enum LightType
Light Types
kInvalid
kPoint
kDirectional
kSpot
LightType lightType
the type of light the shadow map is generated for
unsigned short shadowResX
the x resolution of shadow map
unsigned short shadowResY
the y resolution of the shadow map
MFloatPoint lightPosition
position of the light in world space
MFloatMatrix projectionMatrix
projection matrix for the light
MFloatMatrix perspectiveMatrix
perspective matrix for the light


float * depthMaps
the output depth map
float * midDistMaps
the output mid distance map

Documentation

Access Rendering Shadow Map Data (OpenMayaRender) (OpenMayaRender.py)
Description

The shadow map can be changed by instanciating a MRenderCallback and overriding shadowCastCallback(). When this is invoked, a MRenderShadowData is passed as an argument; the depthMaps and midDistMaps members can then be changed by this API. Methods and data are provided to assist in transforming back and forth from world space to z buffer space. Paint Effects and Fur are two examples which use this mechanism to change the shadow map.

To prevent self shadowing, Maya uses a mid distance map to resolve the ambiguity. Details of this technique can be obtained from Graphics Gems III, "The Shadow Depth Map Revisited".

Functions

MRenderShadowData:: MRenderShadowData ()
Description

Default Constructor

void MRenderShadowData:: worldToZbuffer ( const MFloatPoint & inPoint, MFloatPoint & outPoint ) const
Description

Converts world space point to shadow map. Shadow depth is stored in inPoint.z.

Arguments

  • inPoint The original point in world space
  • outoint The converted point in shadow map

void MRenderShadowData:: zbufferToWorld ( const MFloatPoint & inPoint, MFloatPoint & outPoint ) const
Description

Converts shadow map point to world space. Shadow depth is stored in inPoint.z.

Arguments

  • inPoint The original point in shadow map
  • outoint The converted point in world space

This class has no child classes.


Autodesk® Maya® 2008 © 1997-2007 Autodesk, Inc. All rights reserved. doc++ Copyright