FramebufferWriter Mental Ray shader
The FramebufferWriter material shader writes the connected shaders' data into separate user framebuffers. This lets you render any number of different shaders on a geometry and store the result in different images that can be used for compositing purposes.
Render Color: The shader that is to be displayed in
the primary framebuffer (rendered image).
New connection: By middle-mouse dragging a shader here
you can easily create a new buffer connection. (Requires pressing the
Refresh button to update the UI after a connection is made.) You can simply
create connections using the connection editor too, by connecting a shader's
output into an empty framebuffers[n].fbColor slot.
Sort framebuffers by FB number: Reorders the already connected framebuffers to match the order of the FB numbers set. The order of the connection does not matter at all, this function is only for aesthetic reasons.
Refresh: Rebuilds the UI to display the new framebuffer connections.
- Copy DSO file into "alias/maya/mentalray/lib" (DLL for Windows
/ SO for linux and OSX)
- Modify "alias/maya/mentalray/maya.rayrc" with the two following
lines, both of them comes
Attach a FramebufferWriter material to the geometry whose information you'd like to put into separate framebuffers. It is likely that you'll need a FramebufferWriter shader for every material in your scene. Connect your existing material to the Render Color of the shader and the extra shaders to the buffer slots and set the FB numbers. Finally enable the buffers either by using custom text or by a FramebufferWriter/ctrl_buffers shader. (The data is only saved into an image if the buffer is initialized.)