Difference between revisions of "Modding: Maya Exporter"

From Divinity Engine Wiki
Jump to: navigation, search
(Multi Layer Exporter)
Line 72: Line 72:
  
 
<p>The layer name determines the exported file name:<br />
 
<p>The layer name determines the exported file name:<br />
*{LayerName}.GR2
+
*{LayerName}.lsm
 
*{LayerName}_Phys.bullet</p>
 
*{LayerName}_Phys.bullet</p>
 
<br />
 
<br />

Revision as of 19:25, 6 January 2018

MayaExporter StepByStep.png

The exporter tool window in Maya 2015


Description

The Maya exporter tool lets you export visuals, physics and animations from Maya to the editor (in the required file format). It is a set of scripts to add an extra tab to your Maya window.

For more information on how to install the exporter tool, look here: Maya Setup Guide
Warningred.png These tools are designed for Maya 2015 on Windows.


Components

This article references the image at the top of the page


The Maya exporter tool consists of the following components:

  1. Animation Manager
  2. Multi Layer Exporter
  3. Modify Path
  4. Export Variables Setup
  5. Export Physics Setup


Animation Manager

MayaExporter Animation.png

The animation manager


This script works together with the export tool Multi Layer Exporter to help organize and name your animations for export.
By default the exporter will export the frame range an animation file is saved with and name it the same as the source file,
but with the Animation manager script it’s possible to add data to your file for the Multi Layer Exporter to read.


This is particularly useful for animations that need to be played out in a start, loop, stop sequence such as Knockdown Status or Various skill activation animations.
The animation Manager expects a rig with Dummy_Root as the first bone in the hierarchy. There is support for Root bones named Dummy_*LayerName*


Already present entries are found when selecting the root dummy with the data present.
New entries can be made with the new button on the bottom.


Obsolete entries can be removed with the delete button while the entry is selected.
Double clicking any of the fields of an entry allows to edit the data within the field.


Multi Layer Exporter

MayaExporter MLE.png

The multi layer exporter


The Multi Layer Exporter is the workhorse of this script package.
It is responsible for exporting models, physics and animations to their correct formats.


Most cases will only show the top left hand panel with the layers currently available in the scene.
Layers that shouldn’t be exported can be hidden from this list with the Exclude_ prefix.
A Layer should contain the relevant model and its matching physics.


Physics are expected to have the _Phys suffix
Rig Bones are expected to have _Bone or Bone_ in their name


The layer name determines the exported file name:

  • {LayerName}.lsm
  • {LayerName}_Phys.bullet


The _Base suffix tells the MLE that the layer contains a character rig.
This is particularly useful for exporting models that are supposed to be used in a visual set and need their rig exported separately in one piece.


The Right Hand panel becomes available when the animation checkbox is checked.
When this is checked the MLE will look for a folder in the same location as your currently open maya file with the same name as your currently open maya file.
If it finds such a folder it will list all the maya files available in the folder.
When exporting, animations are put within a folder with the name of the base file.


Alternatively when opening the MLE in a file within a folder with a name similar to one of the maya files neighbouring it MLE will recognize the file as an animation file and show Animation Manager data instead.
These files won’t allow model or physics exports.


The bottom History Panel keeps track of where you have exported already.
The paths created are dependent on the provided data path.
Found mods within the data path and whether or not you have browsed for new paths with the browse button on the botton left.


On start up the MLE searches through the data path for available mods and lists them in the target project dropdown list.
If your currently open maya file is in a path containing the currently selected mod’s name it will copy the structure of your assets in the export path.
If the source doesn’t match up exports are done within the base folder of the mod.


The actual export button is on the bottom left.
The delete and clear all button are for the path history panel.


The visual checkbox enables model export doesn’t include objects with a _Phys suffix in their name.
The Physics checkbox enables physics export when checked alone only objects with a _Phys suffix in their name are exported.
The Animation Checkbox enables animation exporting if you’re working from a base file. Is on by default if the file you are in is recognized as an animation file.


Make sure to have all model pivots centered on 0,0,0 the exporter does not do this for you.


Advanced Export Settings

MayaExporter Advanced.png

The advanced export settings


Edit Export Settings

Allows you to change the granny preset during export.
Most likely you’ll never need this in a mod export.

Single Character Export

Tells the MLE to select the entire rig hierarchy rather than just what is skinned to a model.
This checkbox can be overridden to be always active in a file with the Export Variables Setup Make Single Object button.
This is active by default for a Base Layer export.

Export Vertex Colour

Tells the MLE to include vertex colour in the export of the selected layers.
This overridden with the Export Variable Setup Make Cloth Simmed since cloth simulation requires vertex colours to be present.

Create Debug Log

This checkbox is for when the Express Export variable is off.
It tries to catch any export errors occurring and write them in a debug log which is shows after export.

Express Export

This checkbox is on by default it tells the MLE the export the files in the current maya instance.
Turn this off if you have a large amount of models to export. With this variable off the MLE will use maya standalone batch mode to export models more quickly.
Maya standalone is used by default for exporting Animations from a base file.


Modify Path

MayaExporter Path.png

Data path editor


The Multi Layer Exporter has been specifically modified to use a file hidden within your default maya script path to find the Divinity Engine data path.
The Modify Path script allows you to set up and modify the path saved.
The MLE will throw a warning when this isn’t done before its first launch.



Export Variables Setup

MayaExporter Variables.png

Variable setup window


The Divinity Engine has a few extra functions that can be activated via variables attached to the model data.
The Multi Layer Exporter also reads these variables to ensure everything that needs to be present in the export file is present.


Make Unskinned Animated is to allow objects which are rigidly animated or include dummies that need to be interacted with be fully recognized as such.
Apply this Variable if the object needs effects attached needs to function like a bed or chair or is an object with dummy driven animations like a door.
Works on current selection.


Make Cloth Simmed is specifically for character Models with elements that need cloth sim applied.
The object needs to have vertex colour applied and a variable to indicate it needs to be treated as a simulated object.
Works on current selection.


Make Single Object is specifically for the MLE to override the Single Character Export checkbox and include every bone within a detected rig in the export with every single export.
Works on every dummy root and Dummy_*LayerName* objects it finds within the scene.


Export Physics Setup

MayaExporter Physics.png

Physics variable setup window


The bullet plugin in maya has a few known issues with exporting.
Rather than allowing artists to set up their own bullet variables two export variables have been made to replace them.
With these Variables the MLE will set up the bullet variables so scaling issues can be avoided during physics exports.
Both buttons work on current selection.


Kinematic Physics Mesh is for objects that can be moved during gameplay like barrels or characters.
Static Physics Mesh is for everything else that cannot be moved and serves as such scenery.