Render Elements
We explain how to use Render Elements to output Pencil+ 4 Materials to separate files.
Create a scene¶
Create a scene using Pencil+ 4 Materials.
In this example, we create three View Layers: "ViewLayer_All" to render all objects, "ViewLayer_Suzanne" to render the Monkey, and "ViewLayer_Sphere" to render the sphere. We specify zones and output them.
Setup View Layers¶
-
Click the Add View Layer button to get three View Layers. Divide the Monkey and sphere objects into two collections to control the rendered objects with View Layers.
-
Set the View Layer names to "ViewLayer_All", "ViewLayer_Suzanne" and "ViewLayer_Sphere".
-
Select each View Layer and set the collection checks to on/off. Uncheck the collections to be excluded and check the ones to be included when rendering.
Render Elements settings¶
-
Check [Pencil+ 4 Material Render Elements] at the bottom of the View Layer properties. The Pencil+ 4 Material Render Elements render paths are added to the Shader AOV. We select the View Layers "ViewLayer_Suzanne" and "ViewLayer_Sphere" which output render elements and enable Render Elements.
-
Select the elements and Zone IDs to output. We enable Zone ID 3 for the Color of "ViewLayer_Suzanne" (and check [Preserve the shape of the zones]) and also enable Zone ID 3 for the Alpha.
-
We enable Zone ID 2 for the Color of "ViewLayer_Sphere" (and check [Preserve the shape of the zones]) and also enable Zone ID 2 for the Alpha.
Compositor settings¶
-
Open the Compositor editor and check [Use Nodes].
-
Add [Render Layers] nodes from [Input] and set the View Layers to be rendered. Next, add [File Output] nodes and connect them to the [Pencil+ 4 Material Render Elements] Color and Alpha sockets of the [Render Layers]. Use the [File Output] nodes to specify the file formats, save paths, etc.
Rendering¶
Render. The color and alpha images of the Zone IDs set in the Render Elements are output to the paths specified in the [File Output] nodes.
You can also check the rendered Render Elements images from the image editor.
Click [Select Layer] in the image editor and select the View Layer of a Render Elements to display its rendering result.
Click [Select Path], to the right of [Select Layer], to select color or alpha.