Maya - External Scene References

It is possible to reference external scenes in MXS or Alembic (ABC) format and have Maxwell load them at render time. This is useful in many scenarios, such as:

  • creating a library of ready-to-render props complete with materials which you just reference into new scenes
  • shortening export times in an animation by referencing the static objects and only exporting the animated parts at each frame
  • reducing scene complexity and improving viewport performance by referencing heavy objects

To reference an external file, click the  button in the Maxwell shelf. You will be prompted to select a MXS or ABC file and the plug-in will create a maxwellReferencedMXS node which points to it. The node has only a few parameters:

  • File: the path to the referenced scene file.
  • Use Sequence: when this is enabled, the current frame number (padded to 5 digits) is inserted before the file extension prior to loading the scene, e.g. scene.mxs becomes scene.00001.mxs. If a frame number is already present before the extension, it is replaced.
  • Display LOD: controls how many vertices to load and display in the viewport. The referenced objects are shown as point clouds, just like instances, to keep the viewport performance inside reasonable limits when heavy scenes are used.
  • Time: determines the frame to load in sequence mode. When the node is created, this attribute is connected to Maya's default time source, but the connection can be changed if the time of the node needs to be decoupled from the current frame.
  • Render Flags: you can control how the hiding flags are handled for the referenced objects. Each flag has 3 possible states:
    • Inherit: uses the flags saved for each object inside the referenced file.
    • On: turn on the flag for all the objects contained in the MXS, regardless of the settings saved in the referenced file.
    • Off: turn off the flag for all the objects.
  • Override Materials: set per object material overrides for this MXS instance

Maxwell uses the geometry and materials found in the MXS file. It does not load environment settings, camera parameters or render options. By default, the objects use the materials they have in the referenced scene. It is not possible to use only a subset of the referenced scene; all the objects will always be used.

You can create a MXS file ready to be referenced by selecting the objects you need and hitting the  shelf button. You will be presented with the following options dialog:

The Animated flag and Start / End Frame fields can be used to export a sequence of files, if the objects are animated. The camera fields instruct the plug-in to also export a camera in the MXS file. The camera is not used by Maxwell when the scene is referenced, but it can be used by an external tool or script, e.g. to generate thumbnails of the MXS files.

You can reference MXS scenes from any other sources, including those files written by the plug-in if persistent MXS is on, or when the File -> Export menu is used. This button is only provided as a shortcut for the Export Selection functionality and skips writing irrelevant information in the resulting file, such as render options and environment settings.