Getting Started with RfK

Getting Started with RfK


Plugin Configuration

The renderer plugin portion of RfK is very similar in appearance and structure to the PRMan17 plugin from the Katana package. From a user's perspective there are no new nodes, only extensions to existing nodes. The directory structure is the same; you'll find the familiar "Resources" and "Src" subdirectories containing the PRMan20 plugin resources and code, respectively.

Existing scenes built using Katana's default PRMan17 plugin should load and run seamlessly in the RfK PRMan20 plugin. The only requirement beyond those of the Katana package plugin is that you have the $RMANTREE environment variable set to point to the top of your RenderMan Pro Server distribution. It is also recommended to set the $RFKTREE environment variable to the top of your RenderMan for Katana distribution, particularly if you are running any of the example scenes.

Configuration of the RfK plugin is generaly the same as the standard PRMan17 plugin: add the plugin resources path to the $KATANA_RESOURCES environment variable and Katana will pick it up. The major difference is that you no longer need to create a "prman" symbolic link within the $KATANA_RESOURCES plugin directory in order for the plugin to find prman. As long as the $RMANTREE enviornment variable is set correctly, the plugin will find the appropriate prman libraries and commands.

Similar to the configuration of $RMAN_SHADERPATH for the RSL shaders you will need to set up the $RMAN_RIXPLUGINPATH environment variable to include $RMANTREE/lib/RIS subdirectories containing the RIS plugins. For example:

setenv KATANA_RESOURCES /opt/pixar/RenderManStudio-20.0-katana2.0/lib/katana/Resources/PRMan20
setenv RMAN_SHADERPATH ${KATANA_RESOURCES}/Shaders:${RMANTREE}/lib/shaders:${RMANTREE}/lib/rsl/shaders
setenv RMAN_RIXPLUGINPATH ${RMANTREE}/lib/RIS/bxdf:${RMANTREE}/lib/RIS/pattern:${RMANTREE}/lib/RIS/integrator

For more information about setting up the environment, see the installation guide. For technical information about modifications to the plugin code see the RfK Plugin Technical Notes.


RfK and RenderMan Pro Server 20.0

The purpose of any renderer plugin for Katana is to enable an artist to generate images using the full power of the given renderer. In order to start taking advantage of the RPS20 capabilities with the RenderMan plugin for Katana we need to start with a discussion of a few relevant nodes and parameters:

PRMan-specific Nodes

PrmanGlobalSettings
This node contains most of the prman world state options, including selection of Hider and Integrator. This is where you'll find settings such as shadingRate, directlightingsamples, limits and searchpath.
PrmanObjectSettings
This is where object-specific PRMan attributes are set. Look here for visibility and trace attributes among others.
PrmanShadingNode
This shading node is used to add PRMan shaders (RSL or RIS) to a wider shading network (along with the NetworkMaterial node). See Shading in Katana for more information on setting up shading with RfK.
PrmanOutputChannelDefine
This node is used for defining arbitrary output variables (AOVs) used for outputting extra data from the shader or renderer during render calculations.
PrmanDenoiseChannelDefine
This macro creates all the DisplayChannels required for the denoise utility.
PrmanDenoiseRenderOutputDefine
This macro is used for defining the outputs required by the multichannel OpenEXR which is input to the denoiser.

Reyes and RIS Settings

RfK supports both traditional Reyes rendering and the new RenderMan RIS rendering pipeline. The PrmanGlobalSettings node contains the "Hider" and "Integrator" settings used when configuring the two modes. Both PrmanGlobalSettings and PrmanObjectSettings have a "layout" options for conditionally hiding Reyes or RIS rendering settings.

Integrator

By default PRMan and RfK are configured for traditional Reyes rendering. In order to enable RIS rendering an integrator must be chosen and the hider needs to be set up for path tracing. The integrator is selected using the Integrator parameter on the PrmanGlobalSettings node. If the integrator selection is "none" the render will be in Reyes rendering mode. Any other integrator selection will enable RIS mode. See the RPS Integrators documentation for usage of the built-in integrators.

Currently the addition of custom integrators is done by adding the new integrator name to the Integrator list in the PrmanGlobalSettings.xml file along with the appropriate section containing all the desired parameters. Details and an example can be found in the Custom Integrators documentation.

Hider

By default the prmanGlobalSettings.hider option is set to hidden which means that RfK is in Reyes mode by default. Switching to the raytrace hider will enable ray-traced rendering mode. If RIS-style rendering is desired hider must be set to raytrace and "integrationmode" to path. If the integrator is set to PxrVCM, then "incremental"` must be enabled as well. Other integrators do not require "incremental".

Shader Discovery

RfK searches for shaders using the standard shader search path mechanism. Search paths are specified using attribute settings and/or environment variables. The prmanGlobalStatements.options.searchpath.shader setting is combined with the RMAN_SHADERPATH environment variable to build the shader search path for traditional RSL shaders. The RIS shader search path is the combination of the prmanGlobalStatements.options.searchpath.rixplugin setting and the RMAN_RIXPLUGINPATH environment variable.

In addition, for Katana1.6, it is required that all RIS shaders are enumerated in a separate XML file called the "shaderManifest". Please see the RfK 1.6 User's Guide for details on this requirement. This is not a requirement for RfK2.0.

Args Files

RIS plugin shaders have no sloinfo equivalent, therefore we currently require an args file for each plugin shader in order to load the shader and its parameters. The shader's type is determined by reading the required "shaderType" element in the .args file and the parameters each now require "type" property to specify the parameter type. The plugin has been extended to parse the .args file in lieu of using a sloinfo-type mechanism for shader introspection. Please refer to the Shader Type Tags document for detailed information about configuring the shader type in the args file. Detailed information about creating and interpreting RenderMan args files can be found in the Args File Format Guide.

Transitioning from RfK1.6 to RfK2.0

Transitioning from the Katana RenderMan plugin for 1.6 to 2.0 should be fairly straightforward with some exceptions:

No Shader Manifest
The shader manifest has been deprecated for RfK2.0. RIS shaders are discovered based on the existence of Args files.
PrmanGlobalSettings Modifications
Previous versions of RfK tried to stay true to the original configuration of the prman plugin for Katana. With the advent of Katana2.0 and new rendering paradigms that came with RPS 19 we see the need to break away from the original configuration, starting with PrmanGlobalSettings. In these early stages there have been only minor changes but more will be coming soon in an effort to re-align the user experience with newer workflows.
Live Render Defaults
In RfK1.6 there was a PRMan-specific section in the Live Render Control panel. For Katana2.0 these settings are now found in the PRManLiveRenderSettings node.