Renderer Plug-ins

The Renderer API allows the integration of renderers into Katana.

What is a renderer plug-in?

A renderer plug-in is a collection of modules which provide Katana with renderer-specific information that can be configured and declared to the renderer in the UI as well as handling the corresponding Katana recipes at render time. The modules used to implement a renderer plug-in are the following:

  • Render::RenderBase: Translates a Katana recipe into the renderer’s language using a scene graph iterator (FnScenegraphIterator), where the rendered content is typically visualised in Katana’s monitor. A render plug-in represents a single render process where it is instantiated with the Katana recipe and render arguments when a render is launched and destroyed when the render is complete or cancelled. The Render plug-in can delegate the handling of scene graph location types to delegate plug-ins (see Render::ScenegraphLocationDelegate). This enables the registering and handling of new renderer-specific location types without changing the render plug-in. See Recipe utility classes.
  • RendererInfo::RendererInfoBase: Provides Katana with renderer-specific information needed to configure a renderable scene, e.g. shaders, render outputs. If applicable, this plug-in also advertises and configures nodes such as [Renderer]ShadingNode and [Renderer]OutputChannelDefine. It is also responsible for advertising supported render methods such as preview and disk renders.
  • Configuration nodes: Renderer-specific nodes are useful for configuring renderable properties such as global and object settings.
  • Viewer manipulators: Enables the user to manipulate shader parameter values in the viewer. See the ViewerManipulatorAPI for further information.

Advertising render methods to start a render process

A renderer plug-in must advertise one or more supported render methods which become available in the UI (unless explicitly hidden) and script mode. Render methods are created by adding instances of render method classes to the vector passed into RendererInfo::RendererInfoBase::fillRenderMethods. The base render method classes represent different ways of handling a render process in Katana:

Each render method can advertise and write render debug outputs to a file which are displayed in an external editor.

Render methods can be hidden from the UI using RendererInfo::RenderMethod::setVisible where it can still be used in script mode when launching a render process with StartRender.

A render method can customise the way a render is launched in Katana. By default, a render process will create a catalog item, register the render so that it may be cancelled etc., and report any render messages in the render log. These properties can be configured to launch a detached render where Katana will absolve itself from any involvement beyond launching the render process with the recipe. This is done by passing false into the following functions:

Preview render methods support concurrent renders which can be switched on using RendererInfo::PreviewRenderMethod::setAllowConcurrentRenders.

Batch rendering

Katana requires a batch render method so the RendererInfoBase automatically creates a DiskRenderMethod with default parameters which will be used for batch rendering. The parameters can be overridden in RendererInfoBase::configureBatchRenderMethod.

Launching render methods in the UI

The render methods are grouped in Katana’s render menu based on their type. The method name is passed as an argument to the render process where the render plug-in can retrieve it using Render::RenderBase::getRenderMethodName.

Tip:It is useful to use the default name and label provided by the render method classes for the most common cases as the render menu collapses items whose corresponding methods share the same name and label. This is done to allow simplifying the render menu where multiple renderers have equivalent render methods. Furthermore, standardising the user experience across renderers makes it easier for users to find the render method they want to launch.

Starting a render

A render plug-in must implement the Render::RenderBase::start function which is called at the start of Katana’s render process. The plug-in has immediate access to:

Key stages of the render process

Implementing only the start function is sufficient for most renders. More flexibility is needed for live renders where the render process is kept alive and updates/commands can be sent to the render plug-in until the render is either stopped by the user, or the Katana session ends. This flexibility is provided by supporting optional functions which are called at different points during the render process:

  • Render::RenderBase::start: Called to start the render process. This is the only function that must be implemented by the render plug-in.

  • Render::RenderBase::pause: Pause the render/live render process. Currently it is only called during a live render when updating regions of interest.

  • Render::RenderBase::stop: Always called at the end of the render process.

  • Render::RenderBase::queueDataUpdates: Called asynchronously in a separate thread during a live render with the attributes that have changed. The updates can either be applied directly or queued here and applied later in the main thread. When and how often this function is called depends on the live render mode:

    • Manual: The queueDataUpdates function is called when the user explicitly clicks on ‘Update Live Render’ in the Live Render Control tab.
    • Pen-Up: The queueDataUpdates function is called after an attribute value has changed anywhere in the scene graph.
    • Continuous: The queueDataUpdates function is called with a fixed frequency (every 10ms) if attribute values have changed. Currently this only applies to camera and light transform updates in the viewer.
  • Render::RenderBase::hasPendingDataUpdates: Called after live update data or command has been processed asynchronously to inform the render process of whether some or all of the data updates have not been applied in the queueDataUpdates function.

  • Render::RenderBase::applyPendingDataUpdates: Called if hasPendingDataUpdates returns true. This is used to facilitate a workflow where a set of updates are queued in the update thread and then flushed in the main thread.

  • Render::RenderBase::processControlCommand: Called when a custom live render command is executed.

  • Render::RenderBase::stopLiveEditing: Called when a live render is stopped by the user.

Processing the Katana recipe and utility classes

Interpreting the Katana recipe into the renderer’s language involves a deferred evaluation of the scene graph. This is done by traversing the scene graph using a FnScenegraphIterator starting from the root. The render plug-in can get the root iterator using Render::RenderBase::getRootIterator. Each iterator corresponds to a scene graph location which contains a set of corresponding attributes. Scene graph location types and attributes are based on conventions where the render plug-in can selectively handle location types and attributes that are applicable to the renderer.

Scene graph delegates

The handling of scene graph locations and their attributes can be dynamically delegated to Render::ScenegraphLocationDelegate plug-ins. Given an arbitrary scene graph iterator (e.g. FnScenegraphIterator sgi), we can check if a corresponding delegate plug-in exists and invoke it using RenderOutputUtils::processLocation

bool pluginFound = RenderOutputUtils::processLocation(sgi, "myrenderer", sgi.getType(), 0x0, 0x0);

Scene graph utility classes

Utility classes are provided to parse standardised attribute conventions where they can be extended to provide renderer-specific behaviour through overrides:

Tip:Avoid using the iterator function getByPath to get an iterator for a location that has already been traversed as it will traverse the scene graph again from the root. It is generally preferable to use a cached iterator class unless the memory footprint is a critical issue.

Disk Render: Rendering one or more render outputs to disk

Disk renders can only be launched from a render node and the renderer has to provide a target filename for each render output (port). The rendered target file for the primary render output is read and displayed in the catalog and monitor when the render is complete (if the file type is supported).

There are two steps required to configure and perform a disk render:

Following these steps, a simple workflow for a color pass which renders to a temporary location where the file is then copied to the target location could be as follows (note that the following code snippet omits the Foundry::Katana namespace for simplicity):

configureDiskRenderOutputProcess

// Get the render outputs from the render settings
RenderSettings renderSettings(getRootIterator());
RenderSettings::RenderOutput output = renderSettings.getRenderOutputByName(outputName);

// Generate a unique temporary local output location used by the renderer
std::string tempRenderLocation = RenderOutputUtils::buildTempRenderLocation(
                                     rootIterator, outputName, "render", "exr", frameTime);

// Use the path from the location plug-in as a final target location which is displayed in the monitor
std::string targetRenderLocation = outputPath;

// Declare the render action used for this render output
std::auto_ptr<Render::RenderAction> renderAction;

// Determine the rendering behaviour based on the output type
if (output.type == "color")
{
    // Here we render to a temporary location and then convert and copy it to the final location
    renderAction.reset(new Render::CopyAndConvertRenderAction(targetRenderLocation,
                                                              tempRenderLocation,
                                                              output.clampOutput,
                                                              output.colorConvert,
                                                              output.computeStats,
                                                              output.convertSettings));
}

The attributes for each output are found at the root of the scene graph under renderSettings.outputs. The easiest way to get the attribute values for a particular render output is to use Render::RenderSettings::getRenderOutputByName.

start (or any function which processes the render outputs)

...
// Get all render outputs for a disk render
RenderOutputs outputs = renderSettings.getRenderOutputs();

// Iterate through and process each output
...
if (output.type == "color")
{
    // Get the render location which in this case is a temporary location
    // as defined by the render action
    std::string renderLocation = output.renderLocation;
    ...
}

Note

Disk renders do not support displaying arbitrary output variables (AOVs) in the monitor.

Note

Katana’s monitor currently only supports images of type EXR, CIN, RLA, and OIIO.

Preview Render: Rendering directly to Katana’s monitor

A preview render can be launched from any node in the UI where the renderer sends the rendered content (e.g. buckets) interactively to the monitor as soon as they are ready using the Display Driver API.

Katana starts a listener when the UI is launched which retrieves image and ID data over a communication protocol. Preview renders have no concept of render outputs but instead use channel buffers that contain the names of the selected outputs and the corresponding buffer IDs. The IDs represent buffers that are reserved in Katana’s catalog and they are used by the display driver to make sure the image channel data goes to the right buffer.

The following exmample demonstrates how the channel buffers are queried from the render settings (note that the following code snippet omits the Foundry::Katana namespace for simplicity):

RenderSettings::ChannelBuffers buffers;
renderSettings.getChannelBuffers( buffers );

RenderSettings::ChannelBuffers::const_iterator it;
for( it = buffers.begin(); it != buffers.end(); ++it )
{
    RenderSettings::ChannelBuffer buffer = it->second;
    // Use buffer.bufferId and buffer.channelName with the Display Driver API
    ...
}

Note

Katana’s monitor currently only supports images of type EXR, CIN, RLA, and OIIO.

Generating a render debug output

There are two steps involved in creating a render debug output:

  • Advertise that a render method supports debug outputs. This creates the necessary UI hooks to allow the user to ask for a debug output.
  • Check for specific render arguments in the render plug-in which indicate that the render process was triggered with the expectation that a render debug output file is created.

Advertising debug output support

The most common way of requesting a debug output in Katana is through a node’s context menu under ‘Debugging’. The batch render method has to support debug outputs in order to add a menu item for the renderer. This is done using RendererInfo::RenderMethod::setDebugOutputSupported. The output file type is set using RendererInfo::RenderMethod::setDebugOutputFileType. A menu item in the render context menu is added if support for a debug output is enabled where the label is formatted as “Open .[fileType] Output in [editor]”. The menu item launches a render process with a render argument which specifies a target location for the render debug output (this is discussed more in the next section).

Disk/batch renders do not support a partial scene graph so a previewRender method is used if ‘Render Only Selected Objects’ is enabled in the scene graph tab. A partial scene graph here will still include the root and world locations so it is conceptually identical to a full scene graph.

A different type of partial scene graph output can be obtained using a scene graph location’s context menu under ‘Debugging’ where the menu item follows the same signature as the one above. This option is enabled using RendererInfo::RenderMethod::setSceneGraphDebugOutputSupported and RendererInfo::RenderMethod::setDebugOutputFileType as before. A current limitation is that only one render method can support this feature.

A debug output can be created in script mode using the following functions in the NodeDebugOutput module:

  • WriteRenderOutput(node, renderer, filename=None, expandProcedural=True, openInEditor=False, customEditor=None, log=None)
  • WriteRenderOutputForRenderMethod(renderMethodName, node, renderer, filename=None, expandProcedural=True, log=None, openInEditor=True, customEditor=None, sceneGraphPath=None, printToConsole=False)

The former method always uses the batch render method and runs synchronously (blocking). The latter one supports any render method and runs asynchronously (non-blocking).

Creating a debug output in the render plug-in

We know that our render plug-in should create a debug output if ‘renderOutputFile’ was passed as an argument to the render process (renderboot). The argument’s value can be retrieved using Render::RenderBase::getRenderOutputFile where the value specifies the target location of the debug output. Katana will by default open the debug output file when the render process has finished.

Another render argument is passed which indicates whether the bounded procedurals should be expanded which is queried using Render::RenderBase::isExpandProceduralActive.

Note

A debug output will not cancel a preview render which is in progress. However, a non-concurrent preview render will cancel a debug output process. A full debug output runs a synchronous disk render by default and therefore blocks the UI. A partial debug output using ‘Render Only Selected Objects’ runs an asynchronous preview render which does not block the UI.

Setting the plug-in as the default renderer in Katana

Setting the default renderer in Katana is done using the environment variable DEFAULT_RENDERER=[render plug-in name].

Linking the plug-in to its corresponding renderer info plug-in

The name used to register the render plug-in should be returned in the renderer info plug-in through RendererInfoBase::getRegisteredRendererName.

This tells Katana how to namespace attribute data provided by the renderer info plug-in (e.g. shaders), in such as way that it can be easily retrieved by the render plug-in.

Adding configuration nodes

GenericAssign nodes are useful to expose a set of scoped attributes which can be used to specify renderer-specific properties such as global settings. These nodes are created using an XML file which contains the attributes and corresponding UI hints, as well as the scene graph scope. The XML file has to reside in a directory called ‘GenericAssign’ where it will be picked up and used to automatically register a node whose name matches the XML filename.

Configuring global settings ([rendererName]GlobalSettings)

A typical use for a configuration node is to declare global options which apply during the render process. The convention in Katana is to scope these global settings at the root of the scene graph under a group attribute named [rendererName]GlobalStatements. A fixed CEL statement is used to prevent users from being able to scope the global attributes arbitrarily. The following example shows how the GenericAssign node is configured to get this behaviour, as well as providing a simple attribute setup which utilises widget hints and conditional visibility:

<args format='1.0' scope='/root' fixedCEL='/root'>
  <group name='myrendererGlobalStatements' hideTitle='True' closed='True' groupInherit='False'>
    <group name='bucket' closed='True'>
      <string name='order' default='horizontal' widget='popup'>
        <hintlist name="options">
          <string value="horizontal"/>
          <string value="vertical"/>
          <string value="spiral"/>
        </hintlist>
        <help>Some help text</help>
      </string>

      <int name='orderorigin' default='0, 0' size='2' tupleSize='2'
          conditionalVisOp='equalTo' conditionalVisPath='../order' conditionalVisValue='spiral'/>
    </group>
    ...
  </group>
</args>

Here, we declared a closed group which encapsulates all bucket settings where a popup list offers a choice of three bucket orders and a conditional property is shown if the ‘spiral’ value is selected.

The Render::GlobalSettings utility class can be extended where it retrieves the global statements based on Katana’s naming convention. The class can then freely be used to parse the attribute data and encapsulate global settings related functions.

Configuring object settings ([rendererName]ObjectSettings)

GenericAssign nodes can also be used to configure attributes for arbitrary scene graph locations based on a CEL statement. This allows assigning attribute data on a per object basis while traversing the scene graph. By convention, these attributes can be assigned to any scene graph location below (and including) the world location, where the attributes are grouped under [rendererName]Statements and can be inherited. The following example shows how to configure the scope as well as setting up a page which encloses a set of attributes (differently to a group attribute):

<args format='1.0' scope='/root/world//\* /root/world'>
  <group name='myrendererStatements' hideTitle='True' closed='True'>
    <page name="Geometry">
      <int name='invert_normals' default='0' widget='checkBox'>
        <help>
          Some help text.
        </help>
      </int>
      ...
    </page>
    ...
  </group>
</args>

Sending ID pass data to Katana

There are two aspects in terms of getting ID pass data to Katana:

  • Assign an integer value to a renderable scene graph location and advertise the mapping between the two to Katana.
  • Render the ID pass and send the single channel image to Katana.

The latter is naturally expressed as a channel in the Display Driver API so this section will focus on the former.

Render::IdSenderInterface is a utility class which handles the ID communication with Katana. It is used to both get a unique integer ID from Katana as well as sending the ID values and their corresponding scene graph location names to Katana.

Example:

int64_t nextId;
int64_t maxId;

// Get an instance of the ID sender interface from the factory
Render::IdSenderInterface* idSender;
idSender = Render::IdSenderFactory::getNewInstance(getKatanaHost(), frameID);

// Get the next unique ID integer value
idSender->getIds(&nextId, &maxId);

// Use nextId with the scene graph iterator (sgi) location

// Send the ID and scene graph location path
idSender->send(nextId, sgi.getFullPath().c_str());

A frameID as used above can be retrieved from a RenderSettings::ChannelBuffer object, e.g.:

RenderSettings::ChannelBuffers channelBuffers;
renderSettings.getChannelBuffers(channelBuffers);

// Here we assume the first channel buffer is valid and used
int64_t frameID = convertToInt(channelBuffers[0].bufferId);

Setting the number of render threads

There are two conventions used in Katana to declare the number of render threads for a launched render process:

  • Using a renderSettings.renderThreads attribute. The function Render::RenderSettings::applyRenderThreads can be used to apply the value if it has been set.

  • UI preferences and batch command line argument. Both override values are sent to the render process as a ‘threads’ argument where it can be applied using Render::RenderBase::applyRenderThreadsOverride. Note that this value should always override every other thread value as the user has explicitly requested it.

    • UI mode: The interactiveRenderThreads3D value is sent to the render process if interactiveRenderThreadOverride is set to Yes in the Preferences dialog.
    • Batch mode: The thread count is set using the –threads3d argument when launching Katana where the value is sent to the render process.

Render API

enum RenderAPI::LiveRenderFilterMode

Values:

kLiveRenderFilterMode_Append
kLiveRenderFilterMode_Replace
enum RenderAPI::SceneGraphTraversalMode

Values:

kSceneGraphTraversalMode_LocationOrigin
kSceneGraphTraversalMode_RecursiveFromSelection
kSceneGraphTraversalMode_SelectedLocations
kSceneGraphTraversalMode_SelectedLocationsRecursive
enum RenderAPI::ProceduralArgsType

Values:

kProceduralArgsType_Classic
kProceduralArgsType_ScenegraphAttr
std::string Foundry::Katana::RenderOutputUtils::buildProceduralArgsString(FnScenegraphIterator sgIterator, ProceduralArgsType type, const std::string &argsAttrName, const ProceduralOutputContextInfo &contextInfo)
void Foundry::Katana::RenderOutputUtils::flushProceduralDsoCaches(const std::string &apiName = "")

flushProceduralDsoCaches

int Foundry::Katana::RenderOutputUtils::getPixelAreaThroughCamera(FnScenegraphIterator sgIterator, const std::string &cameraName, const std::string &resolution)

getPixelAreaThroughCamera

void Foundry::Katana::RenderOutputUtils::findSampleTimesRelevantToShutterRange(std::vector<float> &sampleTimes, const std::set<float> &inputSamples, float shutterOpen, float shutterClose)

findSampleTimesRelevantToShutterRange

std::string Foundry::Katana::RenderOutputUtils::getRenderResolution(FnScenegraphIterator rootIterator, int *width, int *height)

getRenderResolution

std::string Foundry::Katana::RenderOutputUtils::getCameraPath(FnScenegraphIterator rootIterator)

getCameraPath

void Foundry::Katana::RenderOutputUtils::fillXFormListForLocation(std::vector<Transform> &xFormList, FnScenegraphIterator sgIterator, float shutterClose = 0.0f)

fillXFormListForLocation

bool Foundry::Katana::RenderOutputUtils::fillXFormListFromAttributes(std::vector<Transform> &xFormList, const FnAttribute::GroupAttribute &xformAttr, float shutterClose = 0.0f, bool invertMatrix = true)

fillXFormListFromAttributes

FnAttribute::GroupAttribute Foundry::Katana::RenderOutputUtils::convertTexturesToArbitraryAttr(const FnAttribute::GroupAttribute &texturesAttr)

convertTexturesToArbitraryAttr

FnAttribute::GroupAttribute Foundry::Katana::RenderOutputUtils::getFlattenedMaterialAttr(FnScenegraphIterator sgIterator, const FnAttribute::StringAttribute &terminalNamesAttr)

getFlattenedMaterialAttr

void Foundry::Katana::RenderOutputUtils::emptyFlattenedMaterialCache()

emptyFlattenedMaterialCache

CameraInfo Foundry::Katana::RenderOutputUtils::getCameraInfo(FnScenegraphIterator sgIterator, const std::string &cameraInfoPath)

getCameraInfo

Foundry::Katana::RenderOutputUtils::processLocation(FnScenegraphIterator sgIterator, const std::string &rendererName, const std::string &locationName, void *optionalInput, void **optionalOutput)

Process a scene graph location for given a location type and renderer name. Looks up a scene graph location delegate plug-in given a location type and renderer name. If a plug-in is found the rendering/processing for this location is delegated to the plug-in where it operates on the corresponding scene graph iterator.

Return
true if a plug-in is found, false otherwise.
Parameters
  • sgIterator -

    A scene graph iterator for the location to process.

  • rendererName -

    The name of the processor/renderer that should be used (can be empty to signify any-renderer).

  • locationName -

    The location type as retrieved from Foundry::Katana::SceneGraphIterator::getType() (must not empty).

  • optionalInput -

    Optional input data for the plug-in.

  • optionalOutput -

    Optional pointer that will point to the result of the processing/rendering.

Foundry::Katana::RenderOutputUtils::fillDelegateHandledLocationTypesList(std::vector<std::string> &delegateHandledLocationTypesList, const std::string &renderer = std::string())

Returns a vector containing the location types for which there are registered ScenegraphLocationDelegate plugins. Specifying an empty string for the renderer forces a search for location types with ScenegraphLocationDelegate plugins for any renderer.

Parameters
  • delegateHandledLocationTypesList -

    a reference to a vector that will be filled with location type names; one for each location type that is handled by a registered delegate.

  • renderer -

    The renderer name, can be empty to denote any-renderer

Foundry::Katana::RenderOutputUtils::buildTempRenderLocation(FnScenegraphIterator sgIterator, const std::string &outputName, const std::string &prefix, const std::string &fileExtension, const float frameTime)

Build a render location in the temporary directory for a render output.

Return
The built temporary location for the render output
Parameters
  • sgIterator -

    The root scene graph iterator

  • outputName -

    The name of the render output

  • prefix -

    The filename prefix

  • fileExtension -

    The filename extension

  • frameTime -

    The current frame time

Foundry::Katana::RenderOutputUtils::buildTileLocation(FnScenegraphIterator sgIterator, const std::string &outputPath)

Build a tile location from the render settings for a given output path.

Return
The location to a tile location which consists of the output path and the built tile filename using the tile render settings
Parameters
  • sgIterator -

    The root scene graph iterator

  • outputPath -

    The output path for the built tile filename

class Foundry::Katana::Render::CameraSettings
#include <CameraSettings.h>

A utility class which provides Katana’s camera settings by parsing attribute data on camera scene graph locations. This class can be extended if renderer specific processing is required.

Note
Where applicable, the getter functions refer to the camera settings attribute on the camera scene graph location.

Public Types

typedef FnPlatform::internal::SharedPtr<CameraSettings>::type Ptr

Public Functions

CameraSettings(FnScenegraphIterator iterator, const std::string &cameraName = "")

Parameters
  • iterator -

    The root scene graph iterator

  • cameraName -

    The camera scene graph location name (/root/cam/[cameraName])

virtual ~CameraSettings()
virtual int initialise(int displayWindow[4], int overscan[4], float shutterClose = 0.0f)

Handles the camera attribute parsing

Return
A zero value if successful, a non-zero value otherwise
Parameters
  • displayWindow -

    The display window (affects the camera’s screen window)

  • overscan -

    The overscan (affects the camera’s screen window)

  • shutterClose -

    Shutter close (used to calculate the camera’s transforms)

std::string getName() const

Return
The camera’s scene graph location name.

std::string getProjection() const

Return
The camera’s projection, e.g. ‘perspective’ (geometry.projection)

float getFov() const

Return
The camera’s field of view (geometry.fov)

void getClipping(float clipping[2]) const

Return
The camera’s clipping plane (near, far) (geometry.near and geometry.far)

void getScreenWindow(float screenWindow[4]) const

Return
The camera’s screen window (left, right, bottom, top)

std::vector<FnKat::RenderOutputUtils::Transform> getTransforms() const

Return
The camera’s transform (inverse xform attribute list)

Protected Attributes

FnScenegraphIterator _iterator
std::string _cameraName
std::string _projection
float _fov
float _orthographicWidth
float _clipping[2]
float _screenWindow[4]
std::vector<FnKat::RenderOutputUtils::Transform> _transforms
class Foundry::Katana::Render::CopyAndConvertRenderAction
#include <CopyAndConvertRenderAction.h>

A render action which renders to a temporary location and then performs a conversion based on the input parameters which include convert settings attributes. The converted file is then copied to the target location.

Note
The temporary file is deleted unless the KATANA_KEEP_TEMP_RENDER_FILES environment variable is set.

Inherits from Foundry::Katana::Render::CopyRenderAction

Public Functions

CopyAndConvertRenderAction(const std::string &renderTargetLocation, const std::string &tempRenderLocation, bool clampOutput, bool colorConvert, const std::string &computeStats, const RenderSettings::AttributeSettings &convertSettings)

Parameters
  • renderTargetLocation -

    The file location which is read and displayed in the monitor.

  • tempRenderLocation -

    The file location which is rendered to and then copied to the target location.

  • clampOutput -

    Post-render, clamp negative rgb values to 0, and clamp alpha values to 0-1.

  • colorConvert -

    Post-render, convert rendered image data from linear to output colorspace specified in the filename.

  • computeStats -

    Specifies whether and how to compute image statistics as a post process, appending as exr metadata. The default value is ‘None’.

  • convertSettings -

    exr conversion settings which include compression, bit depth, type, and an optimisation flag.

virtual ~CopyAndConvertRenderAction()
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
void setAdditionalExrAttrs(const RenderSettings::AttributeSettings &additionalExrAttrs)
void setOffsetForOverscan(bool value)

Protected Attributes

bool _clampOutput
bool _colorConvert
std::string _computeStats
RenderSettings::AttributeSettings _convertSettings
RenderSettings::AttributeSettings _additionalExrAttrs
bool _offsetForOverscan
class Foundry::Katana::Render::CopyRenderAction
#include <CopyRenderAction.h>

A render action which renders to a temporary location and then copies the rendered file to the target location.

Note
The temporary file is deleted unless the KATANA_KEEP_TEMP_RENDER_FILES environment variable is set.

Inherits from Foundry::Katana::Render::RenderAction

Subclassed by Foundry::Katana::Render::CopyAndConvertRenderAction, Foundry::Katana::Render::PostCommandsRenderAction

Public Functions

CopyRenderAction(const std::string &renderTargetLocation, const std::string &tempRenderLocation)

Parameters
  • renderTargetLocation -

    The file location which read and displayed in the monitor.

  • tempRenderLocation -

    The file location which is rendered to and then copied to the target location.

virtual ~CopyRenderAction()
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const

Protected Attributes

std::string _tempRenderLocation
class Foundry::Katana::Render::DiskRenderOutputProcess
#include <DiskRenderOutputProcess.h>

Configures the render process for disk renders and defines how render outputs are managed.

Public Types

typedef FnPlatform::internal::UniquePtr<RenderAction> UniquePtr
typedef UniquePtr::type RenderActionPtr

Public Functions

DiskRenderOutputProcess()
virtual ~DiskRenderOutputProcess()
void setRenderAction(RenderActionPtr renderAction)

A render action declares where the outputs are rendered to and how they are handled after the render is complete. All stages of the render action are executed before the post-render commands.

Parameters
  • renderAction -

    The render action used for this render output process.

void addPreCommand(const std::string &command)

Add a command line which is executed before the render.

Parameters
  • command -

    Pre-render command line

void addPostCommand(const std::string &command)

Add a command line which is executed after the render. The post-render commands are always executed after all the stages of a render action but before temporary files are cleaned up.

Parameters
  • command -

    Post-render command line

FnAttribute::GroupAttribute buildRenderOutputAttribute() const
class Foundry::Katana::Render::GlobalSettings
#include <GlobalSettings.h>

A utility class which provides a renderer’s global settings from the Katana recipe if they are used. The attributes can be found on the root scene graph location at [rendererName]GlobalStatements. This class is a placeholder and can be extended to provide renderer specific parsing and access functions.

Public Functions

GlobalSettings(FnScenegraphIterator rootIterator, const std::string &rendererNamespace)

Parameters
  • rootIterator -

    The root scene graph iterator

  • rendererNamespace -

    The namespace used (typically the renderer name) to define the global settings group attribute for the renderer ([rendererNamespace]GlobalStatements).

virtual ~GlobalSettings()
virtual int initialise(const std::string &rendererNamespace)

Parses the the global settings attributes

Return
A zero value if successful, a non-zero value otherwise
Parameters
  • rendererNamespace -

    The namespace used (typically the renderer name) to define the global settings group attribute for the renderer ([rendererNamespace]GlobalStatements).

GroupAttribute getGlobalSettingsAttr() const

Return
The group attribute containing the global settings ([rendererNamespace]GlobalStatements)

Attribute getAttribute(const std::string &attributeName) const

Finds an Attribute under the global settings by name

Return
The named Attribute if found ([rendererNamespace]GlobalStatements.[attributeName])
Parameters
  • attributeName -

    The name of a global settings attribute

Protected Attributes

FnScenegraphIterator _rootIterator
GroupAttribute _globalSettingsAttr
class Foundry::Katana::Render::IdSenderInterface
#include <IdSenderInterface.h>

An interface for sending (ID, scene graph location name) pairs to Katana. This mapping is then used by the color picker to map a picked ID value in the monitor to the name of the corresponding scene graph location.

Subclassed by Foundry::Katana::Render::SocketIdSender

Public Functions

virtual ~IdSenderInterface()
virtual FNKAT_DEPRECATED void Foundry::Katana::Render::IdSenderInterface::getIds(int64_t * nextId, int64_t * maxId) = 0

Get the next unique ID integer value and the maximum number of IDs.

This function is now *deprecated* and shouldn’t be called. For backwards compatibility, this function will still return the legacy values nextId = 1 and maxId = 1000000.

Now valid IDs range from 1 to 18446744073709551615. Value 0 is reserved.

Parameters
  • nextId -

    A unique incremented ID value

  • maxId -

    The maximum number of ID values

virtual void send(uint64_t id, const char *const objectName) = 0

Send an ID and scene graph location name pair for a rendered object to Katana.

Now valid IDs range from 1 to 18446744073709551615. Value 0 is reserved.

Parameters
  • id -

    Unique ID

  • objectName -

    Scene graph location name

class Foundry::Katana::Render::NoOutputRenderAction
#include <NoOutputRenderAction.h>

A render action which does not specify any output locations.

Inherits from Foundry::Katana::Render::RenderAction

Public Functions

NoOutputRenderAction()
virtual ~NoOutputRenderAction()
class Foundry::Katana::Render::PostCommandsRenderAction
#include <PostCommandsRenderAction.h>

A render action which renders to a temporary location and then runs post commands to process image and copy to target render location.

Note
The temporary file is deleted unless the KATANA_KEEP_TEMP_RENDER_FILES environment variable is set.

Inherits from Foundry::Katana::Render::CopyRenderAction

Public Functions

PostCommandsRenderAction(const std::string &renderTargetLocation, const std::string &tempRenderLocation, const std::vector<std::string> &postCommands)

Parameters
  • renderTargetLocation -

    The file location which is read and displayed in the monitor.

  • tempRenderLocation -

    The file location which is rendered to and then copied to the target location.

  • postCommand -

    The external command to run to convert tempRenderLocation to renderTargetLocation.

virtual ~PostCommandsRenderAction()
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
void addCleanupFile(const std::string &cleanupFile)

Protected Attributes

std::vector<std::string> _postCommands
std::vector<std::string> _cleanupFiles
class Foundry::Katana::Render::RenderAction
#include <RenderAction.h>

A render action which renders directly to the target location.

Subclassed by Foundry::Katana::Render::CopyRenderAction, Foundry::Katana::Render::NoOutputRenderAction, Foundry::Katana::Render::TemporaryRenderAction

Public Functions

RenderAction(const std::string &renderTargetLocation)

Parameters
  • renderTargetLocation -

    The file location which is rendered to and then displayed in the monitor.

virtual ~RenderAction()
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
void setRenderTargetLocation(const std::string &renderTargetLocation)

Set the target location of the file which will be rendered to. The rendered file will be read and displayed in the catalog and monitor unless setLoadOutputInMonitor is set to false.

Parameters
  • renderTargetLocation -

    The file location which is rendered to and then displayed in the monitor.

void setLoadOutputInMonitor(bool loadOutputInMonitor)

The rendered output is loaded into the monitor and catalog by default unless it is disabled with this function (does not apply to batch rendering).

Parameters
  • loadOutputInMonitor -

    Specifies whether or not the render output should be loaded in the monitor

void setForceOverwriteTarget(bool forceOverwriteTarget)

The rendered output overwrites the target file (even if it is set read-only) unless it is disabled with this function.

Parameters
  • forceOverwriteTarget -

    Specifies whether or not the render output should forcibly overwrite any existing file. Default is true. If set to false, render will fail if target file is read-only.

void setCreateDestinationDirectories(bool createDestinationDirectories)

The rendered output creates any necessary directories required to satisfy the path specified for the final render location, unless this feature is disabled with this function.

Parameters
  • createDestinationDirectories -

    Specifies whether or not the render output should create directories if the destination path does not exist. Default is true. If set to false, render will fail if target path doesn’t exist.

Protected Attributes

std::string _renderTargetLocation
bool _loadOutputInMonitor
bool _forceOverwriteTarget
bool _createDestinationDirectories
class Foundry::Katana::Render::RenderBase
#include <RenderBase.h>

The base class for the render plug-in which takes a Katana recipe and converts it into the renderer’s language.

A render plug-in represents a single render process (for a single frame) where the plug-in is instantiated when a render is launched and destroyed when the render is complete or cancelled. The Katana recipe is presented to the render plug-in in the form of a FnScenegraphIterator which allows traversing the scene graph in a deferred manner. The root scene graph iterator is passed to the plug-in’s constructor where it is accessible anywhere in the plug-in through Render::RenderBase::getRootIterator. The render arguments are also passed to the constructor but we recommend using the wrapper functions to retrieve the standard arguments.

The plug-in has to extend the Render abstract class and register itself using the DEFINE_RENDER_PLUGIN(class) and REGISTER_PLUGIN(class, name, major_version, minor_version) macros. This will ensure the plug-in is exposed in the UI by its registered name as well as making it available to Katana’s render process.

Public Functions

RenderBase(FnScenegraphIterator rootIterator, FnAttribute::GroupAttribute arguments)

The render plug-in class is instantiated by the renderboot process which is launched when a render is started through the UI or using the RenderManager.StartRender script function.

See
Render::RenderBase::getRootIterator
Parameters
  • rootIterator -

    The root FnScenegraphIterator used to traverse the Katana recipe

  • arguments -

    Render arguments (e.g. render time)

virtual ~RenderBase()
virtual int start() = 0

Start a render by traversing the scene graph using FnScenegraphIterator and interpret the locations and attributes into the renderer’s language. This function is called at the start of the render process.

Return
A zero value if successful, a non-zero value otherwise.

virtual int pause()

Interrupt and pause the render process but does not terminate it.

Note
This is only used during live render when updating regions of interest.
Return
A zero value if successful, a non-zero value otherwise.

virtual int resume()

Resume a paused render.

Note
This is currently never called.
Return
A zero value if successful, a non-zero value otherwise.

virtual int stop()

Called at the end of the render process.

Return
A zero value if successful, a non-zero value otherwise.

virtual int startLiveEditing()

Start the live render process. Data updates and control commands will follow.

Return
A zero value if successful, a non-zero value otherwise.

virtual int stopLiveEditing()

Stop the live render process. No further data updates or control commands should be expected.

Return
A zero value if successful, a non-zero value otherwise.

virtual int processControlCommand(const std::string &command)

Process a custom live render control command which has been triggered by the user in the live update tab.

Return
A zero value if successful, a non-zero value otherwise.
Parameters
  • command -

    Live render control command

virtual int queueDataUpdates(FnAttribute::GroupAttribute updateAttribute)

Process a data update during live render. The update is based on an attribute convention where an update for a single scene graph location is encapsulated by a GroupAttribute. Each attribute update contains the following:

  • type: root, globals, camera, light, geoMaterial, or a custom type declared as a LiveRenderAPI plugin.
  • location: The full scene graph location name
  • attributes: A GroupAttribute containing the update attributes which vary based on the type:
    • root: camera (StringAttribute containing the selected camera)
    • globals: [rendererName]GlobalStatements
    • camera: xform, geometry
    • light: xform, material, geometry, mute, info
    • geoMaterial: material, info
    • (custom): Depends on what attributes were declared for the custom type.

Note

A useful trick while debugging is to print the XML string for the update attribute to see its contents: updateAttribute.getXML();

This function is called from a separate update thread whereas hasPendingDataUpdates and applyPendingDataUpdates are called in the main render process thread.

Return
A zero value if successful, a non-zero value otherwise.
See

Render::RenderBase::hasPendingDataUpdates

Render::RenderBase::applyPendingDataUpdates

Parameters
  • updateAttribute -

    A group attribute containing one or more update attributes.

virtual int applyPendingDataUpdates()

Apply one or more live data updates which have been processed by queueDataUpdates. This provides an opportunity to process and queue live update attributes in the update thread and then flush them in the main thread.

This function is called if hasPendingDataUpdates returns true.

Return
A zero value if successful, a non-zero value otherwise.
See

Render::RenderBase::hasPendingDataUpdates

Render::RenderBase::queueDataUpdates

virtual bool hasPendingDataUpdates() const

Inform the render process whether it has to flush and apply live updates.

Return
true if there are updates which have to be applied, false otherwise
See

Render::RenderBase::applyPendingDataUpdates

Render::RenderBase::queueDataUpdates

virtual void configureDiskRenderOutputProcess(DiskRenderOutputProcess &diskRenderOutputProcess, const std::string &outputName, const std::string &outputPath, const std::string &renderMethodName, const float &frameTime) const

Provide Katana with information on how to process a given render output which has been defined in a Katana scene using the RenderOutputDefine node. This is only applicable during disk render where the function is called for each render output (port) on the render node.

Note
The list of available output types is provided by RendererInfo::RendererInfoBase::buildRendererObjectInfo when Katana calls the function using kFnRendererObjectTypeRenderOutput as an object type.
See

Render::DiskRenderOutputProcess

Render::RenderAction

Render::CopyRenderAction

Render::CopyAndConvertRenderAction

Render::TemporaryRenderAction

Render::NoOutputRenderAction

Render::RenderSettings::RenderOutputs

Render::RenderSettings::getRenderOutputs

RendererInfo::RendererInfoBase::buildRendererObjectInfo

Parameters
  • diskRenderOutputProcess -

    Defines the render action for a given render output as well as pre- and post-commands used in the render process.

  • outputName -

    The name of the render output (as defined in the corresponding RenderOutputDefine node).

  • outputPath -

    The target location for the render output.

  • renderMethodName -

    The render method used to launch the render.

  • frameTime -

    The current frame time.

FnAttribute::Attribute _configureDiskRenderOutputProcess(const std::string &outputName, const std::string &outputPath, const std::string &renderMethodName, const float &frameTime) const

Public Static Functions

static FnPlugStatus setHost(FnPluginHost *host)
static FnPluginHost *getHost()
static FnRenderPluginSuite_v1 createSuite(FnRenderPluginHandle (*create)(FnSgIteratorHandle, FnAttributeHandle))
static FnRenderPluginHandle newRenderHandle(RenderBase *render)

Public Static Attributes

unsigned int _apiVersion
const char *_apiName

Protected Functions

FnScenegraphIterator getRootIterator() const

The scene graph iterator is used to traverse the scene graph and author data to the renderer based on the scene graph type and attributes. The root iterator provides a starting point for the traversal as it contains the entire scene graph as well as any global scene attributes which are by convention assigned to the root location.

Return
The iterator for the root scene graph location

std::string getRenderMethodName() const

Retrieve the render method used to launch the render from the render arguments. The method name is passed to the RenderManager.StartRender function where the list of available methods is declared by RendererInfo::RendererInfoBase::fillRenderMethods in UI mode, and by configureBatchRenderMethod in batch mode, when creating debug outputs, and when rendering dependencies.

Return
The render method name used to launch the render process
See

RendererInfo::RendererInfoBase::fillRenderMethods

RendererInfo::RendererInfoBase::configureBatchRenderMethod

std::string findArgument(const std::string &argumentName, const std::string &defaultValue = "") const

Retrieve a render argument by name. The standard render arguments are accessible through explicit functions but custom live render arguments which have been advertised in the live render tab using the startConfiguration policy type.

Return
The render argument value
Parameters
  • argumentName -

    The name of the render argument that should be retrieved

bool applyRenderThreadsOverride(int &numberOfRenderThreads) const

Update the number of render threads if a ‘threads’ argument is passed as a render argument. The thread value is passed to the render process in the following cases:

  • UI mode: The ‘interactiveRenderThreads3D’ value is used if ‘interactiveRenderThreadOverride’ is set to ‘Yes’ in the Preferences dialog under ‘application->rendering’.
  • Batch mode: The thread count is set using the ‘–threads3d’ argument when launching Katana.

Return
true if an override was applied, false otherwise
Parameters
  • numberOfRenderThreads -

    The render thread variable which is subject to the thread override

std::string getKatanaBasePath() const

Return
The base path for Katana

std::string getKatanaTempDirectory() const

Get the name of the temporary directory Katana creates at startup which is used throughout the session.

Return
Katana’s temporary directory

std::string getKatanaHost() const

Get the host and port of Katana’s listener which is started when Katana is launched in UI mode. The listener is used to retrieve image and id data from the renderer plug-in.

Return
The host name for Katana’s image and id listener

float getRenderTime() const

Get the render time which is either a value retrieved from the timeline (UI mode), or a single frame from the interval provided by the -t command line argument when launching a batch render.

Return
The render time (frame)

bool useRenderPassID() const

Specifies whether an ID pass should be created. The user guide explains how to activate an ID pass in the monitor and how to use the picker tool.

See Sending ID pass data to Katana for further information.

Return
true if an ID pass should be created, false otherwise
See

Render::IdSenderFactory::getNewInstance

Render::IdSenderInterface

std::string getRenderOutputFile() const

Returns the name of a file which Katana expects the render plug-in to create and populate with scene description data and/or debug information. See Generating a render debug output.

Return
The name of the the render debug output file

bool isExpandProceduralActive(bool defaultValue = false) const

This function is used in conjunction with getRenderOutputFile where if a render output file is expected to be generated, and if the renderer supports recursive procedurals, then this determines whether the procedurals should be expanded or not.

Return
true if the procedurals should be expanded, false otherwise
See
getRenderOutputFile

std::string getRenderPluginDirectory() const

Returns the directory name where the render plug-in resides on disk.

Return
The render plug-in directory

std::string getEnvironmentVariable(const std::string &environmentVariableName) const

Looks up and returns an environment variable by name.

Return
The value of the given environment variable name

template <typename T, typename A>
T getAttrValue(const FnAttribute::Attribute &attr, const T &defaultValue) const

A helper function which retrieves and converts the value of an Attribute to a desired standard type. This is useful for instance when collecting custom rendererSettings values from the render outputs, e.g.:

   int mySettings = getAttrValue<int, IntAttribute>(output.rendererSettings["mySettings"], 0);

Return
The typed attribute value or the default value if the attribute is not valid
Parameters
  • attr -

    The Attribute that we want to retrieve the value from

  • defaultValue -

    Default value if the attribute is not valid

std::string getStringAttrValue(const FnAttribute::Attribute &attr, const std::string &defaultValue = "") const

A convenience function for retrieving the value of StringAttribute

Return
The string value contained in the attribute or the default value if the attribute is not valid
Parameters
  • attr -

    The StringAttribute that we want to retrieve the value from

  • defaultValue -

    Default string value if the attribute is not valid

class Foundry::Katana::Render::RenderSettings
#include <RenderSettings.h>

A utility class which represents a collection of render settings which originate from the renderSettings attributes and other relevant modules. This class can be extended if renderer specific processing is required.

Note
Where applicable, the getter functions refer to the renderSettings attribute on the scene graph root.

Public Types

typedef std::map<std::string, ChannelBuffer> ChannelBuffers

A collection of channel buffers which is populated based on the selected interactive outputs in the render settings.

typedef std::map<std::string, std::string> Settings
typedef std::map<std::string, FnAttribute::Attribute> AttributeSettings
typedef std::map<std::string, CameraSettings *> CameraMap

Maps scene graph location names of cameras to the corresponding CameraSettings.

typedef std::map<std::string, RenderOutput> RenderOutputs

Maps render output names to a RenderOutput structure which contains the output’s attributes and values.

Public Functions

RenderSettings(FnScenegraphIterator rootIterator)

Parameters
  • rootIterator -

    The root scene graph iterator

virtual ~RenderSettings()
virtual int initialise()

Handles the render settings attribute parsing

Return
A zero value if successful, a non-zero value otherwise

bool isValid() const

Return
true if the render settings have been initialised using valid renderSettings attributes, false if the renderSettings attribute is not valid.

virtual std::string getCameraName() const

Return
The camera scene graph location (renderSettings.cameraName)

virtual CameraSettings *getCameraSettings() const

The CameraSettings class is created by using the camera name to look up and parse the attributes for the corresponding camera scene graph location.

Return
The camera settings class which represents the camera scene graph location attributes. Note that the CameraSettings object pointed to by the returned CameraSettings pointer is only valid for the lifetime of this RenderSettings object.

virtual CameraMap getAdditionalCameras() const

A collection of cameras defined by the render outputs. Each render output can reference a camera scene graph location (cameraName) where the attribute values for each location are parsed by CameraSettings if the parameter is locally set, and added to a map indexed by the camera scene graph location name.

Return
A map of per render output camera settings indexed by the camera name. Note that the he CameraSettings objects pointed to by the result CameraMap are only valid for the lifetime of this RenderSettings object.
See
CameraSettings

virtual void getCropWindow(float cropWindow[4]) const

Return
The crop window (renderSettings.cropWindow)

virtual void getSampleRate(float sampleRate[2]) const

Returns the sample rate. Typical sample rates are:

  • (1.0, 1.0) = 100%
  • (0.5, 0.5) = 50%
  • (0.25, 0.25) = 25%
  • (0.125, 0.125) = 12.5%

Return
The sample rate

virtual std::string getResolutionName() const

Return
The name of the resolution (renderSettings.resolution)

virtual int getResolutionX() const

Return
The render resolution width (X) (renderSettings.resolution.X)

virtual int getResolutionY() const

Return
The render resolution height (Y) (renderSettings.resolution.Y)

virtual void getDisplayWindow(int displayWindow[4]) const

The display window spans the area from the origin (0, 0) to the resolution width and height (getResolutionX(), getResolutionY()).

Return
The display window (0, 0, xRes, yRes)

virtual void getOverscan(int overscan[4]) const

Return
The uniform overscan (renderSettings.overscan)

virtual void getDataWindow(int dataWindow[4]) const

The data window takes the overscan into account where it spans the display window plus the overscan.

Return
The data window (display window + overscan)

virtual void getRegionOfInterest(int regionOfInterest[4]) const

The region of interest as specified in the Monitor tab (refer to the User Guide for information on how to use the ROI features).

Return
The active region of interest

virtual std::string getRenderer() const

Return
The active renderer at render time (renderSettings.renderer)

virtual bool applyRenderThreads(int &renderThreads) const

Applies the number of render threads if they have been defined using renderSettings.renderThreads. The reason the function returns a boolean and the value is passed as a reference is because the thread value is allowed to be a zero value which generally asks the renderer to use all available cores, and a negative value where -1 typically represents a (no. cores - 1) value.

Note
This value is not exposed in the parameter list and has to be set using e.g. an AttributeSet node.
Return
true if the render thread value was set, false otherwise
Parameters
  • renderThreads -

    The value that will acquire the number of render threads if it has been set

virtual void getInteractiveOutputs(std::vector<std::string> &outputs) const

Provides the list of selected interactive output channels as specified in the render settings where each interactive output corresponds to a ChannelBuffer.

See
getChannelBuffers
Parameters
  • outputs -

    Selected interactive outputs (renderSettings.interactiveOutputs)

virtual void getChannelBuffers(ChannelBuffers &channelBuffers)

Provides the channel buffers for the selected interactive outputs.

See
getInteractiveOutputs
Parameters
  • channelBuffers -

    The channel buffer map which will be populated with ChannelBuffer structures that correspond to the selected interactive outputs

virtual RenderOutputs getRenderOutputs() const

Return
A map of render outputs indexed by the output name (renderSettings.outputs)
See
RenderOutput

virtual std::vector<std::string> getRenderOutputNames(const bool onlyEnabledOutputs = true) const

Return
The render output names in the order as they appear under (renderSettings.outputs)

virtual int getNumberOfRenderOutputs() const

Return
The number of render outputs used in disk/batch/debug renders

virtual RenderOutput getRenderOutputByName(const std::string &outputName) const

Return
...

virtual int getMaxTimeSamples() const

Return
The maximum number of time samples (renderSettings.maxTimeSamples)

virtual float getShutterOpen() const

Return
The shutter open value (renderSettings.shutterOpen)

virtual float getShutterClose() const

Return
The shutter close value (renderSettings.shutterClose)

virtual bool isTileRender() const

Tile rendering is set by adding a renderSettings.tileRender attribute which contains 4 integer values.

Return
true if tileRender is set under renderSettings, false otherwise

virtual void getWindowOrigin(int windowOrigin[2]) const

Parameters
  • windowOrigin -

    The window origin with respect to the region of interest within the display window.

virtual void getDisplayWindowSize(int displayWindowSize[2]) const

Parameters
  • displayWindowSize -

    The size (width and height) of the display window

virtual void getDataWindowSize(int dataWindowSize[2]) const

Parameters
  • dataWindowSize -

    The size (width and height) of the data window

virtual std::string getRenderFinishedFilename() const

Parameters
  • renderFinishedFilename -

    Path to file that renderer can optionally create to signal that render completed successfully. Useful for renderers that tend to crash on exit.

Protected Types

typedef std::map<std::string, CameraSettings::Ptr> CameraMapPtrs

Protected Functions

void calculateCropWindow(float calculatedCropWindow[4]) const
void processColorOutput(RenderOutput &output, FnAttribute::GroupAttribute rendererSettingsAttr) const

Protected Attributes

FnScenegraphIterator _rootIterator
bool _valid
CameraSettings::Ptr _camera
CameraMapPtrs _additionalCameras
std::string _renderer
std::string _cameraName
std::string _resolution
int _overscan[4]
int _displayWindow[4]
int _finalDisplayWindow[4]
int _dataWindow[4]
int _finalDataWindow[4]
float _cropWindow[4]
int _regionOfInterest[4]
int _finalRegionOfInterest[4]
int _xRes
int _yRes
float _sampleRate[2]
bool _useTileRender
int _tileRender[4]
FnAttribute::IntAttribute _renderThreadsAttr
int _maxTimeSamples
float _shutterOpen
float _shutterClose
std::string _interactiveOutputs
ChannelBuffers _buffers
RenderOutputs _renderOutputs
std::vector<std::string> _renderOutputNames
std::vector<std::string> _enabledRenderOutputNames
std::string _tempDir
std::string _renderFinishedFilename
struct ChannelBuffer
#include <RenderSettings.h>

Contains the channel names (AOVs) and the corresponding buffer IDs which are reserved in the catalog. This is only applicable for preview renders where the list of channels the user wants to render is configured using the interactiveOutputs parameter on the RenderSettings node. This allows a user to selectively preview render a list of channels, sometimes referred to as output variables, passes, and render elements.

Public Members

std::string channelName
std::string bufferId
struct RenderOutput
#include <RenderSettings.h>

Contains the values of a single render output on a render node which are typically set using a RenderOutputDefine node. The corresponding attributes are found on the scene graph root under renderSettings.outputs where they declare the target filename, color space, etc.

Note
This is only used for disk renders, batch renders, and debug outputs.
See
getRenderOutputs()

Public Members

std::string type
std::string locationType
std::string renderLocation
AttributeSettings rendererSettings
std::string colorSpace
std::string channel
std::string fileExtension
std::string cameraName
AttributeSettings convertSettings
bool clampOutput
bool colorConvert
std::string computeStats
std::string tempRenderLocation
std::string tempRenderId
bool enabled
class Foundry::Katana::Render::ScenegraphLocationDelegate
#include <ScenegraphLocationDelegate.h>

Super-Class that enables the creation of user-defined sub-classes and plug-ins responsible for processing/rendering different location types.

For each location type a class associated with a plug-in can be defined that processes/renders information related to the location into something else. A common cases are to retrieve location information from the scene graph iterator, render its geometry, or output a file. A ScenegraphLocationDelegate can be used as a generic way to handle locations and perform any operation

Using the macros DEFINE_SCENEGRAPH_LOCATION_DELEGATE_PLUGIN and REGISTER_PLUGIN a location plug-in is defined and it is detected by Katana at runtime.

For example: DEFINE_SCENEGRAPH_LOCATION_DELEGATE_PLUGIN(ArnoldSphereScenegraphLocationDelegate) REGISTER_PLUGIN(ArnoldSphereScenegraphLocationDelegate, “ArnoldSphereScenegraphLocationDelegate”, 0, 1)

associates the ScenegraphLocationDelegate sub-class ArnoldSphereScenegraphLocationDelegate to be responsible for processing/rendering a location type named “sphere” for the “arnold” renderer. The second parameter must a be a Katana-wide unique string. The registration gives priority to the plugins that are discovered first in the directory hierarchy.

Another requirement for the sub-classes is to provide 4 additional methods e.g.: static void flush(); reset/update the state of the object static XXX* create(); creates an instance of the sub-class XXX std::string getSupportedRenderer() returns a string of the supported renderer name. If the string is empty then all renderers are supported. If there is a delegate that supports a specific renderer for a given location it is given priority over any delegate that supports all renderers. void fillSupportedLocationList(std::vector<std::string>& supportedLocationList) populates a vector of strings naming all the supported locations, e.g. a “polymesh”

Public Functions

virtual ~ScenegraphLocationDelegate()
void bootstrap(void *ptr)
virtual void *process(FnScenegraphIterator sgIterator, void *optionalInput) = 0

Process/renders a given location, must be implemented by sub-classes.

Method responsible for processing/rendering a given location, passed as a scene graph iterator. Return is implementation depended.

Parameters
  • sgIterator -

    the iterator referring to a location. Its expected value matches the iterator type used when then subclass was registered with the REGISTER_PLUGIN macro.

  • optionalInput -

    optional input, its use and value depends on the implementation.

virtual std::string getSupportedRenderer() const
virtual void fillSupportedLocationList(std::vector<std::string> &supportedLocationList) const = 0

Public Static Functions

static FnScenegraphLocationDelegatePluginSuite_v1 createSuite(FnLocationHandle (*create)())
static FnPlugStatus setHost(FnPluginHost *host)
static FnLocationHandle newLocationHandle(ScenegraphLocationDelegate *location)

Public Static Attributes

unsigned int _apiVersion
const char *_apiName
class Foundry::Katana::Render::TemporaryRenderAction
#include <TemporaryRenderAction.h>

A render action which renders to a temporary location.

This action renders a file to a temporary location which is deleted when the render is complete unless the KATANA_KEEP_TEMP_RENDER_FILES environment variable is set. By default nothing is loaded into the monitor when using this action.

This action is useful when e.g. a post process is required where a temporary file is written to disk and then processed using a custom command.

A render action needs to declare an output for each port on the render node in order to allow a render process to start. Therefore, a render pass that is not expected to produce a render output still needs to use this temporary render action regardless of whether the temporary render location is used anywhere.

See
Render::DiskRenderOutputProcess::addPostCommand

Inherits from Foundry::Katana::Render::RenderAction

Public Functions

TemporaryRenderAction(const std::string &tempRenderLocation)
virtual ~TemporaryRenderAction()
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
class Foundry::Katana::RendererInfo::RendererInfoBase
#include <RendererInfoBase.h>

The renderer info plug-in provides Katana with renderer specific information such as shaders and render outputs, as well as configuring how a render is launched.

Public Types

typedef std::pair<std::string, FnAttribute::GroupAttribute> OpDefinition
typedef std::deque<OpDefinition> OpDefinitionQueue

Public Functions

RendererInfoBase()
virtual ~RendererInfoBase()
virtual void configureBatchRenderMethod(RendererInfo::DiskRenderMethod &batchRenderMethod) const = 0

Configure the render method used for batch rendering. A batch render method is always added automatically but here it can be customised if needed.

Parameters
  • batchRenderMethod -

    The batch render method.

virtual void fillRenderMethods(std::vector<RendererInfo::RenderMethod *> &renderMethods) const = 0

Advertise supported render methods.

Parameters
  • renderMethods -

    A reference container for supported render methods.

virtual void fillRendererObjectTypes(std::vector<std::string> &renderObjectTypes, const std::string &type) const = 0

Advertise supported types for a given renderer object type. The supported renderer object types are defined in RendererObjectDefinitions where the following conventions are typically used:

  • RendererObjectDefinitions::kFnRendererObjectTypeShader: The advertised types populate the ‘Add Shader’ drop-down list in the Material node (e.g. surface, displacement, etc.)
  • RendererObjectDefinitions::kFnRendererObjectTypeRenderOutput: The advertised renderer types populate the ‘type’ drop-down list in the RenderOutputDefine node (e.g. color, raw, etc.)

See Populating renderer-specific UI parameters for more information.

See

RendererInfo::RendererInfoBase::getRendererObjectDefaultType

RendererInfo::RendererInfoBase::fillRendererObjectNames

RendererInfo::RendererInfoBase::buildRendererObjectInfo

Parameters
  • renderObjectTypes -

    The advertised types for a given renderer object type.

  • type -

    The renderer object type (e.g. RendererObjectDefinitions::kFnRendererObjectTypeShader).

virtual std::string getRendererObjectDefaultType(const std::string &type) const

The default renderer value for a given object type if applicable.

See Populating renderer-specific UI parameters for more information.

Return
The default renderer type (e.g. kFnRendererOutputTypeColor)
See

RendererInfo::RendererInfoBase::fillRendererObjectTypes

RendererInfo::RendererInfoBase::fillRendererObjectNames

RendererInfo::RendererInfoBase::buildRendererObjectInfo

Parameters
  • type -

    An object type (e.g. renderOutput)

virtual void fillLiveRenderTerminalOps(OpDefinitionQueue &terminalOps, const FnAttribute::GroupAttribute &stateArgs) const

Populate a list of terminal Op definitions that should be applied to the Op Tree during Live Rendering.

Parameters
  • terminalOps -

    The populated terminal op deffinitions. The expected format is a deque containing a std::pair<string, GroupAttribute>. The string is the name of the op and the GroupAttribute is the op args.

  • stateArgs -

    A GroupAttribute containing some extra information. Contains the entries defined by the constants:

    • kFnTerminalOpStateArgRenderMethodType - the render method type, which will be one of the strings defined by the constants starting with kFnRenderMethodType.
    • kTerminalOpStateArgSystem - the Op System Args, as defined by the GraphState. It contains information like: currentTime, shutter info, numSamples, etc.

virtual void fillRenderTerminalOps(OpDefinitionQueue &terminalOps, const FnAttribute::GroupAttribute &stateArgs) const

Populate a list of terminal Op definitions that should be applied to the Op Tree during specified render mode.

Parameters
  • terminalOps -

    The populated terminal op definitions. The expected format is a deque containing a std::pair<string, GroupAttribute>. The string is the name of the op and the GroupAttribute is the op args.

  • stateArgs -

    A GroupAttribute containing some extra information. Contains the entries defined by the constants:

    • kFnTerminalOpStateArgRenderMethodType - the render method type, which will be one of the strings defined by the constants starting with kFnRenderMethodType.
    • kTerminalOpStateArgSystem - the Op System Args, as defined by the GraphState. It contains information like: currentTime, shutter info, numSamples, etc.

virtual void fillRendererObjectNames(std::vector<std::string> &rendererObjectNames, const std::string &type, const std::vector<std::string> &typeTags) const = 0

Advertise available names for a given renderer object type and type tags. This is used to provide a list of UI options for shaders, drivers, filters, etc. The type tags can be used to filter the list of available names.

See Populating renderer-specific UI parameters for more information.

See

RendererInfo::RendererInfoBase::fillRendererObjectTypes

RendererInfo::RendererInfoBase::getRendererObjectDefaultType

RendererInfo::RendererInfoBase::buildRendererObjectInfo

Parameters
  • rendererObjectNames -

    The names of available render objects (e.g. shader names)

  • type -

    The render object type (e.g. RendererObjectDefinitions::kFnRendererObjectTypeShader)

  • typeTags -

    Filter tags which typically include the selected render object type (e.g. surface) which can be used to filter the object names based on the user’s selection in the UI.

virtual std::string getRegisteredRendererName() const = 0

Registered renderer name that corresponds to this renderer info

Return
The renderer plug-in that corresponds to this renderer info plug-in

virtual std::string getRegisteredRendererVersion() const = 0

Registered version of the renderer this renderer info is used with.

Return
The renderer version
See
getRegisteredRendererName

virtual bool isPresetLocalFileNeeded(const std::string &outputType) const

Declares if a renderer output requires a pre-declared temporary file (accessible in scene graph with implicit resolvers).

Return
true if a local file is needed, false otherwise
Parameters
  • outputType -

    A render output type

virtual bool isNodeTypeSupported(const std::string &nodeType) const

Katana will call this function to determine if the renderer supports specific nodes. Currently, Katana only queries whether the ShadingNode and OutputChannelDefine are supported.

Return
true if the node type is supported, false otherwise
Parameters
  • nodeType -

    The node type

virtual bool isPolymeshFacesetSplittingEnabled() const

Declares if polymesh faces are split into sub-meshes where each mesh represents a single face-set.

Return
true if polymesh face-set splitting is enabled, false otherwise

virtual void fillShaderInputNames(std::vector<std::string> &shaderInputNames, const std::string &shaderName) const

Populate shader input names for a given shader in a shading node. This can be used to validate the shading connections.

Parameters
  • shaderInputNames -

    The populated input names for a given shader.

  • shaderName -

    The name of the shader which will be populated with the input names.

virtual void fillShaderInputTags(std::vector<std::string> &shaderInputTags, const std::string &shaderName, const std::string &inputName) const

Populate shader input tags for a given input on a shader in a shading node. The tags describe what kind of connections are valid when connecting to this input, e.g.:

 shaderInputTags.push_back("float or rgb or rgba or vector or point or point2");

Parameters
  • shaderInputTags -

    The populated input tags for a given input on a shader.

  • shaderName -

    The name of the shader which will be populated with the input tags.

  • inputName -

    The input name on the shader.

virtual void fillShaderOutputNames(std::vector<std::string> &shaderOutputNames, const std::string &shaderName) const

Populate shader output names for a given shader in a shading node. This can be used to validate the shading connections.

Parameters
  • shaderOutputNames -

    The populated output names for a given shader.

  • shaderName -

    The name of the shader which will be populated with the output names.

virtual void fillShaderOutputTags(std::vector<std::string> &shaderOutputTags, const std::string &shaderName, const std::string &outputName) const

Populate shader output tags for a given output on a shader in a shading node. The tags describe what kind of connections are valid when connecting to this output , e.g.:

 shaderOutputTags.push_back("float");

Parameters
  • shaderOutputTags -

    The populated output tags for a given output on a shader.

  • shaderName -

    The name of the shader which will be populated with the output tags.

  • outputName -

    The output name on the shader.

virtual void fillRendererShaderTypeTags(std::vector<std::string> &shaderTypeTags, const std::string &shaderType) const
virtual std::string getRendererCoshaderType() const

Specifies the shader type for coshaders if they are supported.

Return
The co-shader type if applicable. An empty string signifies that co-shaders are not supported.

virtual void buildLiveRenderControlModules(FnAttribute::GroupBuilder &liveRenderControlModules) const

Build custom live render modules for the live render tab.

Parameters
  • liveRenderControlModules -

    Attributes describing the custom live render modules.

virtual bool buildRendererObjectInfo(FnAttribute::GroupBuilder &rendererObjectInfo, const std::string &name, const std::string &type, const FnAttribute::GroupAttribute inputAttr) const = 0

Build the attributes describing the renderer object information which includes e.g. its name, type, locations, and parameters.

See Populating renderer-specific UI parameters for more information.

Return
true if the build process was successful, false otherwise.
See

RendererInfo::RendererInfoBase::configureBasicRenderObjectInfo

RendererInfo::RendererInfoBase::addRenderObjectParam

RendererInfo::RendererInfoBase::fillRendererObjectTypes

Parameters
  • rendererObjectInfo -

    The attributes containing the renderer object information requested by Katana.

  • name -

    The renderer object name selected in the UI (e.g. shader name)

  • type -

    The render object type (e.g. RendererObjectDefinitions::kFnRendererObjectTypeShader)

  • inputAttr -

    Optional input attributes.

virtual void flushCaches()

Flush cached data (e.g. shader information).

std::string getPluginPath() const

Accessor for the path to the Render Plug-in. In most cases this will be a directory named ‘Libs’ within the root path of the plug-in (if you want to access the root path, you can use the function getPluginRootPath instead).

Return
Full path to the directory containing the Render plug-in.

std::string getPluginRootPath() const

Convenience function to access the parent directory of the plugin path (see getPluginPath())

In addition to the ‘Libs’ directory in which the plugin’s DSOs reside, the plugin’s root directory will commonly hold python plugins for Viewer Manipulators, nodes, etc. as well as any settings or shared libraries used by the Render Plug-in.

Return
Full path to the plug-in’s ‘root’ directory.

void setPluginPath(const std::string &pluginPath)
void setPluginRootPath(const std::string &pluginRootPath)
void setKatanaPath(const std::string &katana_path)
std::string getKatanaPath() const
void setTmpPath(const std::string &tmp_path)
std::string getTmpPath() const
FnAttribute::Attribute _getRenderMethods()
FnAttribute::Attribute _getBatchRenderMethod()
FnAttribute::Attribute _getRendererObjectNames(const std::string &type, const std::vector<std::string> &typeTags)
FnAttribute::Attribute _getRendererObjectTypes(const std::string &type)
FnAttribute::Attribute _getRendererShaderTypeTags(const std::string &shaderType)
FnAttribute::Attribute _getRendererCoshaderType()
FnAttribute::Attribute _getRegisteredRendererName()
FnAttribute::Attribute _getRegisteredRendererVersion()
FnAttribute::Attribute _getRendererObjectDefaultType(const std::string &type)
FnAttribute::Attribute _getShaderInputNames(const std::string &shaderName)
FnAttribute::Attribute _getShaderInputTags(const std::string &shaderName, const std::string &inputName)
FnAttribute::Attribute _getShaderOutputNames(const std::string &shaderName)
FnAttribute::Attribute _getShaderOutputTags(const std::string &shaderName, const std::string &outputName)
FnAttribute::Attribute _getRendererObjectInfo(const std::string &name, const std::string &typeTag, const FnAttributeHandle inputData = 0x0)
void _setTypeTagNameFilter(const std::string &filter, const std::string &typeTag)
void _addObjectLocation(const std::string &type, const std::string &location)
void _clearObjectLocations(const std::string &type)
void _flushCaches()
FnAttribute::Attribute _getLiveRenderTerminalOps(const FnAttributeHandle stateArgs)
FnAttribute::Attribute _getRenderTerminalOps(const FnAttributeHandle stateArgs)

Public Static Functions

static void configureBasicRenderObjectInfo(FnAttribute::GroupBuilder &renderObjectInfo, const std::string &type, const std::vector<std::string> &typeTags, const std::string &location, const std::string &fullPath, int outputType, FnAttribute::Attribute containerHints)

A utility function for building render object info. It builds the attribute convention for declaring the properties of render objects such as shaders.

See

RendererInfo::RendererInfoBase::buildRendererObjectInfo

RendererInfo::RendererInfoBase::addRenderObjectParam

Parameters
  • renderObjectInfo -

    The group attribute which defines the render object

  • type -

    The render object type (e.g. RendererObjectDefinitions::kFnRendererObjectTypeShader)

  • typeTags -

    Tags associated with the render object type (e.g. shader type)

  • location -

    The location of the render object if applicable

  • fullPath -

    The full path of the render object

  • outputType -

    The output type if supported, otherwise use kFnRendererObjectValueTypeUnknown

  • containerHints -

    An empty attribute represents no hints, whereas a group attribute containing one or more StringAttribute is interpreted as container hints which can be used to specify help texts for pages, and whether they are hidden or open by default.

Protected Types

typedef std::pair<std::string, int> EnumPair
typedef std::vector<EnumPair> EnumPairVector
typedef std::map<std::string, std::vector<std::string>> ObjectLocationsMap

Protected Functions

void addRenderObjectParam(FnAttribute::GroupBuilder &renderObjectInfo, const std::string &name, int type, int arraySize, FnAttribute::Attribute defaultAttr, FnAttribute::Attribute hintsAttr, const EnumPairVector &enumValues) const

A utility function for adding a parameter to a render object when building the render object info. It builds an attribute which describes parameters (e.g. shader parameters) and their properties such as their type and UI hints.

See

RendererInfo::RendererInfoBase::buildRendererObjectInfo

RendererInfo::RendererInfoBase::configureBasicRenderObjectInfo

Parameters
  • renderObjectInfo -

    The renderer object info which contains the parameter

  • name -

    The parameter name

  • type -

    The parameter type (e.g. RendererObjectDefinitions::kFnRendererObjectValueTypeColor3)

  • arraySize -

    The parameter array size (an array if the size is > 1)

  • defaultAttr -

    The default parameter value stored as a typed attribute

  • hintsAttr -

    UI hints for the parameter Enumerated value pairs for the parameter

void setShaderParameterMapping(FnAttribute::GroupBuilder &renderObjectInfo, const std::string &metaName, const std::string &actualName) const

A utility function that sets a container hint in the given render object info group builder structure to map a shader parameter attribute meta name, such as “material.meta.color”, to a single actual shader parameter attribute name, such as “material.prmanLightParams.lightcolor”.

Attribute meta names are used in the SceneGraphView widget to determine what values to show in the columns of its table.

Parameters
  • renderObjectInfo -

    The renderer object info to modify.

  • metaName -

    The meta name of the attribute to map an actual attribute to.

  • actualName -

    The name of the actual attribute to map the meta attribute to.

void setShaderParameterMapping(FnAttribute::GroupBuilder &renderObjectInfo, const std::string &metaName, const std::vector<std::string> &actualNames) const

A utility function that sets a container hint in the given render object info group builder structure to map a shader parameter attribute meta name, such as “material.meta.color”, to a list of actual shader parameter attribute names, such as “material.prmanLightParams.lightcolor” and “material.prmanLightParams.Color”.

Attribute meta names are used in the SceneGraphView widget to determine what values to show in the columns of its table.

Parameters
  • renderObjectInfo -

    The renderer object info to modify.

  • metaName -

    The meta name of the attribute to map a list of actual attributes to.

  • actualNames -

    A list of names of the actual attributes to map the meta attribute to.

void getTypeTagsUsingNameFilters(const std::string &name, std::set<std::string> &typeTags) const
bool findTypeTagsInObjectTypeTags(const std::vector<std::string> &typeTags, const std::set<std::string> &objectTypeTags) const
const ObjectLocationsMap &getAdditionalObjectLocations() const
const std::vector<std::string> &getAdditionalObjectLocations(const std::string &type) const
class Foundry::Katana::RendererInfo::RenderMethod
#include <RenderMethod.h>

...

Subclassed by Foundry::Katana::RendererInfo::DiskRenderMethod, Foundry::Katana::RendererInfo::LiveRenderMethod, Foundry::Katana::RendererInfo::PreviewRenderMethod

Public Functions

RenderMethod(const std::string &name, const std::string &label)
virtual ~RenderMethod()
virtual std::string getType() const = 0
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const = 0
virtual void setName(const std::string &name)
virtual std::string getName() const
virtual void setLabel(const std::string &label)
virtual std::string getLabel() const
virtual void setCreateCatalogItem(bool createCatalogItem)
virtual bool isCreateCatalogItem() const
virtual void setReportRenderMessages(bool reportRenderMessages)
virtual bool isReportRenderMessages() const
virtual void setRegisterRender(bool registerRender)
virtual bool isRegisterRender() const
virtual void setDebugOutputSupported(bool debugOutputSupported)
virtual bool isDebugOutputSupported() const
virtual void setSceneGraphDebugOutputSupported(bool sceneGraphDebugOutputSupported)
virtual bool isSceneGraphDebugOutputSupported() const
virtual void setDebugOutputFileType(const std::string &debugOutputFileType)
virtual std::string getDebugOutputFileType() const
virtual void setVisible(bool visible)
virtual bool isVisible() const

Protected Attributes

std::string _name
std::string _label
std::string _debugOutputFileType
bool _createCatalogItem
bool _reportRenderMessages
bool _registerRender
bool _debugOutputSupported
bool _sceneGraphDebugOutputSupported
bool _visible
class Foundry::Katana::RendererInfo::DiskRenderMethod
#include <RenderMethod.h>

...

Inherits from Foundry::Katana::RendererInfo::RenderMethod

Public Functions

DiskRenderMethod()
DiskRenderMethod(const std::string &name, const std::string &label)
virtual ~DiskRenderMethod()
virtual std::string getType() const
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
void setAllowWaitingForRenderCompletion(bool allowWaitingForRenderCompletion)
bool isAllowWaitingForRenderCompletion() const

Public Static Attributes

const char *kType
const char *kDefaultLabel
const char *kDefaultName
const char *kBatchName

Protected Attributes

bool _allowWaitingForRenderCompletion
class Foundry::Katana::RendererInfo::PreviewRenderMethod
#include <RenderMethod.h>

...

Inherits from Foundry::Katana::RendererInfo::RenderMethod

Public Functions

PreviewRenderMethod()
PreviewRenderMethod(const std::string &name, const std::string &label, bool allowConcurrentRenders = false)
virtual ~PreviewRenderMethod()
virtual std::string getType() const
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const
void setAllowConcurrentRenders(bool allowConcurrentRenders)
bool isAllowConcurrentRenders() const

Public Static Attributes

const char *kType
const char *kDefaultLabel
const char *kDefaultName

Protected Attributes

bool _allowConcurrentRenders
class Foundry::Katana::RendererInfo::LiveRenderMethod
#include <RenderMethod.h>

...

Inherits from Foundry::Katana::RendererInfo::RenderMethod

Public Functions

LiveRenderMethod()
LiveRenderMethod(const std::string &name, const std::string &label)
virtual ~LiveRenderMethod()
virtual std::string getType() const
virtual void buildAttribute(FnAttribute::GroupBuilder &builder) const

Public Static Attributes

const char *kType
const char *kDefaultLabel
const char *kDefaultName
template <typename TShaderInfoType>
class Foundry::Katana::RendererInfo::ShaderInfoCache
#include <ShaderInfoCache.h>

Caches a map of shader names and attributes for quick access by Renderer Info Plug-ins.

Public Types

typedef std::map<std::string, TShaderInfoType>::const_iterator Iterator

Public Functions

bool isEmpty() const

Queries whether the cache is empty.

Return
True if empty, false otherwise.

void flush()

Flush the cache, removing all data from it.

void addShaderInfo(const std::string &shaderName, const TShaderInfoType &shaderInfo)

Adds information about a single shader to the cache.

Parameters
  • shaderName -

    A string representing the unique name of the shader.

  • shaderInfo -

    A group attribute holding information pertaining to the shader.

const TShaderInfoType &getShaderInfo(const std::string &shaderName) const

Allows access to information about a shader.

Return
If information about the named shader was previously cached, that info is returned. Otherwise, an empty Group Attribute.
Parameters
  • shaderName -

    Unique name of the shader to retreive information for.

ShaderInfoCache<TShaderInfoType>::Iterator begin() const

Gets a const iterator to the first Shader’s information stored in the cache.

Return
Const iterator to first Shader’s information cache entry.

ShaderInfoCache<TShaderInfoType>::Iterator end() const

Gets a const iterator to the end of the cache.

Return
Const iterator to the end of the cache.

void setNullValue(const TShaderInfoType &nullValue)

Sets the null value, which is returned if a cache item is empty or unavailable.

Parameters
  • nullValue -

    The null value.

class Foundry::Katana::RenderOutputUtils::CameraInfo
#include <CameraInfo.h>

CameraInfo.

Public Functions

CameraInfo(CameraInfoHandle handle)
~CameraInfo()
CameraInfo(const CameraInfo &rhs)
CameraInfo &operator=(const CameraInfo &rhs)
bool isValid() const

isValid

float getFov() const

getFov

float getNear() const

getNear

float getFar() const

getFar

float getLeft() const

getLeft

float getRight() const

getRight

float getTop() const

getTop

float getBottom() const

getBottom

int getOrtho() const

getOrtho

float getOrthoWidth() const

getOrthoWidth

double *getXForm() const

getXForm

Protected Functions

void acceptHandle(const CameraInfo &rhs)
struct Foundry::Katana::RenderOutputUtils::ProceduralOutputContextInfo
#include <FnRenderOutputUtils.h>

ProceduralOutputContextInfo

Public Functions

ProceduralOutputContextInfo()

Public Members

int _frameNumber
float _shutterOpen
float _shutterClose
float _cropWindowXMin
float _cropWindowXMax
float _cropWindowYMin
float _cropWindowYMax
int _xres
int _yres
struct Foundry::Katana::RenderOutputUtils::Transform
#include <FnRenderOutputUtils.h>

Transform

Public Members

TransformList transformList
std::vector<float> sampleTimes
class Foundry::Katana::RenderOutputUtils::ShadingNodeConnectionDescription
#include <ShadingNodeConnectionDescription.h>

ShadingNodeConnectionDescription.

Public Functions

ShadingNodeConnectionDescription(ShadingNodeConnectionDescriptionHandle handle)
~ShadingNodeConnectionDescription()
ShadingNodeConnectionDescription(const ShadingNodeConnectionDescription &rhs)
ShadingNodeConnectionDescription &operator=(const ShadingNodeConnectionDescription &rhs)
bool isValid() const

isValid

std::string getName() const

getName

std::string getConnectedNodeName() const

getConnectedNodeName

std::string getConnectedPortName() const

getConnectedPortName

Protected Functions

void acceptHandle(const ShadingNodeConnectionDescription &rhs)
class Foundry::Katana::RenderOutputUtils::ShadingNodeDescription
#include <ShadingNodeDescription.h>

ShadingNodeDescription.

Public Functions

ShadingNodeDescription(ShadingNodeDescriptionHandle handle)
~ShadingNodeDescription()
ShadingNodeDescription(const ShadingNodeDescription &rhs)
ShadingNodeDescription &operator=(const ShadingNodeDescription &rhs)
bool isValid() const

isValid

std::string getName() const

getName

std::string getType() const

getType

unsigned int getNumberOfParameterNames() const

getNumberOfParameterNames

std::string getParameterName(unsigned int index) const

getParameterName

FnAttribute::Attribute getParameter(const std::string &name) const

getParameter

unsigned int getNumberOfConnectionNames() const

getNumberOfConnectionNames

std::string getConnectionName(unsigned int index) const

getConnectionName

ShadingNodeConnectionDescription getConnection(const std::string &name) const

getConnection

Protected Functions

void acceptHandle(const ShadingNodeDescription &rhs)
class Foundry::Katana::RenderOutputUtils::ShadingNodeDescriptionMap
#include <ShadingNodeDescriptionMap.h>

ShadingNodeDescriptionMap.

Public Functions

ShadingNodeDescriptionMap(FnAttribute::GroupAttribute materialAttr)

ShadingNodeDescriptionMap

ShadingNodeDescriptionMap(FnScenegraphIterator sgIterator)

ShadingNodeDescriptionMap

~ShadingNodeDescriptionMap()
bool isValid() const

isValid

ShadingNodeDescription getShadingNodeDescriptionByName(const std::string &name) const

getShadingNodeDescriptionByName

class Foundry::Katana::RenderOutputUtils::XFormMatrix
#include <XFormMatrix.h>

...

Public Functions

XFormMatrix(const double *values)

XFormMatrix

XFormMatrix(const XFormMatrix &matrix)

XFormMatrix

const double *getValues() const

getValues

bool invert()

invert