How to render a position pass in Blender Cycles and Internal?

The position pass is a representation of the 3D space where the value of every pixels in the RGB channel represents the position XYZ in the scene. It’s a really useful pass to have in the process of compositing to create volumetric mask, gradient, or even low fog.


Blender haven’t render layer called position pass, but it is easy to create it by a simple shader.


On a render layer, override the material with a geometry input and plug the Position output in the surface by an emission shader. That’s all.



In Blender Internal, it’s a bit more complicated. You can use exactly the same input from the geometry node in the shader (which is called Global instead of Position) but the problem is that Blender Internal engine clamps the values lower than 0. We need negatives values to have a correct position pass. So, the workaround to get the good values is very simple : add a very big value on each channel in the shader.


And then, directly before saving the pass, subtract the same value on each channel in the compositor.


I recommand you to not use a position pass from Cycles with Blender Internal passes or the opposite because the filtering is not the same and the result will not be accurate.

Leave a Reply