| Previous Topic (Thinking Particles Groups) | Up (Contents) | Next Topic (Shadows On Geometry) |
Matte Objects
Available in: Krakatoa v1.0.0 and higher.
- 1 Matte Objects
- 1.1 Enable Matte Objects
- 1.2 Use Depth Maps
- 1.3 Named Selection Sets
- 1.3.1 Creating A Matte Objects Named Selection Set
- 1.3.2 Adding Matte Objects By Creating Another Named Selection Set
- 1.3.3 Adding Matte Objects To The Existing Named Selection Set
- 1.3.4 Adding Matte Objects Using The 3ds Max Named Selection Sets Editor
- 1.3.5 Removing Objects From The Matte Objects Named Selection Set
- 1.4 Load Initial Depth Map File Sequence
Krakatoa is a specialized particle renderer. In order to integrate the resulting particle renders into final shots, the renderer has to allow the interaction of particles with scene geometry, including occluding particles with scene objects and casting shadows from scene objects onto particles.
Enable Matte Objects
This option can be used to toggle the use of Matte Objects on and off. It is checked by default, but also requires a valid Named Selection Set or Matte Objects File Sequence to be specified in order to use Matte Objects. Uncheck this option if you have specified valid Matte Objects but want to disable them temporarily.
Use Depth Maps
Depth Maps can be used to speed up shadow casting from Matte Objects onto particles by calculating a Z-Depth map from the point of view of each light. The Depth map contains the distance from the light to the closest matte object surface in each texel. The size of the map is taken from the Shadow Map size of the light. Then, particles that are farther than that distance along the same line of sight will be considered in shadow.
When the >Use Depth Maps is disabled, each particle will be checked against the matte objects by shooting a ray from the light source to the particle. If the number of particles is higher than the number of texels in the Depth Map, using Depth Map makes sense to accelerate the shadow casting process.
For example, a Depth Map with size of 1000x1000 will have to evaluate 1 million texels by shooting 1 million rays through the scene. If the scene has 10 million particles, the Depth Map method would be obviously an order of magnitude faster. If the number of particles is less than the number of texels in the Depth Map, raytracing the shadows of matte objects could turn out to be faster.
Named Selection Sets
In this mode, the user can specify a sub-set of all scene objects using one or more Named Selection Sets. This is especially important when using the vertices of some geometry objects to render as particles.
When this mode is selected, a group of additional controls will become enabled:
- The left list box will display all Named Selection Sets found in the scene.
- The right list box will define the Named Selection Sets to be used for Matte Objects.
- To update both lists, press the "Update Named Selection Set Lists" button.
- In 3ds Max 9 and higher, creating, deleting and renaming Named Selection Sets via the regular 3ds Max UI will automatically trigger an update of the Krakatoa GUI. In 3ds Max 8 and earlier, the user will have to press the Update button after these operations.
- To move a Named Selection Set from one list to another, either double-click it with the mouse or press the corresponding [>] or [<] button located between the lists.
- To see the objects which are part of a single Named Selection Set on the Matte Objects list, press the "Select Highlighted" button - the objects in the current Named Selection Set highlighted in the right list will be selected in the scene.
- To see all matte objects defined by all Named Selection Sets on the Matte Objects list, press the "Select All" button - all will be selected in the scene.
To simplify the creation and updating of Named Selection Sets used as Krakatoa Matte Objects, the GUI provides a shortcut to enter a name of a new or existing Named Selection Set and a button to Create or Update it using the current scene selection.
Creating A Matte Objects Named Selection Set
- Create 3 spheres to use as Matte Objects.
- Select the 3 spheres.
- The default name in the edit text field is "KrakatoaMatteObjects" - leave it as is.
- Press the "Create/Update Matte Selection Set" button.
RESULT: A new Named Selection Set will be created. It will contain the 3 selected spheres and its name will appear both on the Named Selection Sets drop-down list of the Main Toolbar of 3ds Max AND on the Matte Objects Named Selection Sets list in the Krakatoa GUI.
Let's create two Boxes to also be used as Matte Objects. You can either create a new Named Selection Set, update the existing one that contains the spheres using Krakatoa's GUI, or use the Named Selection Set editor of 3ds Max to do the same.
Adding Matte Objects By Creating Another Named Selection Set
- Select the two boxes
- Enter a new name in the text field, for example "Matte Boxes"
- Press the "Create/Update Matte Selection Set" button.
RESULT: A second Named Selection Set called "Matte Boxes" will be added to the right list and to the scene. Both the spheres and the boxes will be used as Matte Objects.
Adding Matte Objects To The Existing Named Selection Set
- Click on the first Named Selection Set called "Krakatoa Matte Objects" - note that its name will be placed automatically into the edit text field!
- Press the "Selected Highlighted" button - all 3 spheres will be selected.
- While holding the Ctrl key pressed, click each of the two boxes - this way you will have the 3 spheres and 2 boxes selected.
- Press the "Create/Update Matte Selection Set" button to UPDATE the existing Named Selection Set
RESULT: All 5 objects - 3 spheres and two boxes - will now be used as Matte Objects.
Adding Matte Objects Using The 3ds Max Named Selection Sets Editor
- Click the Edit Named Selection Sets" icon in the Main Toolbar of 3ds Max.
- Locate the "KrakatoaMatteObjects" selection set and expand it.
- Select the two boxes in the scene and click the Add Selected Objects icon (3rd from the left with + sign and and arrow).
RESULT: The two selected boxes will be appended to the existing Named Selection Set and will be used by Krakatoa as Matte Objects.
Removing Objects From The Matte Objects Named Selection Set
- Click on the first Named Selection Set called "KrakatoaMatteObjects" - note that its name will be placed automatically into the edit text field!
- Press the "Select Highlighted" button - all 3 spheres will be selected.
- Press and hold the Alt key and deselect one of the 3 spheres - now only 2 are selected.
- Press the "Create/Update Matte Selection Set" button to UPDATE the existing Named Selection Set.
RESULT: Only the two selected spheres will remain part of the selection set, the deselected one will not render as matte object anymore.
NOTE: If the Render Particles option in the Main Controls rollout is set to "All Geometry Vertices", any renderable (non-hidden, render property checked) geometry objects not used as Matte Objects will be considered particle systems!
Load Initial Depth Map File Sequence
This group of controls allows you to use pre-saved depth maps from any Max renderer (incl. Scanline, mental ray, Brazil r/s, finalRender, Gelato and V-Ray) and use the depth values stored in the sequence to control the visibility of particles during the final pass. This option provides 3 modes:
- Camera Space Z Depth - this mode is supported by Gelato. The Z-Depth values contain the actual distance from the surface to the image plane in world coordinates where a value of 0 is at the image plane and 100.0 is at 100 generic units in front of the camera parallel to the camera's negative Z axis.
- Normalized Z Depth - this mode is supported by some 3rd party renderers like V-Ray using a custom Render Element. The files contain a normalized distance between two user-defined values (Near and Far) with the black values at the near distance and white values at the far distance. When loading such files, the Z Near and Z Far spinners have to be set to the same values as in the Render Element that generated the sequence.
- Inverted Normalized Z Depth - this mode is supported by 3ds Max and most 3rd party renderers. In this mode the files contain normalized values between the user-defined Near and Far distances, but the white values are at the Near distance and the black values are at the Far distance. When loading such files, the Z Near and Z Far spinners have to be set to the same values as in the Render Element that generated the sequence.
- To enable this feature, select a valid file sequence using the [...] button in front of the text field and check the >Use Depth Map File Sequence option.
- The [E] button will open the Windows Explorer at the current path (if it is a valid path).