The class started with a discussion of what pathtracing is, how its different than other rendering algorithms, and why its useful. We went on to look at the basics of using PBR as compared to Micropoly or Raytrace Mantra, then we talked about some of the new PBR stuff for H10.
PBR Chart
This was something I hoped people would take with them as reference for the important PBR parameters.
Using ray variance antialiasing (controlled by the Min Ray Samples parameter) for shading antialiasing, and pixel samples for geometry sampling antialiasing was discussed. The behavior of the Min Reflection Ratio and Color Limit parameters was also checked out.
I also tried to use this chart to show how linearly PBR responds to changing these parameters. There is a very linear relationship between how many primary rays you fire and how long your render takes. This is a really nice property of pathtracers like PBR.
Shot

This scene is very privative, but I think it does a good job of showing how PBR can be used in a cg+live plate setting. It also shows the capability of PBR to render out AOVs by splitting out direct and indirect light and rebuilding the beauty in the comp.
This setup also shows how we can do something fairly subtle but handy - casting shadows and bouncing indirect light onto the plate from cg objects. It is often good enough to render a shadow pass in the Micropoly or Raytrace engine with a VEX Shadow Matte material, but if bouncing or emitting light off the cg object onto the plate is necessary - this is the way to go. To achieve this, we render a diffuse surface representing the surface receiving shadows with phantom shading enabled for our cg object. In this pass, we also export the unshadowed diffuse shading as an AOV (by checking on the "generate surface shader exports" parameter to do the shading in the raytrace engine). In the comp, we can divide the two to disassociate the shadows and bounces from the diffuse shading. This is also how the VEX Shadow Matte material works internally.
shot.zip 2.53MB
583 downloadsBSDF VOP

The next thing we did was make our own BSDF VOP - in this case a phonglobe (my most often used BSDF). The phonglobe is particularly useful because it can take an arbitrary vector as its direction input. We used the phonglobe() function to generate a bsdf, and also used the albedo() function to find a normalizing factor. Normalizing glossy BSDFs can be important, because their albedos can change quite dramatically when you adjust their parameters.
The docs provide a great overview of the privative BSDF types that are available in PBR.
bb_phonglobe.otl 2.49K
355 downloadsMessing with the VEX Pathtracer Shader

This example starts with showing how we can do emission in PBR by exporting a color as Ce - which we did for the sky shader and the fake atmosphere on the ground shader. In this case, it would make more sense to use the environment area light, but the sky is geometry in this case because of the caching example.
The last thing we did in the class was mess with the VEX Pathtracer Shader which - along with the pbr.h header it calls - is the VEX implementation of the PBR engine. In the class we just added some modifiers to turn up and down the various lighting components, but the goal was to show that we can do whatever we want to this shader (which is totally cool).
The linked asset is a simple modification of the PBR shader that tries to emulate the behavior of Mental Ray's Final Gather - decoupling indirect and direct shading quality and resolution through a two passed approach.
Exchange Asset - VEX Pathcache
Some of this stuff came from trial and error and stuff, so I'd love to hear of other approaches to things like casting shadows and emitting onto plates, tweaking BSDFs, caching PBR, or antialiasing strategies. I'd also be very interested to see what other modifications people might have made to the VEX Pathtracer shader, as there's massive potential do to cool hacks and additions here.
Hopefully some of this stuff is at all useful to you. Thanks for checking it out. Also big thanks to SESI for making Mantra PBR totally awesome.
Edited by brianburke, 09 August 2009 - 03:44 PM.












