I will continue writing about my experiences working with Clarisse. This time I'm gonna talk about working with layers and passes, a very common topic in the rendering world no matter what software you are using.
Clarisse allows you to create very complex organization systems using contexts, layers/passes and images. In addition to that we can compose all the information inside Clarisse in order to create different outputs for compositing.
Clarisse has a very clever organization methods for huge scenes.
- For this tutorial I'm going to use a very simple scene. The goal is to create one render layer for each element of the scene. At the end of this article we will have foreground, midgrodund, backgorund, the floor and shadows isolated.
- At this point I have an image with a 3DLayer containing all the elements of the scene.
- I've created 3 different contexts for foreground, midground and background.
- Inside each context I put the correspondent geometry.
- Inside each context I created an empty image.
- I created a 3DLayer for each image.
- We need to indicate which camera and renderer need to be used in each 3DLayer.
- We also need to indicate which lights are going to be used in each layer.
- At this point you probably realized how powerful Clarisse can be for organization purposes.
- In the background context I'm rendering both the sphere and the floor.
- In the scene context I've created a new image. This image will be the recipient for all the other images created before.
- In this case I'm not creating 3DLayers but Image Layers.
- In the layers options select each one of the layers created before.
- I put the background on the bottom and the foreground on the top.
- We face the problem that only the sphere has working shadows. This is because there is no floor in the other contexts.
- In order to fix this I moved the floor to another context called shadow_catcher.
- I created a new 3DLayer where I selected the camera and renderer.
- I created a group with the sphere, cube and cylinder.
- I moved the group to the shadows parameter of the 3DLayer.
- In the recipient image I place the shadows at the bottom. That's it, we have shadows working now.
- Oh wait, no that fast. If you check the first image of this post you will realize that the cube is actually intersecting the floor. But in this render that is not happening at all. This is because the floor is not in the cube context acting as matte object.
- To fix this just create an instance of the floor in the cube context.
- In the shading options of the floor I localize the parameters matte and alpha (RMB and click on localize).
- Then I activated those options and set the alpha to 0%
- That's it, working perfectly.
- At this point everything is working fine, but we have the floor and the shadows together. Maybe you would like to have them separated so you can tweak both of them independently.
- To do this, I created a new context only with the floor.
- In the shadows context I created a new "decal" material and assigned it to the floor.
- In the decal material I activated receive illumination.
- And finally I added the new image to the recipient image.
- You can download the sample scene here.