How to use this add‐on v1.3 - OlyDJ/ThreeLayerRendering GitHub Wiki
You must select Focus object and camera (or leave it blank and active camera will be used instead), if you are going to split objects. After splitting, you will be able to use View Layers interface. Otherwise press "Just use View Layers" button (Note that you will not be able to Split Objects later).
If you just want to use View Layers interface skip "Split Objects" section: View Layers
Or if you just want to auto-compose EXR files skip "Split Objects" and "View Layers" sections: Composition Nodes
Split Objects
Once focus is selected, Split Objects panel will be visible, and View Layers will temporarily disappear (don't worry, it will be available after first Split Objects process).
"Clean unused data" does exactly that. For objects with Geometry Nodes, and with Instances On Points node/s in the root of the node tree, use Smart Geo Nodes option (Instead of deleting geometry, it will prevent to create that instances)
Now select the objects or a collection you want to split (for this example I will choose a collection), and press "Process selected collection".
As you can see, selected collection had been disabled, and TLR has created a new collection. Inside of it, there are 4 objects (TLR internal objects) and 3 collections (Background, Focus and Foreground). Inside all of them, we find the selected collection.
Now I select another collection that contains objects with Geometry Nodes, and "Instances on Points" node in the root of the node tree.
You can process any type of object at the same time, TLR will process each object with its own method. But always try to keep your scene organized, is key!
On the first "Split Objects" process, you will see some new panels (Split, Foreground, Focus and Culling settings).
This is basically what is happening right now:
We have a camera (Red), a focus object (Blue), a foreground (Green) and a background (Purple). The foreground is connected to the camera and to the focus, so it will grown or screw based on the distance between them along the animation.
Split Settings
Use this option in case of wrong domain (Geometry Nodes objects are not affected by this option). Select an object that had been already process, and you will be able to change its domain type.
Foreground Settings
We can scale "Foreground Width" area to fit our needs on each camera by animating this setting. There is a internal object placed 50m under the camera (Mask_Foreground), TLR detects our processed objects with it. If one of them has 60m, it could interfere and the split would be wrong. Use "Location Z" option if you see wrong behavior on Foreground/Background areas.
Focus Settings
Change Focus location X and Y, and scale X and Y. Both Z values have same purpose as in Foreground Settings. This options are animatable too, so we can adapt Focus on each camera.
Culling Settings
This is the scene without Culling:
And this is with Culling enabled:
Just a moment after enabling Culling you will get smooth Blender interface (Depending on the project size, of course).
We can now adjust the camera side width, the front side width, the location and the scale of the mask. And again, fully animatable, so if Camera and Focus are animated, Background and Foreground areas will change.
View Layers
If "Split Objects" had been used, enable View Layers feature anytime you want by pressing "Create View Layers" button. TLR will create a new View Layer for TLR Background, Foreground and Focus collections. They are already adjusted to "affect" and "holdout" each other.
Otherwise, after pressing "Just use View Layers" button TLR will create a new collection, and a new View Layer duplicating the current one.
(Note that in this tutorial I've used "Split Objects", if not, "TLR" and "TLR - Split Objects" panels will not be visible.
View Layers settings now are visible, and we can start working with layers.
First we have "Create View Layer from collection" (or objects) button. If you select a collection or an object (the clouds for example), this option will create a new View Layer with its name.
Next we have the View Layers list. We can filter TLR layers with "Show only TLR layers" button. All the items have buttons to "Exclude", "Open" and "Remove" ("Open" and "Remove" are only visible if the item is selected).
Change View Layers order
"Move up" and "Move down" buttons appear under the list ONLY if "Show only TLR layers" is disabled. With them we can change View Layers order (Note that while changing all other options are gone, they will be back after "Applying" or "Cancel" new order).
Depending on the amount of layers, and the project size, it can take a while to finish (over 60 secs in this project and computer).
View Layers workflow
Ok! For those of you that are newbies or with low experience: just do not look or interact with Outliner or Properties panels.
For the rest: remove or stretch those panels to get rid of the collections, objects, passes, etc. options. We don't need them anymore, and they will mess up your head. Believe me, I've been there for 2 weeks (And I created it!!).
Back to the list... When you select an item, the next options will change accordingly. We can set passes for the selected item, without actually changing the current View Layer.
All passes settings are here, so the amount of time and system resources to configure an scene is way better.
View Layers collections
"Show View Layer Collections" will present you a collections list (similar to Outliner) that works exactly as Passes: Select an item in View Layers list, and set its collections options.
There are buttons to "Expand all" and "Collapse all" collections with children.
Create Composition node
Finally we have "Create Composition node" panel. There are 2 ways to use this feature:
-
Render at least the first image of the animation.
-
Or (in any project, even a new one) select the first image of an EXR sequence you want to compose.
Render first image method
Before starting, make sure "OpenEXR MultiLayer" is set as the output format under Output > Output > File Format in Properties:
Setting a (lossless) compression codec is recommended, but not required.
Once at least the first frame of an animation is rendered, TLR will detect it and enable the "Create Composition node" button. NOTE: Rendered image must have the same layers as your project. And the order is taken from View Layers order.
After pressing it, you can select if you want "Light Correction node", "Glare node", "Lens Distortion node", "Tonemap node", "Film Grain node" and/or "Vignette node". Those nodes will be placed at the end, affecting all layers.
Now in Composition Editor you will find a group named as the rendered image.
All layers and its passes (Diffuse, Glossy, Transmission, including Direct, Indirect and Color) had been mixed to compose the final image. All nodes of each layer are framed, and frames have different colors. Perfect point to start compositing.
Effect nodes have some basic settings (there will be more Effect nodes in future releases).
TLR will mix all passes (Direct, Indirect and Color) of Diffuse, Glossy and Transmission, as well as Emission and Environment of each layer if they exists.
Select EXR image method
On any project, even a new one, select first EXR image of the sequence you want to compose in "Composition Node" panel.
You can change the order if you want.
Press "Create Composition node" button, and select if you want "Light Correction node", "Glare node", "Lens Distortion node", "Tonemap node", "Film Grain node" and/or "Vignette node". Those nodes will be placed at the end, affecting all layers.
Now in Composition Editor you will find a group named as the rendered image. All layers and its passes (Diffuse, Glossy, Transmission, Volume, including Direct, Indirect and Color) had been mixed to compose the final image. All nodes of each layer are framed, and frames have different colors. Perfect point to start compositing.
Effect nodes have some basic settings (there will be more Effect nodes in future releases).
TLR will mix all passes (Direct, Indirect and Color) of Diffuse, Glossy and Transmission, as well as Emission and Environment of each layer if they exists.
Thats all!