Viz Artist

Version 3.10 | Published May 03, 2018 ©

Mask Source and Mask Target

images/download/attachments/27789346/viz_icons_mask_source_target.png
With the Mask (Source and Target) plug-in one Container can act as a mask for other Containers. The Mask Container is called the source and the Containers which are affected by the source mask are called targets. A Container affected by a mask becomes transparent where the mask covers it.

images/download/attachments/27789346/plugins_container_mask_result.png
Due to graphics hardware limitations, currently Viz Artist supports a maximum of eight different target and source layers for one object. This means that any target within a layer will be affected by all masks for the same layer. For example, if a mask has the layers 1, 2 and 3 selected, it will affect all targets that have 1, 2 or 3 selected.

Enable shadows in the Global Settings Panel:

images/download/attachments/27789346/plugins_container_mask-shadows-globalsettings.png
Layers 7 and 8 may not be available because global shadow settings are enabled by default. Shadows use two layers of the mask plug-in, but can be set to off in Global Settings Panel, to use all eight layers.

In the Global Settings Panel define if a mask layer is to be drawn inverted. Normally the mask cuts a hole in the mask target where it covers it. If a layer is selected to be drawn inverted the opposite situation is the case. Only where the mask covers the mask target will the target be visible.

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

This section also contains information on the following topics:

Mask Source and Mask Target Properties

images/download/attachments/27789346/plugins_container_mask-source-editor.png

  • Layer: Sets the layer the mask should have an effect on. This allows the creation of more than one mask that will have an effect on the target

  • Inherited: (Mask Source Only) When enabled (On), all Sub-Containers of the mask source will mask the target. If disabled (Off) all Sub-Containers of the mask source will not mask the target as it no longer inherits the mask properties

  • Force Visible: (Mask Source Only) When enabled (On), the geometry serving as mask source will be rendered in the scene editor, even when not selected. When disabled (Off), the mask source geometry will only be rendered when selected. This enables the designer to work more efficiently with multiple mask sources when designing the scene. The mask source geometry never gets rendered on the output.

To Add a Mask

images/download/attachments/27789346/plugins_container_mask_tree_example.png

  1. Add three Containers to the Scene Tree.

  2. Name them source_1, source_2 and target.

  3. Add a Font and the Mask Source plug-in to the source_1 Container.

  4. Add a Rectangle and the Mask Source plug-in to the source_2 group.

  5. Add a Rectangle, material (e.g. red) and the Mask Target plug-in to the target Container.

  6. Open the source_1Transformation Editor:

    1. Set Axis Center X and Y to C

    2. Reset Position X and Y to 0.0.

  7. Open the source_1Text Editor:

    1. Enter some text (e.g. Vizrt).

  8. Open the source_1 Mask Source editor:

    1. Set Layer to 1.

  9. Open the source_2Transformation Editor:

    1. Set Position X to -120.0 and Y to -70.0.

  10. Open the source_2 Rectangle editor:

    1. Set Width and Height to 50.0.

  11. Open the source_2 Mask Source editor:

    1. Set Layer to 2.

  12. Open the target Rectangle editor:

    1. Set Width to 300.0 and Height to 200.0.

  13. Open the target Mask Target editor

    1. Enable Layer 1 and 2.

      images/download/attachments/27789346/plugins_container_mask-not-inherited.png
  14. Add a Container as a Sub-Container of source_2.

  15. Name it source_inherited.

  16. Add a Circle to the source_inherited Container.

  17. Open the source_inheritedTransformation Editor:

    1. Set Position X to 240.0.

  18. Open the source_inherited Circle editor:

    1. Set Radius to 25.0.

      images/download/attachments/27789346/plugins_container_mask-inherited.png
  19. Open the source_2 Mask Source editor

    1. Disable Inherited (Off).

    • This should make the Circle disappear as it no longer inherits the Mask Source properties.