Tempust85 Posted December 18, 2014 Posted December 18, 2014 Great work! Will be great to finally import root.xsi with weights intact. Archangel35757 likes this
Archangel35757 Posted December 23, 2014 Author Posted December 23, 2014 All remaining templates for importing meshes are now complete: SI_ModelSI_TransformSI_MeshSI_ShapeSI_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: ...in 3ds Max the materials are automatically applied to the meshes and added to the material editor. GMAX: ...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
Archangel35757 Posted December 23, 2014 Author Posted December 23, 2014 @@Psyk0Sith -- recognize that model?
Psyk0Sith Posted December 23, 2014 Posted December 23, 2014 Haha sure You got awesome maxscript / plugins skills dude! Tempust85 and Archangel35757 like this
Tempust85 Posted December 23, 2014 Posted December 23, 2014 A step closer to an eventual XSI to FBX batch conversion?
Archangel35757 Posted December 23, 2014 Author Posted December 23, 2014 A step closer to an eventual XSI to FBX batch conversion? 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?
Tempust85 Posted December 23, 2014 Posted December 23, 2014 Yeah I forgot for a moment carcass was fixed. Archangel35757 likes this
Archangel35757 Posted December 24, 2014 Author Posted December 24, 2014 Mesh texture coordinates are now imported when TextureCoords import option is checked! Only mesh weights within SI_Envelope templates remain. I hope to have those done next week. Tempust85 likes this
Tempust85 Posted December 24, 2014 Posted December 24, 2014 Will there be an option to import root.xsi, then batch append all the other xsi anims onto the imported root.xsi?
Archangel35757 Posted December 24, 2014 Author Posted December 24, 2014 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.
Tempust85 Posted December 25, 2014 Posted December 25, 2014 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> <<
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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...
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 @@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...
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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.
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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: 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: Now here is the result from my Maxscript dotXSI 3.x importer: As you can see the orientation for the bone's axes matches that of the Raven import result.
Tempust85 Posted December 25, 2014 Posted December 25, 2014 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.
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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?
Tempust85 Posted December 25, 2014 Posted December 25, 2014 I've tried a3 special but all I get is the root pose along with the animation error.
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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.
Tempust85 Posted December 25, 2014 Posted December 25, 2014 Ok, that worked for root.xsi. The weights look to be good. 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
Archangel35757 Posted December 25, 2014 Author Posted December 25, 2014 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.
Archangel35757 Posted January 12, 2015 Author Posted January 12, 2015 Update: I have finally (with the help of others from CGSociety forum) gotten the issues with applying skin weights resolved! ...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
Tempust85 Posted January 12, 2015 Posted January 12, 2015 Error for weights: -- Compile error: Illegal input in readValue-- In line: SI_Envelope D
Archangel35757 Posted January 12, 2015 Author Posted January 12, 2015 @@DT85 -- what version of Max caused this error? It compiled fine for me and Max 8 and Max 2011.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now