- In the Material Editor, determine which branch of a material to output as a separate element. For example, an Arch & Design material might contain a Gradient map assigned as a Diffuse Color shader, and one of the Gradient maps could be assigned a Checker map, and one of the Checker maps could be assigned a Noise map. This procedure will assume you want to render the Checker map and its constituent Noise map to an element.
So the material structure would be like this:
A&D material Gradient (Diffuse Color) Checker (Gradient Color #1) Noise (Checker Color #1)
- In the Material Editor, click the map button at the top of the branch you want to output. In this example, you’d click the Diffuse Color map button in the Arch & Design material to open the Gradient map settings. Youd then click the first map button (Color #1) on the Gradient Parameters rollout to open the Checker map settings.
- Click the map button just above the map rollouts on the right side of the Material Editor (in this example, Checker) to open the Material/Map Browser.
- On the Material/Map Browser, double-click the mr Labeled Element item. This opens the Replace Map dialog.
- Make sure “Keep old map as sub-map?” is chosen, and then click OK.
- You now see the mr Labeled Element Parameters rollout. If you click the Shader/Map To Store (Passthrough) button, labeled “M”, you can access the branch that will be output to the render element: the Checker map containing the Noise map.
- If you clicked the M button, go back up to the parent mr Labeled Element shader, and then enter a name for the element in the Label field. In this example, the name could be checker/noise branch.
The material structure would now be like this (new map in italics):
A&D material Gradient (Diffuse Color) mr Labeled Element shader (Gradient Color #1) Checker (mr Labeled Element shader map) Noise (Checker Color #1)
- On the Render Setup dialog Render Elements panel Render Elements rollout, click Add. Choose the mr Labeled Element item from the list.
- On the Parameters rollout for the element, enter the name you specified in step 7 in the Label field.
- Set up the other Render Element parameters as necessary and then render the scene.
Your custom element is rendered to an image file.
The following illustration shows the example described in the preceding procedure. The left-hand image shows the full material, with the Noise inside the Checker inside the Gradient, and the right-hand image shows a labeled element containing only the Noise inside the Checker. The element renders only the part of the Checker map that is used by the Gradient map.
Left: Full rendering
Right: Labeled element