RSS< Twitter< etc

XMesh Saver for Maya - User Interface

Introduction

The XMesh Saver is a scripted dialog building upon the XMesh Saver Plugin's functions for saving geometry to XMesh file sequences.

While this User Interface is fully functional and can be employed by both individuals and studios, some larger facilities might elect to reimplement the saving part of XMesh to integrate even deeper with their existing pipelines. For them, the source code of the XMesh Saver found in several Python files under the \Scripts folder of the XMesh MY installation could be used as an implementation guide.

The following page describes the controls and functionality of the shipping XMesh Saver User Interface.

Objects To Save panel

This panel contains the controls for specifying the geometry objects to be cached to disk. This panel cannot be rolled up (collapsed) and will always remain visible.

Objects To Save List 

  • This list will display the geometry objects scheduled for saving.
  • The list will be populated automatically with any supported geometry objects when the XMesh Saver icon is clicked. 
  • To add objects to the list after it has been opened, select them in the scene and press the ADD Selected Objects To List button; to remove objects, use the REMOVE Highlighted Items From List button (see below). 

ADD Selected Objects To List 

  • Pressing this button will add to the Objects To Save list any selected in the scene objects that can be handled by XMesh and are not on the list yet.
  • Objects that are not supported by XMesh like Cameras, Lights, Nulls etc. will be filtered out automatically.
  • In other words, to add all supported geometry objects from the scene to the XMesh Saver's Objects To Save list, you can perform SHIFT+CTRL+A (Select All), then press the Add Selected Objects To List button. 

REMOVE Highlighted Items From List 

  • Pressing this button will remove the highlighted items from the list.
  • If no items are highlighted, the button will be disabled.
  • You can use CTRL+Click and SHIFT+Click to add individual items or blocks of items to the highlighted selection and remove multiple items at once.
  • You can also right-click in the Objects to Save list to access a pop up menu with the options
    • Highlight All - highlights all items on the list
    • Highlight None - reset the highlight so that no items are highlighted
    • Highlight Inverse - invert the highlighted items to become not highlighted, and vice-versa.

Output Path panel

The Output Path panel contains all controls related to the XMesh Saving Mode (combining objects in world space, saving individual objects in world or object space), and well as XMesh file sequence naming. 

XMesh Saving Mode drop-down list

This list provides the following options:

Save ALL Objects As ONE MESH In WORLD SPACE Coordinates 

  • Selecting this mode will switch the Output Path panel to a slight purple shade.
  • In this mode, all geometry objects listed on the Objects To Save list will be combined into a single XMesh cache, while preserving their animation, per-vertex and per-face data like material assignments. 
  • All objects will be saved in World Space, which means that in order to load them back using an XMesh Loader, all you have to do is place the Loader at the World Origin (0,0,0) with zero rotation and unit scaling, and all geometry will align to the source meshes perfectly.
  • Combining several objects into one larger cache can result in orders of magnitude better performance since most 3D DCC applications handle single high-polygon count objects easier than hundreds or thousands of small ones.
  • This mode is the default saving mode of XMesh and gives it the biggest advantage over alternative solutions like Alembic where every object requires a separate scene loader to be read back from disk.

Save EACH Object To INDIVIDUAL MESH In WORLD SPACE Coordinates 

  • Selecting this mode will switch the Output Path panel to a slight cyan shade.
  • In this mode, each entity on the Objects To Save list will be saved to its own independent XMesh sequence, but the vertex data will be in World Space, allowing every object to be positioned at the right location easily by placing the XMesh Loader at the World Origin with zero rotation and unit scaling.
  • An additional option Make Subfolder For Each Object will also become available to create sub-folders for each XMesh sequence.
  • This mode is useful when the XMesh cache is intended for use for rendering only and no object-space transformations are necessary.
  • The XMesh Loaders can still be transformed to change scale, orientation or translation from the origin if needed, but World Space caches are not suitable for complex animation rigging as the mesh origin can be offest significantly and would require difficult pivot realignments. 

Save EACH Object To INDIVIDUAL MESH In Object SPACE Coordinates 

  • Selecting this mode will switch the Output Path panel to a slight green shade.
  • In this mode, each entry on the Objects To Save list will be saved to its own independent XMesh sequence and the vertex data will be in local Object Space.
  • This means that each XMesh Loader must be positioned using the same Transforms as the Source Mesh to align correctly to it. 
  • This mode is useful when caching the local deformations of a mesh while intending to rig the transformations using the XMesh Loaders.
  • You could reuse the Transformations of the existing sources, parent the XMesh Loaders to an existing rig of Nulls, or create a completely new rig from the XMesh Loaders.
  • An additional option Make Subfolder For Each Object will also become available to create sub-folders for each XMesh sequence

Make Subfolder For Each Object checkbox 

  • This option is unchecked by default and only available when the XMesh Saving Mode is set to one of the INDIVIDUAL MESHES options described above.
  • When checked, each XMesh file sequence will be saved to a sub-folder of the specified output path.
  • When unchecked, all XMesh file sequences will be saved to the same folder specified by the output path. 

Base Path text field and Folder icon 

  • The Base Path specifies the root of the file sequence name.
  • You can enter the path by typing or pasting a path into the field, or by clicking the Folder icon to the right and selecting a Directory using the File Browser.

Name text field 

  • This text field specifies the sequence name.
  • The default value is SEQ, but it can be changed to any descriptive name that will be used as a sub-folder below the Base Path, and in the case of saving multiple objects as one cache, as the name of the file sequence. 

Revision text field 

  • This text field specifies the version number of the sequence.
  • A sub-folder will be created with this value below the Name sub-folder, allowing several iterations of the same named sequence to be saved out in multiple sessions. 

Final Output Path text field 

  • This text field is read-only, but can be copied from.
  • It provides a symbolical preview representation of the output path to be used for the current sequence based on all other settings described above.
  • The following symbols may be used in the path:
    • $(Base Path) - represents the Base Path entered in the Base Path field.
    • $(obj) - represents the current object name when saving indivual meshes to separate XMesh sequences.
  • The Name and Version parts of the path will be shown verbatim in full. 

NOTE: When the Output Path panel is rolled up, the panel title will list the Final Output Path value for fast reference!

Frames To Save panel

This panel defines the frame range to be cached to disk, as well as the number of samples per frame to be saved.

Set To Range buttons 

  • These convenience buttons let you set the Start Frame and End Frame values defining the range to be saved based on existing Maya time settings:
    • Animation Range button - sets the Frames to the range defined in the Maya timeline.
    • Playback Range button - sets the Frames to the range defined by the playback range of Maya (a subset of the Animation Range)
    • Render Range button - sets the Frames to the range defined in the Render Settings dialog of Maya.
    • Current Frame button - sets both the Start and End Frames to the current value of the Maya Time Slider. Useful for quickly saving a single frame only. 

Start Frame and End Frame value fields 

  • These values define the first and last frames to be saved to disk.
  • You can use the convenience buttons described above to set the range to an existing Maya range, or enter the first and last frame numbers manually. 

Samples Per Frame drop-down list 

  • This drop-down list defines the number of samples to be saved for each frame.
  • By default, the value of 1 means that only one sample will be taken per frame.
  • Setting the selection to 2 will produce one sample at full frames and another sample at half frame interval between two full frames, and so on.
  • Obvisously, higher values will require more disk space for the resulting file sequence. 

NOTE: When the Frames To Save panel is rolled up, the panel title will show the [Start Frame..End Frame] range for quick reference! 

Channels To Save panel

This panel contains checkboxes for the supported geometry channels that can be saved by XMesh. Each channel can be checked to be included in the cache, but it will only be saved if it actually exists in the source geometry. The standard channels like vertex positions or polygon definitions are always included and cannot be toggled off.

The first column of checkboxes defines the channels to be saved by the main XMesh sequence.

The second column of checkboxes defines the channels to be saved by the Proxy XMesh sequence.

The two sets of channels can be completely difference, for example you might want to exclude Velocity, Smoothing, Mapping or Material assignments from the Proxy sequence to save disk space and increase performance while including them in the main (render) sequence.

The following channels are currently supported by XMesh for Maya:

Velocity 

  • The Velocity channel describes the speed of the vertex at the time the XMesh sample was taken. 
  • It will be calculated by taking a second sample of the mesh at half distance to the next sample and checking for consistent topology. If the vertex count has not changed, the Velocity will be calculated from these two samples. If the topology has changed, another sample will be taken at half the previous time step and this will continue until a valid consistent topology was found, or a time threshold was reached at which point the Velocity will be assumed zero due to incompatible topology on any sample.
  • Saving the Velocity channel is useful in several cases:
    • When you know the topology is not changing and you want to pre-calculate the Velocity with the sequence to avoid the necessity to read two samples and Interpolate the velocity at loading time.
    • When the object produces consistent topology only within small intervals, but you don't want to save too many samples. For example, Thinkbox Frost particle mesher can produce consistent topology within half-frame interval before and after the current frame to satisfy the motion blur requirements of renderers like mental ray and V-Ray, but attempting to interpolate from two saved frames would fail because the topology would be changing between them.
    • When the object being saved provides its own explicit velocity (this is the case with Cebas Thinking Particles in 3ds Max - each particle mesh reports its vertex velocities, allowing XMesh to save them without performing any calculations). 
  • Saving the Velocity channel makes little sense when you know that the topology is inconsistent on every sample and attempting to calculate a Velocity would fail. Disabling the Velocity channel option would speed up the caching process significantly in this case! 

Edge Smoothing 

  • XMesh MY supports seamless conversion between Maya's Edge Smoothing information and 3ds Max Per-Face Smoothing Groups data. 
  • Enabling this option will save 3ds Max-compatible data that can be read back as Edge Smoothing data in Maya.
  • This approach is meant as an alternative to saving explicit Normals, because explicit Normals are not deformable by most deformers in most 3D DCC applications. Having native smoothing information on the loaded XMesh object means it can be processed as a regular geometry object without annoying side effects.
  • If a Normal channel is specified to be saved with the sequence, it will OVERRIDE the Smoothing channel! Thus, you should elect to save only one of the two to avoid wasting disk space. 

Normal 

  • The Normal channel describes the actual vertex orientation calculated by the host application.
  • It is a more explicit way of storing the smoothing of meshes and is typically employed by other geometry exchange solutions like FBX, causing a lot of grief at facilities trying to move data between Maya and 3ds Max.
  • If the XMesh cache is intended for rendering only, saving the Normal might be the better way to go as it is faster to load and apply to the geometry than converting Smoothing Groups to Edge Smoothing and vice-versa.
  • If you intend to continue modeling over the imported XMesh model in the other application, saving Smoothing data instead of Normals is the better way to go.
  • If both the Normal and the Edge Smoothing options are checked for saving, both will be saved, but the XMesh Loader will currently use the Normal information if both are found. 

color

 

  • If the color channel is checked for saving, a Color channel may be saved to the XMesh sequence.
  • If the Save Current Color Set as color is checked, the current Color Set will be saved as the color channel regardless of its actual name.
  • If the Save Current Color Set as color is not checked, and there is a Color Set called "color", it will be saved as Color.
  • If the above conditions are not met, no Color channel will be saved.
  • If the Proxy checkbox is checked, and a Proxy sequence is requested, it will also include the color set if the above conditions are met.
  • The Color channel corresponds to and will be loaded as Mapping Channel 0 in 3ds Max.

 

map1 

  • If the map1 channel is checked for saving, a TextureCoord channel may be saved to the XMesh sequence. 
  • If the Save Current UV Set as map1 checkbox is checked, the current UV Set will be saved as the mapping channel regardless of its actual name.
  • If the Save Current UV Set as map1 checkbox is not checked, and there is a UV Set called "map1", it will be saved as TextureCoord.
  • If the above two conditions are not met, no TextureCoord channel will be saved.
  • If the Proxy checkbox is checked, and a Proxy sequence is requested, it will also include the texture coordinates if the above conditions are met.
  • Note that Maya UV Sets have only two components, while 3ds Max mapping channels are generally UVW (three components).

map2..map99

  • Since 3ds Max supports an explicit number of 100 mapping channels, this option allows you to preserve them on a round trip from 3ds Max to Maya and back.
  • For a non-current UV Set to be saved as a valid 3ds Max Mapping Channel, its name should be set to "mapX" where X is between 1 and 99. Such UV Sets will be exported from Maya and will appear as 3ds Max TextureCoord (map1) and Mapping Channel 2 to 99 for map2 to map 99.

MaterialID

  • When checked, the material assignments (Shading Groups) will be converted to 3ds Max-compatible per-face Material IDs.
  • An additional text file describing the correspondence between Material IDs and material names will be saved, allowing the recreation of Materials in 3ds Max and Shading Group assignments in Maya.

Proxy Settings panel

This panel contains settings controlling the saving of an additional Proxy sequence to be used for viewport display or alternative lower-resolution rendering sequence in the XMesh Loader.

Save Proxy Sequence checkbox

  • Unchecked by default.
  • When checked, a Proxy sequence will be generated after saving the main sequence.
  • The Proxy sequence will save the additional channels as specified in the Channels To Save panel, Proxy column of checkboxes.

Optimization Mode drop-down list 

  • Default setting is Reduce which reduces the vertex count according to the parameters Percent and Min Verts (see below).
  • The other option is Original which does not change the topology of the source meshes. It allows you to produce a Proxy sequence with the same topology as the main sequence, but potentially with a different set of channels and/or sampling settings. 

Percent value field 

  • This value defaults to 10.0%
  • It controls the vertex reduction percentage when the Optimization Mode drop-down list is set to Reduce.
  • The actual percentage might be overridden by the Min Verts value described below to avoid the reduction of low-resolution meshes beyond any recognition. 

Min Verts value field 

  • This field defaults to 1000
  • This is the minimum number of vertices in a reduced proxy mesh.
  • When decimating multiple meshes with different vertex and polygon counts, you can use this value to prevent the lower resolution meshes to be overly optimized while attempting to reduce the vertex count of high-resolution ones. 
  • For example, at 1% reduction a mesh with 1 million vertices will be reduced to 10,000 vertices, a mesh with 10,000 vertices would attempt to reduce to 100 vertices but a Min Value of 1000 will stop it at 1000, and a mesh with 500 vertices will not be decimated at all because it is already under the threshold. 

Use Proxy Sampling checkbox 

  • Unchecked by default.
  • When inchecked, the Proxy sequence will use the same sampling settings as the main Render sequence specified in the Frames To Save panel.
  • When checked, the Proxy sequence will use the sampling specified by the Proxy Sampling drop-down list (see below) 

Proxy Sampling drop-down list 

  • Provides an alternative Sampling value for the Proxy sequence saving only.
  • This lets you use a higher Sampling value for the Render sequence while using a much more coarse sampling for the Proxy sequence to preserve disk space. 

NOTE: When the Proxy Settings panel is collapsed after changing its settings, the panel title will display an overview of the current settings.

Advanced Settings panel

Save Visible Objects Only checkbox 

  • This option is unchecked by default.
  • When unchecked, all objects listed in the Objects To Save list will be cached to disk.
  • When checked, only objects that are visible in the viewports will be cached. 

Logging Level drop-down list 

  • This drop-down list controls the verbosity of the XMesh logging during saving.
  • All messages will be logged in the Maya console.
  • Possible levels are 
    • Nothing - no messages will be logged
    • Errors - only errors will be logged
    • Warnings - both errors and warning message will be logged
    • Progress -  errors, warnings and progress messages will be logged. Progress messages typically look like PRG: Saving frame 1
    • Stats - errors, warnings, progress messages and statistics will be logged. Statistics provide information about the timing of the various XMesh functions.
    • Debug - log everything, including debug messages meant mainly for developers. 

Submit To Deadline panel

Job Name text field and [<] button 

  • This field provides the Deadline Job name
  • Press the [<] button to set the Job Name to the current Maya scene name 

Comment text field 

  • This field provides space for a custom user comment. 
  • Default text is "XMesh for Maya". 

Department text field 

  • This is an optional Deadline field which helps sort jobs submitted from the same department, e.g. "LnR", "Modeling", "Animation", "Effects", "TD" etc.
  • You can leave it blank if you don't want to sort / filter by department. 

Pool drop-down list 

  • This drop-down list shows all currently available Deadline Pools.
  • Select the Pool of machines to submit the job to, or leave as "none" to allow any machine in any pool that has no other job to pick this job. 

Group drop-down list 

  • This drop-down list shows all currently defined Deadline Groups.
  • Select a group name to limit the machines that can process your XMesh saving job to the ones assigned to the specified group, or leave it as "none" to allow any machine from the specified pools to pick up the job.
  • Typically, Groups are used to combine machines with similar hardware or software characteristics, for example you could have a "Maya" Group containing all network machines that have Maya installed, a Group called "64GB" containing all machines with 64 GB of RAM and so on. One machine can be member of several groups. 
  • If two or more groups are specified, the machine must be in all groups (e.g. "Maya", "64GB" would be a machine that has both Maya installed and has enough memory for a large job). 

Priority value field and slider 

  • The numeric priority controls when a job will be processed when two or more jobs are in the same Pool.
  • The value can be  between 0 and 100, with 100 being the highest priority. 

Limits field and button 

  • This field can be used to provide the list of Limits to be applied to the job.
  • Click on the [...] button to open Deadline's native Limit dialog and select from it. 

Machine List field and Backlist/Whitelist radiobuttons 

  • This field can be used to provide the list of Machines to be whitelisted or blacklisted for the job.
  • Click on the [...] button to open Deadline's native Machine List dialog and select from it.
  • The meaning of the list can be set using the radio buttons beneath it.
    • The default is "Whitelist", which will allow only the listed machines to process the job.
    • Selecting "Blacklist" will prevent the listed machines from processing the job. 

Submit Maya Scene File checkbox 

  • This option is unchecked by default.
  • When unchecked, the Maya scene will not be sent with the job, its path will be passed to the job and the scene will be opened from its original location. It must be in a network location accessible to the Deadline Slaves.
  • When checked, a copy of the Maya scene will be sent with the job, making it independent from the original scene being submitted. 

Submit Suspended checkbox 

  • This option is unckeced by default.
  • When unchecked, the job can be processed immediately after submission.
  • When checked, the job will be set to Suspended state and must be unsuspended manually via the Deadline Monitor before it can be picked by Deadline Slaves.  

SUBMIT TO DEADLINE button  

  •  Pressing this button will submit the XMesh Saver job to Deadline using the above settings. 

SAVE MESH SEQUENCE TO DISK button 

  • Pressing this button will save the specified XMesh sequence on the local workstation according to the settings described above, except for the Submit To Deadline panel which only affects network processing. 

Close button  

  • Pressing this button will close the XMesh Saver dialog.
  • It is equivalent to clicking the Close Window icon (which may vary depending on your OS).