Use the Live Shadow shader to apply real-time shadows to models. You can specify shadow intensity as well as the lights and objects that cast shadows in a scene.There are two methods to create a FBShaderShadowLive object: using the FBShaderManager, or simply by instantiating a class object explicitely.Please consult the application documentation for more infos on shader properties and their effects.This class should not serve as a base class for another class.Sample C++ code:
// Create a shadow shader. HFBShaderShadowLive lShader = new FBShaderShadowLive( "New Shader" ); // Add a cube in its list of affected objects. HFBModel lModel = FBFindModelByName( "Cube" ) if( lModel ) { lShaderShadowLive.Add( lCube ); }
Sample Python code:
from pyfbsdk import * # Create shader. lShader = FBShaderShadowLive( 'New Python Shader' ) # Find a cube to put in our list of affected objects. lModel = FBFindModelByName( 'Cube' ) if lModel: lShader.ShadowCasterProperty.append( lModel )
Public Member Functions |
|
FBShaderShadowLive (str pName) | |
Constructor. |
|
Public Attributes |
|
FBListObject | Lights |
List: List of light object which will produce
shadows. |
|
bool | LocalShadow |
Read Write Property: Creates an
accurate projection of a shadow for each object. |
|
FBListObject | Models |
List: List of object
which when lighted will cast a shadow. |
|
FBShadowFrameType | ShadowFrameType |
Read Write Property: Used to select
the shadow calculation method. |
|
FBAnimatableDouble | ShadowIntensity |
Read Write Property: Controls the
darkness of shadows cast by a selected object. |
|
FBShadowType | ShadowType |
Read Write Property: Indicate which
shadow type is desired. |
|
float | ShadowZOffset |
Read Write Property: Specifies the
offset of the Live Shadow shader's plane from the original selected
plane. |
|
bool | UseGobo |
Read Write Property: Includes the
gobo in the shadow map calculation. |
FBShaderShadowLive | ( | str | pName | ) |
Constructor.
pName | Name of shader. |
Read Write Property: Creates an accurate projection of a shadow for each object.
Read Write Property: Used to select the shadow calculation method.
FBAnimatableDouble ShadowIntensity |
Read Write Property: Controls the darkness of shadows cast by a selected object.
Read Write Property: Indicate which shadow type is desired.
Read Write Property: Specifies the offset of the Live Shadow shader's plane from the original selected plane.