mtorba¶
Maya to Rumba export tools¶
This project provides scripts, Rumba nodes and Rumba plug-ins to export rigs from Autodesk Maya to the Rumba animation software.
MTORBA is supported by Mercenaries Engineering.
Of course, MTORBA doesn’t support all the Maya nodes. Maya node support is done on-demand, so feel free to ask if the nodes you are using are missing right now.
Compatibility¶
Maya 2017 win64/linux and newer versions.
Installation¶
MTORBA is automatically installed in your Maya version by the Rumba installer.
To install it manually, copy the module/mtorba.mod
file in your Maya/modules
directory edit it, and replace path_to_mtorba
by the path to your Rumba/mtorba/module directory.
Export using mayapy¶
Use the script/export.py
script to export your asset using the mayapy command line. For more details please run :
mayapy mtorba/script/export.py --help
Export from a Maya python script¶
Select the asset root node and run :
import mtorba.exporter
mtorba.exporter.export("my_rumba_file.rumbanode")
This command will export a .rumbanode asset file and a test rumba document which references the asset file.
The rumba document will be named my_rumba_file.rumba
.
To directly export the asset in a rumba document with no reference, use this command :
import mtorba.exporter
mtorba.exporter.export("my_rumba_file.rumba")
Limitations¶
Only a subset of the Maya nodes and attributes are supported. See the list below.
Only a single node can be exported. It should be a transform node with no namespace.
The attributes are exported using the long name only
Only those dynamic plug type are supported : string, integer, enum, float, 2 floats, 3 floats, boolean, matrix, nurbsSurface, nurbsCurve, mesh, compound, array
Only the diffuse color, the transparency and the diffuse texture are exported, an optional file node can be connected in the color shader attribute.
The transform.inheritsTransform attribute can’t be animated
Pimp your asset for Rumba¶
In order for your Maya asset to benefit from the Rumba features, you can do some extra work on it.
The root node¶
All your asset’s geo and rig must be contained in a single Maya Group node. This node is your root node. This Group node will also contain your manipulators group.
The root node of your asset is exported as a Rumba Asset node. The name of this node will be the default name of the asset once referenced in the Rumba document.
Be aware that the root node won’t move in Rumba.
Controllers¶
By default, MTORBA assumes that the Transform objects with a NurbsCurves shape are the rig controllers.
You can change this behavior adding a rumba_controller boolean dynamic attribute on any Transform node. You can use the Set As Controller shelf command to mark the selected transforms.
The controller attributes (scale, rotate, translate, visibility and its dynamic attributes) are exposed in the Assets node and are available for animation in Rumba.
Note that in order to be exposed, an attribute must be Keyable or Displayable, not Hidden and not Locked.
Methodology¶
A node can be emulated with three methods :
rumbanode : A rumba node was created using the Rumba node editor to emulate the Maya node.
plug-in : A C++ Rumba plug-in was written to emulate the Maya node.
custom : During the exportation from Maya, the python script crafts a custom Rumba graph using Rumba’s internal nodes to emulate the Maya node.
Supported Maya nodes :
nodes | status | method | comments |
---|---|---|---|
addDoubleLinear | OK | rumbanode | |
aimConstraint | Partial support | plug-in | enableRestPosition must be True, inverseScale is not supported |
animBlendNodeAdditiveFA | OK | rumbanode | |
animBlendNodeAdditiveRotation | OK | plug-in | |
animCurve | OK | custom | |
angleBetween | OK | plug-in | |
arcLengthDimension | OK | plug-in | |
avgCurves | Partial support | plug-in | No support for normalizeWeights and automaticWeight |
bezierCurve | Partial support | plugin | |
blendColors | OK | rumbanode | |
blendMatrix | OK | rumbanode | |
blendShape | Partial support | plug-in | Support only weight, origin, baseWeights, inputGeomTarget, inputPointsTarget, inputComponentsTarget and targetWeights |
blendTwoAttr | OK | custom | |
blendWeighted | OK | plug-in | |
choice | OK | plug-in | |
clamp | OK | rumbanode | |
closestPointOnSurface | OK | plug-in | |
cluster | Partial support | plug-in | Exported plugs : preMatrix, weightedMatrix, geomMatrix, weightList, relative, bindPreMatrix, matrix |
cMuscleObject | Partial support | plug-in | Minimal support for the "wrap on nurbs surface" trick |
cMuscleRelative | Partial support | plug-in | Minimal support for the "wrap on nurbs surface" trick |
cMuscleSurfAttach | Partial support | plug-in | Only the outTranslate and outRotate outputs are computed |
cMuscleSystem | Partial support | plug-in | Minimal support for the "wrap on nurbs surface" trick |
condition | OK | rumbanode | |
composeMatrix | Partial support | rumbanode | inputQuat and useEulerRotation are not supported |
combinationShape | OK | plug-in | |
curveFromMeshEdge | OK | plug-in | |
curveFromSurfaceIso | Partial support | rumbanode | No support for maxValue, minValue, relative and relativeValue |
curveInfo | Partial support | plug-in | arcLength and controlPoints support |
dagContainer | Partial support | ||
decomposeMatrix | OK | plug-in | |
deformBend | OK | plug-in | No handle display |
deformSquash | OK | plug-in | No handle display |
deformSine | OK | plug-in | No handle display |
deleteComponent | Partial support | plug-in | Support only for faces and edges deletion |
deltaMush | Partial support | plug-in | The scale attribute is not supported |
detachCurve | OK | plug-in | |
distanceBetween | OK | rumbanode | |
distanceDimShape | OK | rumbanode | |
eulerToQuat | OK | plug-in | |
expression | Partial support | plug-in | Everything supported (including "python" calls), excepted : time, frame, print, random functions, matrix, vectors with a size != than 3, deffereddEval. |
fitBspline | Partial support | plug-in | No tolerance support. |
floatCondition | OK | plug-in | |
floatMath | OK | plug-in | |
floatLogic | OK | plug-in | |
follicle | Partial support | rumbanode | Only the outTranslate and the outRotate outputs are exported |
fourByFourMatrix | OK | plugin | |
ffd | Partial support | plugins | No partial geometry support nor frozen geometry |
groupParts | Partial support | ||
ikHandle | Partial support | custom | Support the RPSolver, the SCSolver, the SplineSolver and the ikSpringSolver. |
ikEffector | Partial support | custom | |
inverseMatrix | OK | plug-in | |
joint | Partial support | custom | |
locator | Partial support | rumbanode | |
loft | Partial support | custom | Support the input curves, degree, close, autoReverse, reverseSurfaceNormals, uniform and sectionSpans. |
makeNurbCircle | OK | plug-in | |
makeThreePointCircularArc | OK | plug-in | |
mesh | Partial support | custom | |
motionPath | Partial support | plug-in | No support for bank. Incorrect result if frontAxis == upAxis. |
multDoubleLinear | OK | rumbanode | |
multiplyDivide | OK | rumbanode | |
multMatrix | OK | custom | |
nearestPointOnCurve | OK | plug-in | |
network | Partial support | rumbanode | Export a basic Node |
nonLinear | Partial support | plugin | Support for bend, squash, sine and twist only |
nurbsCurve | Partial support | plugin | |
nurbsSurface | Partial support | custom | |
nurbsTessellate | Partial support | plug-in | support only Quads polygonType, CVs or General format. No useChordHeight nor useChordHeightRatio support. |
objectSet | Partial support | custom | objectSet objects visible in the outliner are exported as Rumba's SelectionSet |
orientConstraint | Partial support | plug-in | enableRestPosition must be True |
pairBlend | OK | plug-in | |
parentConstraint | Partial support | plug-in | enableRestPosition must be True |
pointConstraint | Partial support | plug-in | enableRestPosition must be True |
pointMatrixMult | OK | rumbanode | |
pointOnCurveInfo | OK | Curvature center and radius are wrong if the shape matrix has non-uniform scale. | |
pointOnSurfaceInfo | OK | rumbanode | |
poleVectorConstraint | Partial support | plug-in | enableRestPosition must be True |
polyEdgeToCurve | OK | plug-in | The result curve is smoother than the original one |
polyExtrudeFace | Partial support | plug-in | No curve nor taper support. Approximated in concave corners. Transform attributes are also approximated. |
polyMergeVert | Partial support | plug-in | UV and vertex color are not correctly merged |
polyMoveVertex | Partial support | plug-in | no gain and random support |
polyNormal | Partial support | plug-in | support for the reverse mode only |
polyTweak | OK | plug-in | |
plusMinusAverage | OK | plug-in | |
quatToEuler | OK | plug-in | |
ramp | Partial support | plug-in | noise not supported |
rebuildCurve | Partial support | plug-in | Only keepRange, spans and keepControlPoints supported right now |
rebuildSurface | Partial support | plug-in | Only keepRange, direction, spans, degree and keepControlPoints are supported right now |
remapValue | Partial support | plug-in | The smooth and spline modes are not 100% accurate |
reverse | OK | rumbanode | |
reverseCurve | OK | plug-in | |
revolve | OK | plug-in | |
rotateHelper | OK | plug-in | |
scaleConstraint | Partial support | plug-in | enableRestPosition must be True |
setRange | OK | rumbanode | |
shadingEngine | Partial support | custom | Basic diffuse color support |
shrinkWrap | Partial support | plug-in | Support inputGeometry, envelope, targetGeom, Points, innerGeom, projection, closestIfNoIntersection, offset, reverse, bidirectional, targetInflation. Don't support the "Parallel To Axes" projection mode. |
softMod | Partial support | plug-in | Exported plugs : falloffCurve, falloffInX, falloffInY, falloffInZ, falloffRadius, falloffCenter, preMatrix, weightedMatrix, geomMatrix, weightList, relative, bindPreMatrix. No support for falloffMode Surface. |
skinCluster | Partial support | plug-in | The dual quaternion method is supported, assuming dqsSupportNonRigid is True. Supports normalizeWeights == Post. |
transform | Partial support | custom | The limits "enable" plugs are supposed constant. |
tangentConstraint | Partial support | plug-in | Only the constraintRotate output is supported |
unitConversion | OK | plug-in | |
uvPin | OK | plug-in | |
vectorProduct | OK | plug-in | |
wtAddMatrix | OK | plug-in | |
tweak | OK | plug-in | |
wire | Partial support | plug-in | No support for wireLocator attributes |
wrap | Partial support | plug-in | falloffMode not supported, Volume only. Support only influence from mesh. No smoothness support. |
Additional plug-ins | |||
cvWrap | OK | plug-in | Based on the original source code |
DPK_bcs | OK | support by a proprietary Rumba plug-in | |
radialBlendShape | OK | plug-in | Based on the original source code |
mgear_curveCns | OK | plug-in | Based on the original source code |
mgear_ikfk2Bone | OK | plug-in | Based on the original source code |
mgear_intMatrix | OK | plug-in | Based on the original source code |
mgear_inverseRotOrder | OK | plug-in | Based on the original source code |
mgear_matrixConstraint | OK | plug-in | Based on the original source code |
mgear_mulMatrix | OK | plug-in | Based on the original source code |
mgear_rollSplineKine | OK | plug-in | Based on the original source code |
mgear_slideCurve2 | OK | plug-in | Based on the original source code |
mgear_springNode | OK | plug-in | Based on the original source code |
mgear_squashStretch2 | OK | plug-in | Based on the original source code |
weightDriver | OK | plug-in | Based on the original source code |
Custom nodes¶
If your rig uses custom nodes in Maya, you will have to build a Rumba version of them using the Rumba SDK.
In that case, you will also have to provide an exporter plug-in for MTORBA which declares the node, its inputs and outputs. You have lot of exporter samples in module/python/mtorba/exporters/. Place your exporters in a folder and add path of this folder to the MTORBA_USER_EXPORTERS environment variable. MTORBA will load them automatically.