Assignment 06 - Developing Shaders for RenderMan RIS
26 Mar 2017RenderMan 20 heralded the deprecation of the venerable REYES rendering architecture and the RenderMan Shading Language (RSL) and with the release of 21, they are both no more. RenderMan 21 has been nearly completely re-written as a path-tracer that can be uni (PxrPathTracer) or bi-directional (PxrVCM). With the changes to the architecture, the approach to writing shaders is completely different and centers around physically plausible light transport. The three core sections of development involve Patterns, Bxdfs, and Integrators. Patterns are procedural and utility nodes. Bxdfs are custom reflectance and scattering functions. Integrators return shaded results based on light transport models. Other development plugins cover cameras, lighting, and volumetrics.
The key development path, also, is now solely C++. RenderMan Pro Server needs to be installed with your RMANTREE environment variable setup to point to that folder. The include path is necessary to build your bxdfs, patterns, etc. Once this is setup, you should be able to compile your own code fairly directly. Something akin to this on Mac or Linux:
g++ -I$RMANTREE/include -c PxrEKPMix.cpp
g++ -bundle -undefined dynamic_lookup PxrEKPMix.o -o PxrEKPMix.so
(For Windows you’ll likely want to follow one of their Visual Studio examples).
You will also want to make sure that you install the developer’s examples when you install RenderMan; otherwise, you’ll likely want to go back and run the download-installer again. There are some useful examples of plugins with source code included in this. The setup is for Windows, oddly, but they should all compile on Linux or Mac.
Due to time constraints, this assignment is now an optional bonus assignment due by the exam day; it may also serve as a possibility for your final project.
Assignment Objectives (Choose at least one).
- Write a RenderMan 21 Pattern and Bxdf to simulate Marble while also using the Beckmann Microfacet Normal Distribution Function and Smith Shadow Masking Function. Use as physically accurate attributes as you can and seek a photorealistic surface in your renders.
- Write a RenderMan 21 Pattern and Bxdf to simulate multi-colored sections of stained glass. Use the GGX Microfacet Normal Distribution Function with Smith Shadow Masking Function. Use as physically accurate attributes as you can and seek a photorealistic surface in your renders.
- Create three separate Bxdfs based on actual measurements from the MERL BRDF Database. Demonstrate these in one scene with a well-lit and physically plausible render.
- Implement one or more of the above, or something similar with instructor approval, using Open Shading Language via the PxrOSL node.
