I've done a lot of exporting. I use slightly earlier versions of Maya
and Softimage for maximum animator compatibility, so maybe this is
easier with later versions of Softimage/Maya. It takes me DAYS to
transfer everything perfectly for our AnimSchool rigs. And it sort of
works -- for the important parts. The envelope and shapes. They come
over exactly matching. But you have to do it in bits and pieces. Don't
expect the control rig to carry over effortlessly. You have to recreate
IK chains.
Jack Kao has done some of this too for AnimSchool and might have better
workflows.
I purposely use things in Softimage I know I can transfer/recreate
easily in Maya.
My workflow is to use .xsi for the heirarchy. You'll need to recreate
the control rig using those parts.
For the envelope, sometimes it only works by isolating the envelope and
exporting JUST the object and the deformers ONLY in a flattened
heirarchy. I'm not sure why that is. Select the envelope/s, then select
all the deformers (Select Deformer from Envelope). Unparent all those.
Group them all under a new transform group. So they are all flattened.
Export that via .xsi
CrossWalk>Export to Maya.
Use .xsi 5.0 binary. Everyting else seems to crash.
Import into a fresh Maya scene.
Save the weights using Comet's Save Weights.
Get a list of the deformers
Open up your main Maya rig file and import the weights.
For the shapes, the .xsi will include shapes, but I delete them because
they are not connected to objects.
So I use this tool for exporting all the shapes as separate objects.
(attached)
Turn off/down your undo before using this tool. It will eat all the
memory otherwise.
Select the shapes in the explorer you want to export, then
Shape>CopySelectedShapeKeyInNewModel
It creates a ton of objects. Export them to Maya and make them all
blendshapes to the object.
Once everything is up and working in Maya, I can make edits in
Softimage, and just export positions for matching or new shapes/envelope
weights.
I use a script for making the maya scene (all selected objects) match
all the positions from the exported Softimage heirarchy (via fbx or .xsi):
(in worldspace)
string $selected[]=`ls -sl`;
for($x=0; $x<size($selected); ++$x){
string $fbxVersion = ("yourNamespace:" + $selected[$x]);
print $fbxVersion;
float $translate[3]=`xform -q -rp -ws $fbxVersion`;
move -a -ws -rpr $translate[0] $translate[1] $translate[2] $selected[$x];
float $rotation[3]=`xform -q -rotation -ws $fbxVersion`;
rotate -a -ws $rotation[0] $rotation[1] $rotation[2] $selected[$x];
};
or sometimes the local space works better.
string $selected[]=`ls -sl`;
for($x=0; $x<size($selected); ++$x){
string $fbxVersion = ("yourNamespace:" + $selected[$x]);
print $fbxVersion;
float $translate[3]=`xform -q -t $fbxVersion`;
move -a -ls $translate[0] $translate[1] $translate[2] $selected[$x];
float $rotation[3]=`xform -q -rotation -os $fbxVersion`;
rotate -a -os $rotation[0] $rotation[1] $rotation[2] $selected[$x];
};
I use some scripts for listing all the constraints and expressions in
Softimage. Then I reformat them to be like mel commands.
I think Eric Thivierge wrote those for me. Thanks Eric!
On 3/11/2014 4:57 AM, Nicolas Esposito wrote:
Hi guys,
Since I'm not a Maya user I would like to ask you a couple of things
regarding exporting a rigged character from Softimage to Maya.
I'm using Species and there is already a video on how to export the
rig to Maya, but, even using Gear rig or a custom one, it is possible
to export the shadow rig as well?
My few attempts on send a rig to Maya, or send a rig from Maya to
Softimage resolved always into Softimage crashing ( 2013 x64 no SP ),
so I was force to delete everything on the rig, except just the
skeletal rig and the meshes, without any shadow rig/controllers
So, anyone succesfully ported a rig from Softimage to Maya, or if in
Maya, in order to have the shadow rig, you just have to built it from
scratch, or use one of Maya tools in order to generate the shadow rig
( similar to Softimage? )
Cheers
Nicolas
function XSILoadPlugin( in_reg )
{
in_reg.Author = "hpayer";
in_reg.Name = "CopyShapeKeyPlugin";
in_reg.Email = "";
in_reg.URL = "";
in_reg.Major = 1;
in_reg.Minor = 0;
in_reg.RegisterCommand("CopyShapeKey","CopyShapeKey");
in_reg.RegisterMenu(siMenuTbAnimateDeformShapeID,"CopyShapeKey_Menu",false,false);
//RegistrationInsertionPoint - do not remove this line
return true;
}
function XSIUnloadPlugin( in_reg )
{
var strPluginName;
strPluginName = in_reg.Name;
Application.LogMessage(strPluginName + " has been unloaded.");
return true;
}
function CopyShapeKey_Init( ctxt )
{
var oCmd;
oCmd = ctxt.Source;
oCmd.Description = "";
oCmd.ReturnValue = true;
return true;
}
function CopyShapeKey_Execute( )
{
logmessage(selection.count);
if(selection.count!=0){
for (i = 0; i<selection.count;i++){
if (selection(i).type != "clskey"){
logmessage("Part of Selection is not a Cluster
Shape Key");
}
else{
DuplicateShapeKeys(Selection);
}
}
}
else{
logmessage("Nothing selected!");
}
function DuplicateShapeKeys(sel){
var upd = CreateBar("Copying Geometry",sel.count);
mesh = sel(0).parent3Dobject;
var SourcePosArray =
mesh.ActivePrimitive.Geometry.Points.PositionArray.toArray();
if (!(newmeshmodel)){
var newmeshmodel = ActiveSceneRoot.AddModel(null,
mesh.model.name + "_ShapeKeys");
}
for (i=0 ; i<sel.count;i++){
var newmesh = CopyMesh(mesh);
newmeshmodel.AddChild(newmesh);
newmesh.name = sel(i).name;
MoveMesh(newmesh, i);
var newGeoPosArray = new Array();
var ShapeKeyArray = sel(i).Elements.Array.toArray();
for ( j=0 ; j<ShapeKeyArray.length ; j++ ){
newGeoPosArray[j] = SourcePosArray[j] +
ShapeKeyArray[j];
}
newmesh.ActivePrimitive.Geometry.Points.PositionArray =
newGeoPosArray;
var check = UpdateBar(upd,sel(i).name, "none", -1);
if (check == true){
upd.Visible = false
i = sel.count
}
}
upd.Visible = false;
}
function MoveMesh(obj, mult){
var aRtn = GetBBox( obj ) ;
var xmin = aRtn.value( "LowerBoundX" );
var xmax = aRtn.value( "UpperBoundX" );
var newtrsvec = XSIMath.CreateVector3();
var trans = XSIMath.CreateTransform();
var trsfrm = obj.Kinematics.Global.Transform;
//var x = (xmax - xmin)*1.05*(mult + 1);
var x = (xmax - xmin)*.2*(mult + 1);
newtrsvec.set(x, trsfrm.PosY,trsfrm.PosZ);
trans.SetTranslation(newtrsvec);
obj.Kinematics.Global.Transform = trans;
}
function CopyMesh(mesh){
newmesh = Duplicate (mesh,null,
2,siNoParent,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1)(0);
//newmesh = Duplicate (mesh,null,
2,siSharedParent,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1)(0);
FreezeObj(newmesh);
//----------- cleaning duplicate -----------------------------
var props = newmesh.properties;
for (j=0;j<props.count;j++){
pname = props(j).name;
if (ClassName(props(j))=="CustomProperty" ||
ClassName(props(j))=="UserDataBlob"){
DeleteObj(props(j));
}
}
var cls = newmesh.ActivePrimitive.Geometry.Clusters;
for (j=0;j<cls.count;j++){
if (cls(j).type == "pnt"){
DeleteObj(cls(j));
}
if (cls(j).type == "poly"){
DeleteObj(cls(j));
}
if (cls(j).type == "sample"){
DeleteObj(cls(j));
}
}
return newmesh;
}
var STARTTIME, LASTTIME;
function CreateBar(caption, maxval) {
var pbar = XSIUIToolkit.ProgressBar;
pbar.Caption = caption;
pbar.Maximum = maxval;
pbar.visible = true;
STARTTIME = new Date;
return pbar;
}
function UpdateBar(pbar, ptext, prevphasename, lastphase) {
// record times
var tcur = new Date;
var tphase = (tcur - LASTTIME) / 1000.0;
var ttotal = (tcur - STARTTIME) / 1000.0;
LASTTIME = tcur;
if (!isFinite(tphase)) tphase = 0;
if (!isFinite(ttotal)) ttotal = 0;
// update progress bar
if (ptext && ptext != "") pbar.StatusText = ptext;
pbar.Increment();
// check cancel button
if (pbar.CancelPressed) {
logmessage("Canceled by user.");
return true;
}
// check breakpoint and report progress
var s = "phase " + pbar.value + " (" + prevphasename + "). phase=" +
tphase + " sec. total=" + ttotal + " sec. =====\n";
if (lastphase == pbar.value || lastphase == prevphasename) {
return true;
}
return false;
}
return true;
}
function CopyShapeKey_Menu_Init( ctxt )
{
var oMenu;
oMenu = ctxt.Source;
oMenu.AddCommandItem("Copy Selected ShapeKey in new
Model","CopyShapeKey");
return true;
}