During these weeks before the filming and the actual work on the shots starts we are doing several tests to check out the production tools. One of them is obviously Cycles. In this particular test we wanted to see how far we can go with the integration of the robot hand in a shot.
Of course it is obvious that the hand is fake, after all it’s a robot hand, so we also put in objects that could in theory be actually standing on the table. We went for a mirror ball (because there was an actual mirror ball in the scene, so, easy to compare) and a plastic toy.
To create believable light and reflections we took a RAW image of the mirror ball and mapped it to the environment (anyone knows a tool to convert CR2 images to EXR, other than Aperture?). Cycles node-shaders allowed to adjust the amount of reflection and lighting influence of the environment material, as well as tint and contrast of the reflections.
The mirror ball rendered very fast and works quite well, even though not perfect at all. Integrating the little orange dragon also worked pretty straight-forward in terms of light.
The tricky thing however was the shadow. We wanted to create an extra challenge for us, so we put the little dragon both in sun and in shadow. It is always a challenge to merge a CG shadow with a real one, not only because you have to get the same intensity and tint, but also because of the transition area of CG and real shadow. During the work we realized that it is impossible to separate shadows from different objects from each other in Cycles. In Blender Internal it would have been possible to assign the shadow casting objects and the shadow receiving objects to different render layers, thereby controlling what object receives which shadow. But Cycles works differently, lamps shine “through” render layers. That makes some things easier, but other things harder, like controlling the shadows. Therefore Brecht has implemented a new feature, which lets you exclude certain objects from a render layer.
This gave us the control to have the little dragon cast a shadow onto the table, but also receive a shadow from a fake shadow-caster, but without that shadow-caster affecting the shadow-catcher (the table plane). With Blender’s compositing nodes we subtracted the actual shadow on the table from the fake one by using a Luma Matte.
But still, because of the camera motion and the motion blur, which results in some imperfections in the track, the trick with the shadow doesn’t really work in every frame. At some points you can see double-shadows, which totally gives it away. So, lesson learned: If possible, avoid CG objects being partly in real shadow and in CG shadow!
Another thing that we realized was that Cycles sometimes problems with glossy samples at glancing angles, which lead to noise that doesn’t go away even with 1000 samples. But having Brecht at the institute it was just a matter of one hour or so until we had a fix for that: blurring glossy rays that hit sharp highlights. I don’t really understand how exactly it works internally, but: it works!
Setting glossy blur to 1 helps to get rid of noise without any significant loss in quality. Also, clamping overly bright areas helps to get rid of fireflies. So we could reduce render time from almost 1 hour per frame to a few minutes. :)
So a big thanks to Brecht and Sergey for being awesome!