Purpose

To improve the recognition of objects, the SoShadowCast module renders a drop shadow including shadow plane of a subgraph connected to this module. This shadow plane is scaled such that all objects cast a shadow on it whereby its orientation remains fixed with regard to the observer. If you need to select objects in shadows use the SoPickableShadowCast module.

See: Illustrative Shadows: Integrating 3D and 2D Information Displays. Felix Ritter, Henry Sonnet, Knut Hartmann, and Thomas Strothotte. Proceedings of ACM Intelligent User Interfaces 2003, pp. 166-173.

../../../Modules/Inventor/SoShadow/mhelp/Images/ShadowCast.png

Usage

Connect the SoShadowCast module to the scenegraph and connect a subgraph to this module.

Details

The subgraph is rendered twice, once more for the shadow projection.

Tips

Does only work with polygonal models.

Input Fields

child

name: child, type: SoNode

The module has a group input connector to connect one or more subgraphs.

Output Fields

self

name: self, type: SoNode

The module has one output connector to include the module into the parent scene.

Parameter Fields

Field Index

Cast Color: Color
Light Mode: Enum
Light Pos: Vector4
Plane Angle: Float
Plane Color: Color
Projection Plane: Plane
Render plane: Bool
Render shadow cast: Bool

Visible Fields

Light Pos

name: lightPos, type: Vector4, default: -1 -1 -1 0

The value of this field is only used if Light Mode is Free and the field is not ignored (it is ignored by default and falls back to Plane mode). The value specifies the position or direction of the light. If the fourth component of the Light Position vector (w) is 0, a directional light source is assumed and the first three components specify the direction of the light. If the fourth component is 1, a shadow for a positional light source is computed.

Light Mode

name: lightMode, type: Enum, default: PLANE

Determines the virtual light source for the shadow projection. In mode Free, the position or direction of light can be passed via the field Light Pos. Mode Plane uses a directional light perpendicular to the shadow plane. In mode Camera, directional light is emitted from a direction opposite to the up vector of the virtual camera.

Values:

Title Name
Free FREE
Plane PLANE
Camera CAMERA

Projection Plane

name: projectionPlane, type: Plane, default: 0 1 0 0

Specifies the four components of the plane equation. This field is ignored by default and the plane is aligned according to the virtual camera.

Plane Angle

name: planeAngle, type: Float, default: 0.69813168, minimum: 0, maximum: 1.57

Determines the rotation of the plane around the side vector of the virtual camera, the tilting of the plane towards the observer.

Cast Color

name: castColor, type: Color, default: 0.649999976158142 0.620000004768372 0.509999990463257

Specifies the default color of the drop shadow.

Render shadow cast

name: castRender, type: Bool, default: TRUE

Determines, whether a shadow is rendered onto the shadow plane.

Render plane

name: planeRender, type: Bool, default: TRUE

Determines, whether a shadow plane is rendered or not.

Plane Color

name: planeColor, type: Color, default: 0.889999985694885 0.860000014305115 0.699999988079071

Specifies the color of the shadow plane.