Camera tracking with cycles: transparent objects?

Hi all,

I’ve followed Andrew Price’s tutorial on Camera tracking and managed to finish my experiment with expected results. This was done with the internal render engine:

Now I want to use the Cycles Render, so I removed the car model, inserted a standard “suzanne”, applied a blue diffuse shader and tried to render. Initially I didn’t see anything, but that was due to the film setting not having the ‘transparent’ option clicked. DId that, and then tried again. Result is here. In the first couple of passes in the render I see it renders suzanne ok with the right colors, but at the end in the composition colors disappear, leaving just some transparent form:


here are the nodes:


I’ve followed another tutorial from blender itself (track, match: 20) on youtube, but this seemed to work straight of the box correctly. That was using v. 2.62, I’m now on Ubuntu with standard blender version 2.66.

Am I missing a step in the materials? I read somewhere about needing to use “holdout” materials. Are those necessary and if so, how do you set those up?

The only problem I see is that you are just putting the shadows of the object on your plate. What you should have done is to separate the shadow cast by Suzanne and Suzanne herself. So have a renderlayer with just Suzanne, and another one with just the shadow cast on the plane.

Maybe to keep the setup you have, give Suzanne an unique object index to then use it in a ID Mask node to extract Suzanne and alpha over her afterwards, if that makes sense.

You have your monkey model on a wrong layer. I guess you are using default settings created by “setup tracking scene” button. With those stettings shadow catchers are on bottom left layer and objects that are meant to be seen in the scene are on layer 1. Move Suzanne to layer 1 and that’s all.

Thanks, indeed it was all related to the layer suzanne was created in. I could modify that in the props panel. Another problem that came up was that my shadows disappeared, but I noticed that you had to tick the layer active under the 3D view to get them rendered as well. It’s now all working.