While Vray is remarkably intuitive for some daily operations, others might require a much more convoluted process.
The creation of non-standard render passes, and especially the “Pref” pass is one of these (read that P-ref, like you’d read T-Rex).

A few tutorials cover how to render custom render passes (a.k.a. AOVs) such as this one from Brian Freisinger back in 2012.
However, despite a lot of Google searches, I could not find any explanation how to create that mysterious Pref pass.
I knew it was possible because I have used it in productions rendered in Vray, but it seems like nobody wanted to share the goods.

A Pref pass? What is that?

Naming of passes seems to be a bit non-standardized, but I have mostly encountered that one as “Pref” which stands for “Position Reference”.
Many of you are familiar with Pworld passes, also known as Position World, XYZ, Point Position, or combinations of them. For Clarity I will always refer to it as “Pworld” from now on.

Nuke screenshot of Pworld

The Pworld pass of a Rabbit.

The Pworld pass is often used either for relighting, or to make position based mattes with a gizmo such as P_matte by Ivan Busquets.

Enter the Pref, or Points Position Reference:
It looks a lot like the Pworld, however it has the ability to be “stuck” to moving objects.

Pref GIF

Notice how the texture seems to stick to the object on the Pref side, while it looks like the object is moving through it on the Pworld.

That means it can be used to create lighting or mattes that stick to the object, using the exact same toolsets we’d use with Pworld.
See an example with relighting in this Youtube Video by Sangho Jung. Also some working example in the great breakdown of District 9 for FXguide (see around 7min10s, where he

[un]surprisingly calls it a Preference pass).

Great, but how do we render it?

First thing to do in Maya is pick a frame where both the Pref and Pworld will be similar.
Select the object for which you want to make a Pref pass and in the Rendering Menu select “Texturing > Create Texture Reference Object”

Create Texture Reference

Repeat for each object that needs to be affected by the Pref pass. This will create Reference objects from which the Position data will be calculated.

Reference Objects

Notice the wireframe representing our reference objects are not animated while we playback the animation.

Then we need to create a Vray Extra Tex render Element (In render Settings):

RenderElements Screenshot

Then in the properties of the render element, disable “Consider for Anti-Aliasing” and set the Explicit Channel name to whatever you would like your channel to be named (how it will show in Nuke). You might as well rename the render element for clarity.PrefPass Settings

In the HyperShade, create a single SamplerInfo node.SamplerInfo

With that node selected, in the Attribute editor, enable “Attributes > Vray > Additional outputs”.


Now for the slightly delicate operation: Select the previously created Render Element to open its attribute Editor. In the Hypershade, middle click the SamplerInfo node and drop it onto the Texture Input of the render element. Make sure you drop it onto the Label of the Texture input. If you did it right, a Connection Editor will open.Drag and Drop

In the Connection Editor that opens, Click vrayPointWorldReference on the left, and vray_texture_extratex on the right.

Connection Editor

You may now close the connection editor and render your animation.
Don’t forget to set your rendering to EXR multichannel if you want to make full use of these extra passes.


Thanks to SHVFS and Shawn Tilling for letting me use their Rabbit Character for this Tutorial, it wouldn’t have been the same with my Spheres.
Animation was done as an animation assignment by student Desmond Jin.