xyzWPP pass tutorial

Setting up a xyzWPP pass in vray using the vrayRE_extra_tex 

 By Brian Freisinger

November 5, 2012

(Reminder: Click on images to enlarge)

A common request I get from compositors, is for an XYZ WPP pass in addition to my standard passes. The XYZ or World Point Position pass can be used in multiple ways, from doing some re-lighting in Nuke, to creating atmosphere (ground fog) and a variety of other uses.

The XYZ WPP pass doesn’t appear in the Render Elements tab, so you’ll have to create it using the vrayRE_Extra_Tex

The vrayRE_Extra_Tex is a very powerful and often underused render element. You can plug almost anything into it to create a custom pass. For example, you can plug the VrayDirt shader into it and kick out basically an ambient occlusion pass. Again, that’s just one of many things that can be plugged into this node to get almost any pass or variant of pass out painlessly and easily.

For this one I just created a vrayDirt shader in the hypershade and dragged and dropped it into the vray_ExtraTex “Texture” field. (Make sure you hit enter after doing this so it connects, otherwise you’ll be wondering why it doesn’t work)


Creating the xyzWPP pass

The XYZ WPP pass takes a little more work, but isn’t difficult.
I’m just going to set up some spheres in my scene in a loose array so we have multiple objects that exist in multiple xyz coordinate space to make our pass pretty obvious when we render it.

Next I’m going to create my vrayRE_Extra_Tex pass.

Make sure you open the vrayRE_Extra_Tex up in the attribute editor.
You’ll see some empty fields.
The first field we want to fill is the Vray Name Extratex, without a name in here it’ll be a blank field in the VFB, and hard to find as a comp pass later.
So I’m just going to name mine xyzWPP

Figure 5. “Name your pass"

Ok, so the xyzWPP pass has now been created, but the render element itself needs to get information, so we’ll create a samplerInfo node in the hypershade.

So we’ve got our samplerInfo node and our xyxWPP pass created. Next we’ll need to get them to talk, so opening up the connection edtor, we want to load the samplerInfo node on the left and the vrayRE_Extra_Tex, on the right.

You can see I’ve expanded the “pointWorld” field on the left, and the vray_texture_extraTex on the right.
So now it’s a simple case of connecting pointWorldX to R, pointWorldY to G, and pointWorldZ to B

That’s it. You now have an xyzWPP pass created for your scene.

Rendering it can be a bit deceptive. It may not look like there is any gradient to your passes.
The render will all channels on should look something like this

So I’ll load this pass into Nuke, add a shuffle and a grade and take a look at the “G” channel which is assigned to our Y

I’ve added the grade so I could see a better representation of the gradient I would expect in this pass.

And that’s pretty much it. You can look at your X and Z channel and see how they look at this point.

For more info about using xyzWPP passes check out some of The Foundry’s tutorials.

3 Responses to “xyzWPP pass tutorial”

  1. Tomas says:

    Hi, thanks for nice tutorial, I would suggest also this one:

    But I would have a question. Is it possible to use a pointcloud – xyz pass – technique for depth compositing? I mean something similar as a compositing via Z-depth channel (fusion knows to do it easily, but without any anitialising). I am looking for some technique where can I easyli put 2d objects in to my 2,5D comp with ANTIALIASING in a space.
    Thanks for any helps

    • Barros says:

      Hi Tomas, I don´t think you can. But why can´t you put your elements in nuke 3d space? Or if you own NukeX you can use a static particle simulation to then lay out your cards over a surface.

      Deep compositing is very different from this, the pixel values hold a lot more information than just rgb to xyz positions.

  2. Alex Martinez says:

    Dude this is awesome!

Leave a Reply