Renderman

From cgwiki

Renderman

Volume Density for Emission

Prman density for emit.png

File:prman_vdb_density_as_emit.hipnc

Had seen a few people get great results by mapping density directly into emission for volumes. Tests inside Mantra looked great, so pushed that workflow to the studio. I then totally forgot we'd have to match that in Renderman for the lighting students using Katana, here's the results of that test.

The high level idea is to take the incoming density (using a Pxr Prim Var node, NOT a default Houdini bind!), and remap it twice; once to sit in a nice 0-1 range for density, and then into values that correspond to blackbody values (roughly 1000 to 6000). The second is fed to pxr blackbody node, and then to emission.

Unfortunately this made all the low density areas of the volume glow red; the blackbody node doesn't seem to want to go down to pure black values. I figured if I could multiply the emission values against density, that would clip it back and look correct.

To my surprise there's no pxr mult, pxr add etc nodes. As far as I can tell, you're meant to use SeExpr to do this sort of stuff. Easy to make the node, but spent 45 minutes shouting at it when it didn't do what I wanted. In the end the answer was embarrassingly simple; don't use semicolons, and the final line of your expression becomes the assigned value. So here, I had the remapped density and remapped emission plugged into the inputs, and the expression is simply

colorInput1 * colorInput2

A nice feature of this setup is there's an exposure multiplier on the blackbody node; very easy to dial the look up and down. And my word, it's fast, and does full gi emission against other objects with no extra effort. And this is prman21, can't wait to try prman22...

Prman emit exposure adjust.gif