Viz Artist

Version 3.9.0 | Published December 13, 2017 ©

Shadow Caster and Shadow Receiver

images/download/attachments/27789346/viz_icons_shadow_caster_reciever.png
The Shadow Caster and Receiver plug-ins are used to enable an object’s shadow to reflect on another object. To create a shadow item in a scene, two containers at a minimum must be used. The caster plug-in must be attached to one container and the receiver function to the other.

The container acting as the caster must be positioned between the receiver container and a light source. For correct lighting calculation, a material is also required on the container.

Objects that can function as a shadow receiver should be a built in 2D geometry or a font. An imported 2D will not work.

Note: This plug-in is located in: Built Ins -> Container plug-ins -> Global

This section also contains information on the following topics:

Shadow Caster Properties

images/download/attachments/27789346/plugins_container_shadow_caster_editor.png

  • Lights: Allows you to select which light sources are to shine on the caster object and thereby producing the shadow/shadows.

  • Alpha: Sets the alpha value and hence the transparency of the shadow being cast on the receiver objects.

  • Color: Allows you to define the shadows color.

  • Auto-Fading: With this option enabled, if you fade out a caster object either by using the alpha function or by adding a material with a low alpha value, the shadows created by the caster will fade correspondingly. The option is enabled by default, since it looks right that the shadow fades out when the caster object fades out.

  • Layer: Allows you to select by which layer(s) the caster will cast shadow. You can select up to 8 layers. Each layer corresponds to the layer selected in the Receiver objects. If you want all shadow casters to cast shadow on all receivers, you can set all layers on all casters and receivers to 1. If you want one caster to create shadow on some receivers and another caster to create shadow on different receivers, you select different layers for the sets of casters and corresponding receivers. Casters and receivers can have multiple layers enabled at the same time so you can set up a great number of combinations of caster/receiver combinations.

Shadow Receiver Properties

images/download/attachments/27789346/plugins_container_shadow_receiver_editor.png

  • Alpha: Sets the alpha value.

  • Clipping: With clipping enabled the shadow will be cut on the border of the object. With clipping disabled, the shadow will be rendered onto the background outside the object, which normally looks wrong. Rendering with the clipping options set takes more resources than without. If you for instance have an infinite floor or a room with walls, you can switch of clipping without seeing the “false” shadows, and thereby save some rendering performance.

  • Culling: With culling enabled, Viz Artist will decide in advance of the rendering process if the shadow will be visible or if it will be hidden by other objects. If that is the case it will skip it in the render process. If you know for sure that the shadow for an object in a scene will be rendered visible for the whole object, you can disable culling to save some rendering time, but the effect is marginal.

  • Show Receiver: Hides or shows the receiver object. If it is hidden, the shadow will still be visible.

  • Draw Key: Adds key to the shadow. When enabled, the receiver must be hidden for the key to be drawn.

  • Key Value: Sets the key value.

    Note: The Key Value setting is not available when Shadow Type in the Global Settings Panel is set to Shadow Map.

  • Layer: Allows you to select by which layers the receiver will receive shadow. You can select up to 8 layers. Each layer corresponds to the layer selected in the caster objects. If you want all shadow casters to cast shadow on all receivers, you can set all layers on all casters and receivers to 1. If you want one caster to create shadow on some receivers and another caster to create shadow on different receivers, you select different layers for the sets of casters and corresponding receivers. Casters and receivers can have multiple layers enabled at the same time so you can set up a great number of combinations of caster- and receiver combinations.

To Cast a Shadow

images/download/attachments/27789346/plugins_container_shadow_tree.png

  1. Add a group container to the Scene Tree

  2. Name it Sources.

  3. Add a Fontstyle and the Sphere and Cylinder Geometries as Sub-Containers of Sources.

  4. Add a Material and the Shadow Caster plug-in to each Sub-Container.

  5. Add a Group Container at the same level as the Sources Container

  6. Add a Rectangle Geometry, a Material and the Receiver plug-in to it.

    images/download/attachments/27789346/plugins_container_shadow_result.png
  7. Position the Rectangle and the other objects such that the Sphere, Cylinder and text casts a shadow on the rectangular surface.

    Caution: Containers are rendered twice when shadows are used.

Shadow Receiver Known Limitations

With shadows in Stencil Mode, the current implementation of the shadow receiver assumes that the receiving surface is flat and a standard geometry object, such as a rectangle, orientated on the XY plane. Non-flat geometries, and planes which are not extending in the XY plane, will not produce a properly casted shadow. However, by activating Shadow Map for the desired light source, shadows will render correct. Always make sure that the receiving object has a material.

See Also