Jump to content

dotXSI 3.0/3.5 Importer for 3ds Max / Gmax


Recommended Posts

Posted

All remaining templates for importing meshes are now complete: :winkthumb:

SI_Model

SI_Transform

SI_Mesh

SI_Shape

SI_TriangleList (partially complete)

SI_FCurve

 

 

 

But I still need to do a bit of defensive scripting, as well as add support for mesh normals and UV texture coordinates (these features would be handled in the SI_TriangleList template (thus its partial status), and modify the SI_Envelope template import function to support dotXSI 3.x.

 

Check it out...

 

3ds Max 8 SP3:

max8result_zpsd00f1680.jpg

 

...in 3ds Max the materials are automatically applied to the meshes and added to the material editor. :winkthumb:

 

GMAX:

gMaxResults_zpsa5de3c8a.jpg

 

...in GMAX the materials are imported into the scene but are not yet added to the mesh objects (because it doesn't have a material editor like 3ds Max-- so it will take a little tweaking).

 

Stay tuned...

Tempust85 likes this
Posted

A step closer to an eventual XSI to FBX batch conversion? :D

Why would you need to do that? Carcass is fine now for processing files...

 

...unless you mean in regards to dotXSI exporting (I plan to make a 2015 Max plugin and eventually convert to Maxscript). Or you mean to port the dotXSI files to other 3D apps?

Posted

Will there be an option to import root.xsi, then batch append all the other xsi anims onto the imported root.xsi?

Recall that the Exporter requires frame 0 to be the root skin pose... so every animation has the root pose on frame 0 (because they always contain the Basepose transform templates). But the animation timeline always starts on Frame 1 (first frame of animation). So you don't see the root pose play when scrubbing timeline or playing the animation. Batch import imports each file and saves it as the same filename with .max extension.

 

Inside 3dsMax the best thing to do would be to merge files or merge animation using a 1-for-1 bone mapping.

 

A separate, independent script could be written to do what you want using the existing animation.cfg file to ensure proper file order.

Posted

Get this from Max 2014 when trying to import an animation:

-- Error occurred in SetAnimation(); filename: C:\Users\Jon\Desktop\XSI_Import_v1_040Beta_Max_rev-N.ms; position: 57744; line: 1809
--  Frame:
--   _3dsMaxQuat: undefined
--   xsiXrot: 0.0
--   xsiYrot: 0.0
--   xsiZrot: 0.0
--   o: $skeleton_root
--   frametime: 1
--   xsiAngles2Quat: (quat 0 0 0 1)
--   called in i loop; filename: C:\Users\Jon\Desktop\XSI_Import_v1_040Beta_Max_rev-N.ms; position: 58275; line: 1823
--  Frame:
--   i: 2
--   called in SetAnimation(); filename: C:\Users\Jon\Desktop\XSI_Import_v1_040Beta_Max_rev-N.ms; position: 58282; line: 1824
--  Frame:
--   _3dsMaxQuat: undefined
--   xsiXrot: undefined
--   xsiYrot: undefined
--   xsiZrot: undefined
--   o: $model_root
--   frametime: 1
--   xsiAngles2Quat: undefined
--   called in k loop; filename: C:\Users\Jon\Desktop\XSI_Import_v1_040Beta_Max_rev-N.ms; position: 76755; line: 2421
--  Frame:
--   k: 1
--   called in btn_Import.pressed(); filename: C:\Users\Jon\Desktop\XSI_Import_v1_040Beta_Max_rev-N.ms; position: 76765; line: 2422
--  Frame:
--   tempFileName: undefined
>> MAXScript Rollout Handler Exception:
-- Unable to convert: (quat 0 0 0 1) to type: <node> <<

Posted

Weird... is this error repeatable? Read the error message from bottom up to make more sense of it. At first glance it failed on the rotation section of setAnimation function. Because _3dsMaxQuat didn't get computed yet.

 

I'll try it out in Max 2013...

Posted

@@DT85 -- it is failing at this line in SetAnimation function (I get the same error in Max 2013):

_3dsMaxQuat = ( transform (xsiAngles2Quat) tmX90 ) * (-1)

-- Error occurred in anonymous codeblock

 

it's weird because the function transform <quat> <matrix3> is there in the Maxscript help for "Quat Values".

 

Edit: I've posted a help thread in the cgtalk forums here ( http://forums.cgsociety.org/showthread.php?f=98&t=1243320 ) asking the Maxscript experts for help as to why this function is failing now in Max 2013 and Max 2014...

Posted

I'm also getting errors with some of the NPC files somewhere within the SI_Envelope process of adding the skin modifier... but it worked just fine on the saber Droid. Will have to do more debugging.

Posted

So I just wanted to show a few pics to explain what I mean when I keep saying that the Softimage Co. dotXSI importer for 3ds Max 6 is not correct.

 

This first image shows the JK skeleton as imported in 3ds Max 5 using Raven's importer plugin:

 

3dsMax_skeleton_fromMax5import_zps1a5d47

 

Notice how the bone's origin axes (pivot) is displayed (red = X axis, green = Y axis, blue = Z axis)...

 

Now look at the result from the Softimage Co. Max6 importer plugin:

Softimage_Max6_ImportPlugin_zpsd4ea0f0a.

 

Now here is the result from my Maxscript dotXSI 3.x importer:

myScript_Import_zps93949234.jpg

 

As you can see the orientation for the bone's axes matches that of the Raven import result. :winkthumb:

Posted

I get the animation error in 8/2011/2014, and I get the addmodifier error in 8/2011/2014 when trying to add root.xsi. At least it's importing the UVs which raven's importer doesn't afaik.

Posted

I get the animation error in 8/2011/2014, and I get the addmodifier error in 8/2011/2014 when trying to add root.xsi. At least it's importing the UVs which raven's importer doesn't afaik.

Some files import just fine while others appear to be more problematic... I think the problematic files are dotXSI 3.5 only... have you had any issues with dotXSI 3.0 files?

 

Try this fix for the Quat failure... in setAnimation function change line to:

 

_3dsMaxQuat = ( xsiAngles2Quat * tmX90 ) * (-1)

 

...so you're only working with JA's root.xsi file?

Posted

The error with the addmodifier (for the skin modifier) I suspect is due to the fact that I forgot to strip out the "DaVinci***bones." prefix from the object names in the SI_Envelope templates for dotXSI 3.x files from Raven. I only stripped out "MDL-" when processing the SI_Envelope templates in the script I sent you.

 

I'll have to update the script... but as a quick hack until I can fix the script you could try using NotePad++ and search the root.xsi for all instances of "DaVinci***bones." prefix and delete the prefix and see if that resolves the failures-- it should.

 

Also, the point helpers and animation should import just fine if you uncheck "Skin/Envelopes" option.

 

I'll try and get it fixed on Christmas day.

Posted

Ok, that worked for root.xsi. The weights look to be good.

 

14wqfcz.jpg

 

Already one-upped the original xsi importer. Yours retains skin weights, retains hierarchy, retains UVs & doesn't create duplicate bones. This script will make my job of re-rigging JKA model source files against the DF2 GLA as some of the source files contain errors and aren't useable as-is. Your work is much appreciated. :)

Archangel35757 likes this
Posted

In the latest beta script I sent you ( Rev. Q ) I don't get any errors anymore in Max8, 2011, 2013... however it seems the mesh skin weights are messed up-- being distorted when the animation plays... I will have to do more debugging later after the new year.

 

It would help if you would save the skin weights to a .max file you know is weighted correctly (look in the skin modifier). Then export your Max scene, reset and then re-import that result using the maxscript-- then save those imported mesh skin weights to files so we can compare them to see what is going wrong.

 

:winkthumb:

  • 3 weeks later...
Posted

Update: I have finally (with the help of others from CGSociety forum) gotten the issues with applying skin weights resolved! :winkthumb:

...and it appears this resolves the skin weight problems for Star Trek Elite Force files as well! So now I just need to cleanup a few things I broke for STEF files and add these new changes to the batch import routine.

 

I've sent the latest beta version 2.00 to @@DT85 to test out...

 

I hope to have this Maxscript officially released for both 3dsMax and Gmax next week.

Psyk0Sith likes this

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...