a r b i t r a r y   o u t p u t s


With a few extra lines and some forward thought we can render out special images concurrently with our "beauty" render. Sometimes called passes or extra planes this can give compositors the extra images they need for a final render.

Final Rendered Movie

The basics

The Light


The Surface


The shaders linked above are my basic examples of AOVs and AOVs from lighting information. The light you saw from the caustics breakdown and the surface was used in the final render above. AOVs can be a number of things given specific situations, but ultimately are up to the shader writer and the compositor to come up with. Some examples of common AOVs: luminance depth, normals, shadow mattes, etc.

The simplist way to make an AOV is to define it in the parameters by the general format "output varying {data type} {name} = 0;". Data type is of course anything from floats, colors, points, etc. An example of luminance depth can be found in the surface shader linked above. As luminance depth is a 0 to 1 value we have the user set the upward bound of distance(white in the final image.)

Getting Values from Lights

You will see a variable only defined in the light but not in the surface. You should also see the variable is only used within an illuminance loop. Certain variables are context specific, globally this is Cl in illuminance, and our user variable __inshadow. Since we declared it an output variable we can query its value in an illuminance loop and then use that in any way we see fit. Within the context of my shader it is used as a shadow matte. In this method we can pass any kind of data to the surface shader, it can only be read in an illuminance loop however.

Showing AOVs in Houdini

A Sample Scene


Pictured above is the dialogue you enter in information for your AOV. The parameters match up pretty 1:1 with the rib lines with the exception of Variable, think of it as your DisplayChannel line. The other thing to note is the quantize line has incorrect mouse over information. It should follow the format of the quantize inline for the DisplayChannel call not the standard Quantize call.