This post should have been my first screencast doing some texturing work, but alas as live plays, things have gone a bit different.
My intention was to finish one shot and then do the screencast. This specific shot is one of the very first, I had ready in my mind when starting out with my movie. So the attention to detail was maybe a bit higher then usually 🙂
The shot starts with a closeup on Ara’s face and I wanted the lighting to be without errors. I have already pointed out in this post, that SSS needs extra attention when using it in offline post processing.
My goal is to have one layer for each light class with the shadow pass and/or AO pass separately. With this I have full control over the shot lighting in the compositor, which is a huge time saver in comparison to tweaking the lights in the shot itself.
You can see an example and breakdown in this post.
In previous shots ( especially closeups ), I already experienced strange shadow artifacts, coloring Ara’s face in undesired ways. I investigated this a bit but eventually gave up to find the cause and always found a way to adjust the lighting and do other tricks to minimize the effect.
This time the weird effect struck home with full force. No trick worked here and thats when I decided, I wanted to know what the real cause is.
First I show you an image where the problem shows very clearly. There are strange blueish edges along the nose.
No lets track this down.
Well, I knew that the problem has to do with the shadow passes and the way I use them.
This is a clay render with one light and the shadow pass included in the render.
I want to have control over the shadow and thus render two passes and multiply the (modified) shadow pass with the diffuse pass to get my result.
You see that I get the exactly same result as rendering it directly, but with the added bonus of being able to change the shadow’s attributes.
Using two lights ( one at each side of Ara giving 4 passes ) gives me this result.
This is still fine. The visible terminators have nothing to do with the way the shadow pass is included but with how blender renders the material.
Now lets have a look at the render setup I am using in my shots where SSS is used. To counter the fact that SSS takes all active lights into account, I have to use a separate scene for each SSS pass I need, which is usually two. Rendering out a single scene does all the one time preparation ( setting up vector blur, creating strands, calculating shadow maps etc) for each scene again. As soon as you have hair using a lot of screen space, you get huge times for this sort of preparation work.
In the past I came up with a solution to just render Ara and her dress in the SSS scenes ( without shadow included ) and do hair passes with the lights used in the SSS passes in the main scene (again without shadows). In the main scene I also added another renderlayer per SSS light with all clay material of Ara with dress and hair to get the shadow information for this setup.
In the compositor the hair gets ‘Alpha Over’ed over the SSS pass and the result gets multiplied with the shadow pass.
This setup saves me the scene render preparation for each SSS pass I need. I did measurements and in a typical shot this setup saved me ~25% render time compared to doing the hair in the SSS scene as well.
Well, I should have known then. Its not legal to use the shadow pass of a clay render with other materials than clay, especially not with SSS enabled ones. The shadow pass somehow includes information about other lights as well and thus modifies the intensity of the shadow areas. Using only one light would be ok with that, but when using SSS, you actually transport light through the object and thus have lit areas where no light hits directly. This is the cause of the strange marks on Ara’s face.
After realizing my error, I tried to render the SSS passes with hair and shadows included to do a quick test and this is what I get then.
If we compare the single components directly we can notice subtle differences, notably some of the shadow areas being abit brighter in the correct SSS version. See below for a comparison: left is SSS rendered without shadow and with clay shadow multiplied, right is SSS rendered with shadow:
Thats approach to render the shadow directly with the SSS is ok, but with one little fault. I have no separate shadow passes. As there is no way to include render passes from other scenes into one multilayer file, you have to create individual files for each such ‘external’ layers. If I want to have the shadow passes as well, this just adds more files to my workflow, which is something I wanted to avoid. So before extending the render setup I tried to see how I could use the shadow passes generated from an SSS run.
Well, below you see how a shadow pass looks like for he above example.
I have no idea how this is supposed to be used to generate correct images. This pass has even values way beyond 1. I tried several approaches, but in the end I just guess that this is simply not possible. It may have to do with the material being node based. Extracting the diffuse pass e.g gives me just the diffuse part of the sub material which happens to be selected in the node tree. And with 3 SSS materials mixed in the node setup I fear he shadow pass calculation gets messed up as well.
Another idea was to use a shadow material, where the OnlyShadow attribute is set. With this, shadows get rendered as alpha values. I could use then the alpha layer as my shadow pass. This works different but still has the same problems as the shadow pass approach
Ah, well. So it was a hard decision, but I will include the hair in the SSS passes as well and live with longer render times and forget about directly tweaking the shadow quality.
A slight advantage is that the compositor node setup gets a bit less complex …
Now, lets see, thats 12 shots so far where I already have applied the original approach, so back to work and restructure render setup and compositing …