The RmanConnect project is a RenderMan Interface-compatible display driver and Nuke plugin for direct rendering into the Nuke interface.
RenderMan® is a registered trademark of Pixar.
Nuke® is a registered trademark of The Foundry.
RmanConnect is based on a simple Client/Server model, suitable for rendering to/from a variety of applications. The classes are described here. The TCP/IP interface code is handled using the Boost.Asio library. The display driver will theoretically build using any RenderMan-compatible renderer but the included CMake build script assumes you have 3Delight or PRMan installed.
The display driver works just like any other, but has two additional parameters: hostname and port. Using these you can control which host and socket the display is rendered to.
You should refer to your renderer's documentation for setting up the display driver but it is normally as simple as putting something akin to the following in your rendermn.ini configuration.
It's important that you always render images as 32-bit floating-point (i.e. the quantize settings are all zero).
Here is an example of a rib snippet which renders the primary display to port 9201 on localhost.
# Render beauty to port 9201 Display "rgba" "RmanConnect" "rgba" "int quantize" [ 0 0 0 0 ] "string filter" [ "gaussian" ] "float filterwidth" [ 2 2 ] "string hostname" [ "localhost" ] "integer port" [ 9201 ]
You can render multiple displays to different hosts/ports at the same time.
# Render the __Pworld AOV to port 9202 Display "+Pworld" "RmanConnect" "point __Pworld" "int quantize" [ 0 0 0 0 ] "string filter" [ "gaussian" ] "float filterwidth" [ 2 2 ] "string hostname" [ "localhost" ] "integer port" [ 9202 ] # Render the __Nworld AOV to port 9203 Display "+Nworld" "RmanConnect" "point __Nworld" "int quantize" [ 0 0 0 0 ] "string filter" [ "gaussian" ] "float filterwidth" [ 2 2 ] "string hostname" [ "localhost" ] "integer port" [ 9203 ]
The nuke plugin defines a node called RmanConnect. Once it's built you just need to ensure it's somewhere on your NUKE_PATH.
The node has two knobs: a format knob, and a port knob. The format sets the output buffer size for the node. If an incoming image is a different size to the buffer then it will be padded with black or cropped. The port knob sets the TCP port address that the node will listen for connections on.
By default port is set to 9201 and if a node cannot connect then it will report an error. Change the port value will disconnect the server and reconnect it to the new port. All instances of the RmanConnect node will need unique port addresses.