Rendering one pass only to avoid unnecessary computations in Cycles

Using Cycles, I only need to render one pass (depth map and surface Normals) of a 3D shape in the scene. I do not need the RGB rendering at all although most of the computation is spent on rendering RGBs. Un-checking Combined in Render Layers --> Passes seems to do nothing. Using nodes, connecting either depth map or Normal to the composite node will also do nothing as mentioned here too. I tried setting bpy.context.scene.cycles.samples to a pretty low number as the depth map quality seem not to change. But I need to set it to a higher number in order to get accurate surface Normals and this causes the computation become more heavy.

Although I do not fully understand the solution posted here, but I think it does not apply to my problem (or I don't know how to do it properly. So I wonder how I can do this?

• Possible duplicate of: blender.stackexchange.com/questions/102297/… – cegaton Mar 8 '18 at 0:24
• @cegaton Thank you! Would I get what I want by removing all the materials as well? I think this should be an easy solution. However, I wonder if there is non-invasive solution to do this? :) – Amir Mar 8 '18 at 0:39
• The combined pass cannot be disabled. So do whatever you can to make the render as efficient as you can to get the information on the passes you are interested in. An easy way to do this in cycles is to assign a simple shader to the whole layer, that will override whatever other materials are assigned to the objects in the scene. blender.stackexchange.com/questions/102297/… – cegaton Mar 8 '18 at 0:46
• The way cycles works doesn't permit this; the depth/normal/RGB information is gathered in the course of tracing many light paths throughout the scene. Simply disregarding the RGB information from those paths won't make the process faster. – gandalf3 Mar 8 '18 at 3:15
• The only thing you can really do is lower the samples (16 is probably plenty) and limit the bounces to 1. Or use BI (or possibly openGL). – gandalf3 Mar 8 '18 at 3:19

1 Answer

Cycles works by tracing many light paths through your scene and gathering information (depth, normals, color, etc) from the interactions of those paths with stuff in the scene. Simply ignoring the color information won't give you any significant performance gain.

All you can do1 is limit the number of paths you have to trace as much as possible; set the bounces to 1 and the samples as low as you care to go. You probably still want a few samples in order to retain a bit of anti-aliasing (16 should be plenty). If you have lots of motion blur or DoF (or any other situation where a path straight out of the camera will not always give the same value), then you may need more.

1: Without switching to a different engine which might better suit your needs, that is.

• Thanks for the comments. I would like to switch to a different engine but I need to use Cycles for some parts of my work. – Amir Mar 10 '18 at 3:11
• @Amir There's no particular reason you couldn't mix and match, though it may take a little more effort to set up. – gandalf3 Mar 10 '18 at 4:48
• For example, I need to use Cycles for rendering surface Normal maps which I cannot get using Blender Internal (at least to my knowledge) – Amir Mar 10 '18 at 5:18
• @Amir You should be able to render world-space normals with BI.. If you post a question I'll see if I can answer :) – gandalf3 Mar 10 '18 at 7:25