8
$\begingroup$

A world position pass is a pass used for composting other elements into the scene after the initial render. In a world position pass the R, G, B values correspond to the X, Y, Z axis (or X, Z, Y). A world position pass could look something like this. (Image form another 3d app)

enter image description here

Is there a way to render out corresponding world space coordinates of each pixel?

$\endgroup$

1 Answer 1

14
$\begingroup$

Yes, this is possible using the following node setup (click for larger image):

enter image description here

As you can see, the coordinates are the same as the channels (click for larger image):

enter image description here

In the screenshot above the RGB values are slightly different from the coordinates displayed in the Properties panel because those coordinates are measured at the object origin and the RGB channels represent the coordinates at the objects surface.

Also note that the colors will be different than in your screenshot because blender uses Z (blue) up and it appears that the screenshot is of a Y (green) up space. Aside from rotating your actual geometry, you can remap the colors in the node setup (click for larger image):

enter image description here

Now the colors will match your screenshot:

enter image description here

Blendfile

$\endgroup$
4
  • $\begingroup$ Does this reflect the global coordinates? $\endgroup$
    – Vader
    Commented Feb 28, 2014 at 1:00
  • $\begingroup$ @Vader Yes it does. (see screenshot) $\endgroup$
    – gandalf3
    Commented Feb 28, 2014 at 1:08
  • $\begingroup$ Does this mean you have to apply that material to every mesh in your scene or can you apply the material to all the items at once? $\endgroup$
    – Startec
    Commented Apr 1, 2016 at 1:07
  • 1
    $\begingroup$ @Startec You can use the Material Override setting to use a single material for all objects on a given renderlayer $\endgroup$
    – gandalf3
    Commented Apr 1, 2016 at 1:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .