RGB masks by Xuan Prada

We use RGB masks all the time in VFX, don't we?
They are very handy and we can save a lot of extra texture maps combining 4 channels in one single texture map RGB+A.

We use them to mix shaders in look-dev stage, or as IDs for compositing, or maybe as utility passes for things like motion blur o depth.

Let's see how I use RGB masks in my common software: Maya, Clarisse, Mari and Nuke.


  • I use a surface shader with a layered texture connected.
  • I connect all the shaders that I need to mix to the layered texture.
  • Then I use a remapColor node with the RGB mask connected as mask for each one of the shaders.

This is the RGB mask that I'm using.

  • We need to indicate which RGB channel we want to use in each remapColor node.
  • Then just use the output as mask for the shaders.


  • In Clarisse I use a reorder node connected to my RGB mask.
  • Just indicate the desired channel in the channel order parameter.
  • To convert the RGB channel to alpha just type it in the channel order field.


  • You will only need a shuffle adjustment layer and select the required channel.


  • You can use a shuffle node and select the channel.
  • Or maybe a keyer node and select the channel in the operation parameter. (this will place the channel only in the alpha).

Introduction to channels in Mari by Xuan Prada

  • Create a new proyect in Mari.
  • Create a new channel called “base”.
  • Adjust size, color space and color.
  • Right click on “base channel” to import a texture bitmap as base color.
  • We already have our cube with the blue base color.
  • Create a new shader called “blueCube” and choose as texture the “base channel” created before.
  • Create a new channel called “underPaint”.
  • Adjust size, color space and color.
  • Right click on the “underPaint” channel to import a nice under paint texture map.
  • You can see it in the viewport.
  • Create another channel called “underPaintMask”.
  • Adjust size, color space and color.
  • Import the under paint mask texture into the “under paint channel.”

Looks awesome in the viewport.

  • Select the “blueCube shader” and add a “new shader module”.
  • Select “masked diffuse” from the list.
  • As base texture select “underPaint channel”.
  • As mask texture select “underPaintMask channel”.
  • Invert the mask.
  • Add more layers in very simple, just need to add more channels.
  • Create a new channel called “rust”.
  • Adjust the size, color space and color.
  • Import a rust map into the channel.
  • Check it in the viewport.
  • Add a new channel called “rustMask”.
  • Adjust size, color space and color.
  • Go back to shaders tab and select “bluCube shader”.
  • Add a new shader module and select “masked diffuse” from the list.
  • Select the “rust channel” as “base texture” and “rustMask channel” as “mask texture”.
  • Invert the mask.
  • Select the “rustMask channel” and paint with black color to create rust in desired areas.

Inverted occlusion in 3D Max by Xuan Prada

People asked me for a step by step installation and usage of Binary Alchemy Color Ray Length shader in 3D Max.
Here we go.


  • Download BA Shaders for 3D Max.
  • Copy .dll files here -> “3ds Max 2010\mentalray\shaders_3rdparty\shaders”
  • Copy .mi files here -> “3ds Max 2010\mentalray\shaders_3rdparty\include”
  • Edit “3rdparty.mi” located here -> 3ds Max 2010\mentalray\shaders_3rdparty
  • Your “3rdparty.mi” must be something like this.


  • Create a matte/shadow shader and uncheck “receive shadows” and “use ambient occlusion”.
  • In the “camera mapped background” input, connect a “BA_color_raylength” shader.
  • Play with the “spread” to control the behaviour of the occlusion.
  • Once rendered you’ll have something similar to this.
  • Mix the “BA_color_raylength” with procedural maps or bitmaps to improve the result.

Edit: The most important parameters to play with are “spread” and “far output”.

Worn edges by Xuan Prada

This technique is based on “worn edges techniques” by Neil Blevins.


  • 3D Max Scanline Render
  • SoulBourn Scripts
  • Warp Texture Script
  • All the objects must have a correct UV mapping


  • We must complete perfectly the UV mapping of the objects, without overlappings and similar common issues.
  • To reach better results, we need more geometry information, especially in the corners.
  • For that purpose, duplicate the objects, rename them and apply them some bevels in the corners and one or two turbosmooths if necessary. (but try first only adding bevels).
  • Note: All the object mesh must be “Editable Poly”.
  • Select the object and execute “Corner edge to vertex map” script.
  • We will have to play with the low and high angle parameters, especially decreasing the intensity of the low angle when more complex geometry has the object.
  • The next step is to distort this mask created by vertex color, to give it more caotic shape and indeed, more real aspect.
  • We need to download the “warp texture” plugin.
  • In a standard material connect the warpt texture to diffuse channel.
  • In the target input connect a vertex color. 3D Max put by default the vertex information which we have generated previously with the corner edge to vertex script.
  • In the warp input connect a procedural noise, whose parameters will vary depending of scene scale and object size.
  • If we hit a render we reach a pretty decent results, but we need to define better our mask.
  • If we put an output in the vertex color channel, we can play with the curve for empathize the results.
  • In the noise we can also play with his output.
  • To finish, we can bake this mask to paint it in a more appropriate software.