Here is a renderman compliant shader for applying udim based textures to a model. This is specifically designed for textures which have been painted in Mari, but it also works with textures that come from Cyslice and Zbrush. I’ve designed this particular shader for 3Delight, but it should work in other renderman compliant renderers as well – I have also tested it in Renderman For Maya.
This is just a constant shader, but it shouldn’t be terribly hard to use this in other shaders – either as a function within a custom SL shader or within an RSL Code (3Delight) or SLBOX (Renderman For Maya) node if your using the hypershade to build your shader with Maya.
Looking at the UV layout for this plane you can see I’ve laid the UVs outside of the 0..1 range used as a default by Maya. I’m using 9 x 2K texture maps here.
The shader has the following settings.
The shader uses the following naming conventions.
The shader also has an AOV (secondary output) which is useful for debugging…
It may not be entirely obvious looking at the render itself, but if you look at the values in the image you’ll see that red and green correspond to the UV index and the blue channel corresponds to the UDIM number. Fairly easy to output this AOV in 3Delight…
From the two displays listed above I was able to render out the blacksmith textures and the _ud AOV in one go.
The diagram below shows how UV coordinates are defined inside your 3D application (Maya, Max, XSi, etc) with the origin (0, 0) at the bottom left corner. However most image editing programs use an XY coordinate system where the origin (0, 0) is at the top left corner. Renderman’s ST coordinate system uses one similar to the XY coordinate system – where the origin starts in the top left corner. In order to render UV mapped textures correctly in Renderman for Maya you need to flip the ST coordinates upside down so the textures match your UV layout.