October 28, 2018
In this series, we will be exploring the technical side of rendering with RenderMan by taking a "how-to" approach to the lessons. The classes are extended with technical breakdowns, explainer diagrams, and renders. We also dive into sessions in Maya to show the lessons in action!
Even though this training has been designed using version 21, most concepts are directly applicable to version 22.
In our final class of this course we develop a new algorithm, a layered fbm noise, that we implement in all 3 languages of this course: se expressions, OSL, and C++ pattern nodes. We then have a starting point for doing some comparison tests to see which renders faster, is easier to code, more versatile, and the pro's and cons of all 3.
We continue programming our first pattern from class 8, exploring the distinction between uniform and varying parameters for upstream connection, and some gotcha's to eliminate artifacts and getting new parameters setup correctly with GetParamTable and the enum data structure for paramId. Continuing with some useful utility for our custom pattern node, we show how to read a custom primvar attribute such as our MatteID, and writing to a custom AOV. We can do the same with some "builtin" variables such as curvature, surface normals, derivatives, and others.
We now jump into C++ Patterns! Since there is a lot of overhead for writing and compiling C++ patterns, we start off with the simplest possible example by just setting a color that is connectable upstream. First an overview in Maya how it fits into our existing Kitchen scene file shader network, then we jump in to the user interface .args file to setup the parameters and register our custom node in RenderMan for Maya. We then jump into the .cpp code and show the overhead setup for a Pattern node, then where the custom stuff happens inside our shading context loop. We need to compile our C++ pattern so we go through that on OSX/Linux, then in Windows via the Cutter program used earlier in this course. We finish up this lesson with an overview slide and showing how we can also connect our custom OSL patterns made earlier in this course into our newly created C++ pattern node, all in the hypershade node editor.
The next step in our OSL shaders progression is adding shader metadata for more useful user-interface options, but this requires us some setup steps to "register" our plugin with RfM. The good news is once we set this up we are good to go for all future custom plugins, including C++ patterns, bxdf's, integrators, etc. This class shows you how to setup your dev environment for all these plugins for yourself or the whole studio, in OSX/Linux/Windows.
"Understanding Projections" is the theme of our 3rd class in OSL, and we cover ST, UV projections, then move onto transforming our point P into Screen/NDC projections and finally triplanar. We do all this from scratch in OSL on our recurring Kitchen scene, and show the results of these projections using 3 examples:
We also show how we can plug in any pattern upstream from our OSL, like PxrDirt or Curvature, then manipulate it in our OSL, then output it to PxrSurface BxDF.
In our 2nd class on OSL we jump back into our kitchen scene (from Class 3) and take the exact same Se Expressions we created to drive the displacement and noise on the soapbubbles material with iridescence thin film, and convert those to OSL. Converting our previous Se Expressions to OSL gives us a great understanding of the differences of those two types of programmable patterns. We then introduce the concept of procedural variation by assigning a random color MatteID to each object in the scene, and reading that attribute in our OSL. Once we have this random tag on each object, the world is our oyster in what we want to do with it in the OSL: procedurally vary for each object the noise that drives dispalcement, soapbubbles thin film thickness noise, anything we want. We then take this same workflow into the oak OSL shader introduced in the last class, and modify it to vary the ring frequency and wobble frequence as well as color of our oak wood shading. We also demonstrate on the carbonfibre shader using the same technique varying the mesh pattern and diffuse color.
Sections:
We morph into the second big topic of Course 2: OSL with PxrOSL. In our first class we get the history, intro, and basics out of the way then show our way around PxrOSL with Maya, writing 2 simple OSL shaders from scratch, compiling them, and loading them in Maya/PxrOSL. Another neat example to explore is the RIB scene file that ships with RenderMan Examples that demos a few OSL shaders (carbon fibre and wood), this example being totally standalone RenderMan without Maya so a great learning tool.
Sections:
Applying our Se Expressions lessons into an Iridescence Material with PxrSurface from the all new Preset Browser, we explore a new Kitchen scene available from the RenderMan Community site. We modify an Se Expression from last class into one that works to drive the signal of the “Thin Film Thickness" parameter for our iridescence render of soap bubbles material, explore “thin" refraction, create vector displacement Se Expression with vfbm, vturbulence, and vnoise functions.
Sections:
Continuing off from Part 1, we get into more complex Se Expressions including: vectors and facing ratio variations. And a production example with procedural noise patterns including voronoi and fbm, textures and uv coords all in one pattern. We introduce a much better tool for editing Se Expressions on the fly: Cutter!
Sections:
Links referred to in course
http://fundza.com/cutter/se_expr/
www.cgbreakdown.com (Production Example)
Description: Starting off our 2nd course we introduce Se Expressions: great for quick prototyping and programming without compiling, and realtime code modifications of your patterns right in the IPR render!
Sections:
Christos Obretenov was educated at Simon Fraser University with a BSc in Computing Science specializing in Computer Graphics, Christos Obretenov started contributing to the Animation and Film industry at Mainframe Entertainment in conjunction with Simon Fraser University. He continued his career by designing and developing shading software for Walt Disney's "The Wild" feature film, followed by shading and lighting for Superman Returns, Spider-Man 3, Beowulf, Christmas Carol, Mars Needs Moms, and Life of Pi (which won the 2013 Oscar for Best Visual Effects) feature films. Recently co-founding LollipopShaders.com, Christos develops procedural solutions to shading and lighting, currently experimenting with Physically Plausible Shading. He resides in Vancouver, Canada.