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$
13
$\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$
  • $\begingroup$ Does this reflect the global coordinates? $\endgroup$ – Vader Feb 28 '14 at 1:00
  • $\begingroup$ @Vader Yes it does. (see screenshot) $\endgroup$ – gandalf3 Feb 28 '14 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 Apr 1 '16 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 Apr 1 '16 at 1:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.