Nuke - Components

 

The plug-in set comes with four main components: the mxiReader, the MxiMixer, the MxiRender and the MxiMask.

 

The mxiReader

The mxiReader is an image file reader for Nuke that allows you to load MXI files or sequences into Nuke with full 32 bit color information. Once it’s installed, simply open the MXI file(s) as you do any other files in Nuke.
The MXI reader loads all the channels available in the MXI file as independent Nuke channels:

Nuke channel names can only have alphanumeric characters and underscores, so any other characters (like ":", "!", etc.) will be replaced by underscore characters. Each 3D software has its own naming convention so be careful if you use light names in your scripts.

 

 

 

The mxiReader Read knob has the following controls. These are not interactive, so they can be slow y some cases (specially when SimuLens diffraction and scattering are enabled):

Diffraction and scattering effects are not compatible with Multilight/MxiMixer in Nuke, so better disable it in case you need the Multilight feature in your Nuke project.

 


The MxiMixer

The MxiMixer node allows the user to use the Maxwell Render Multilight feature in Nuke. To load an MxiMixer node in Nuke you have three choices:

  • Press the x key, or go to File > Script Command and type in "MxiMixer". Select TCL and click OK.
  • Go to the Maxwell Nodes menu and select MxiMixer (see Installing the Python scripts).
  • Type CTRL+M (see Installing the Python scripts).This creates a new node in the node graph viewer. Attach the MXI file node output to the MxiMixer node input, and the MxiMixer output to a Viewer node (or any other node you need).

The MxiMixer node allows you to mix up to 32 different lights. You can select the lights you want to mix from the MXI file/sequence, or automatically fill the panel with all the lights in the MXI file by using the “Set Channels” button.

You can adjust the intensity of each light independently, and you can even over-expose the lights. The Global Intensity slider allows you to control all the lights’ intensity at once.
The intensity sliders can also be animated. You can work with either a single MXI or with an MXI sequence.

The range of the intensity sliders depends on the type of light. The correspondence with the intensity values in the Maxwell Render Multilight panel is stright-forward. Each light have its own "Mute" and "Solo" options.

Furthermore, you can load .emixer files. Those files are generated in Maxwell Render when you animate lights over time. Simply open the .emixer file in the “Emixer File” dialog, and click on “Load Emixer”.

To take the most of the Multilight functions feature in Nuke, launch your renders in Maxwell Render using "Intensity Multilight" instead of "Color Multilight". The Color Multilight feature can only be used in Maxwell Render, and produces huge MXI files that would be hard to manage in Nuke.

The MaxwellSimulens

MaxwellSimulens node allows the Nuke user to apply the SimuLens effects available in Maxwell Render to any HDR image in Nuke, including MXIs, EXRs, TIFFs...


The MxiRender

Using the MxiRender node the user can resume a render. Just attach an mxiReader node to a MxiRender node, click on “Get Data from MXI”, check that the fields are correct and click on “Render”. Maxwell Render will then be launched by a command line, resuming your MXI. When the MxiRender node gets the data from the MXI, it puts the target sampling level to the current sampling level + 1 by default. This avoids the risk of resuming a render with a target sampling level less than or equal to the current sampling level.

 

 

 


The MxiMask

This node takes most of the Material ID and Object ID buffers. It allows the user to create masks for any object or material in the scene easily. The MxiMask node panel has the following parameters:

  • Objects/Materials: List of objects/materials of the scene, depending on the ID Source value. Reads the objects/materials list from the MXS indicated below.
  • Read MXS: Reads the MXS File parameter to fill the Objects/Materials list. If MXS File textbox is empty, it tries to find out the source MXS from what the MXI was created.
  • MXS File: Scene from what the MXI was generated.
  • ID Source: Selects between Material and Object ID layers.
  • Invert output: Inverts the generated mask.
  • Threshold: Sets the “hard edge” of the mask. Any value below the threshold will produce a 0 (mask all), and any value above will produce a 1 (mask none).
  • Feather: Sets the “soft edge” of the mask. It will produce values between 0.0 and 1.0 for any value of the image below the threshold.
  • Gradient: Sets the way the “soft edge” is attenuated between 0.0 and 1.0. It is a pow function of the mask value.

Using the "Reload Selected/All" scripts

The scripts available in the Maxwell Utilities menu allow the user to reload all/selected file nodes. The advantage of this is that the metadata of the nodes are reloaded too, so when you are using the constant refinement feature you will be sure that you have your MXIs fully updated in Nuke.
Note that these scripts are only needed when you use the metadata of the MXIs (the mxiReader metadata is used in the MxiRender node, for example, or in any script you made) and you need these values updated.

Using the "Color Adjustments" script

The Maxwell Color Adjustments script is available through the Maxwell Nodes menu, or typing the ALT+M shortcut. The script attaches as many HueShift nodes as the MXI file lights have to the MXI file node, and an MxiMixer node to mix the lights. The goal of the script is to mimic (not faithfully recreate) the Maxwell Render Color MultiLight feature.

Note that the MXI doesn’t need to be rendered with the Color MultiLight option enabled, only with the classic Intensity MultiLight on.

 

Each HueShift node controls one light channel, so you can shift the colors of each light independently. The second goal of this script is to provide an example of how you can access the MXI node meta-data and use it to make your own scripts easily. Keep in mind that this Color Adjustment script is an accessory and is just an example, so you could use any other color correction tools you might prefer to adjust the intensity and color of each emitter light.

 

Important Note

As Nuke cannot manage all the spectral information from Maxwell Render images that MultiLight can, these Color Adjustment nodes can only mimic the high precision spectral changes that Maxwell Render performs, so this poses some limitations. These Color Adjustment nodes performs a hue-saturation shift, so it is not possible to change the color of a pure white emitter (and in general with pure white, grey or black pure desaturated emitters).