Maya->Indigo0.5.3/0.5.4 Exporter Script
Well, people, I haven't programmed in a while. Now I want to make an MEL script that takes a Maya scene and makes an Indigo XML file.
So far- this is what my program outputs: Code:
<?xml version='1.0' standalone=no> Soon, I will have the vectors normalized, but, until then, this will have to do. Also I'll have a window that prompts you, asks for settings, basically, a UI. |
fast update- didn't know Maya had a target camera, so now you have to create a camera (camera 1, dont rename) and, instead of a locator, my script uses the camera target as the locator.
EDIT- Maya has just solved a big problem of mine- the up vector. Maya has a camera called Camera, aim, and up! I can use this to my advantage! :attn: but you'lll have to use that kind of camera or else it won't export (the script won't run) |
Hmm, I think you'we got the basics right but as I don't know anything/very little of the Indigo file format I can't give you much C&C.
Yay for 13 year old programmers :beer: //lol Arangol |
ya, yay lol :attn:
I will just post a sample XML file with 2 triangles in it and no light (exported from 3ds Max) Code:
?xml version="1.0" standalone=no> |
well- I can get diffuse and phong materials exported.
Code:
<?xml version='1.0' standalone=no> I won't post code because I really don't want to be plaigerized, since my exporter is the only one around for Maya! (apart from LaLiLuLeLo from the flipcode forums, and his doens't work with Indigo 0.5) Mine doesn't either but it will in an hour or two. Later, Matt |
Hurry, hurry! :D
I want to render my own modells :attn: |
ok ok!
I can export a full file now- plese try it out.. it doesn't work on my comp, no clue as to why the f**** it doesnt work. It tells me it can't read line -2.233.:confused: no meshlights or any kind of light for that matter, use it the same way you used LaLiLuLeLo's script, but: Lambert materials are plain diffuse Phong materials- Color is actual color Reflectivity is specular color If you want a non-constant specular color (eg 1 0 1 instead of 1 1 1) you need to set reflectivity to 0 and use the reflected color gauge Cosine power is specular sharpness (warning- it is multiplied by 10- eg. 12 is 120 and 0.3 is 3) you need to use a camera- camera, aim, and up. Don't rename it. Code:
//Script by Matt B. (ThatDude33) for export from Maya 6.5+ to Indigo 0.5.3 |
:D
Can't get Indigo to read it... SceneLoaderExept: Failed to load XML doc from path 'testscenes/mayatest1100.xml': Error reading Element value. Line 0, column 0 Strange... :alien: |
yeah- same here.
Odd indeed... and I wonder why! I mean, my 3ds Max files are just fine. I'll try to export an identical 3ds Max file and see what's up. |
an identical 3ds exported file runs just fine.
I talked to nick (writer of Indigo) and he said he'd tell me what it is, if it's not because it can't find the file, which i'm sure it can. This is making me maaaaaaaaad. I really want to solve this problem!!!1 |
YESS!!!!!!!!!!!!!!!!!!!!!! :attn:
I fixed it :D :D :D :D There was some stupid mistakes there... Code:
//Script by Matt B. (ThatDude33) for export from Maya 6.5+ to Indigo 0.5.3 Write 'lambert1' insted of 'initialMaterialInfo' in the Mesh material_name. You should kiss my feet Matt! HAHA!!! Just kidding... hehe... :beer: |
damn! now I have to add you to credits... :D :D :D :p
BUt still I can't say that you did the whole thing, I'll just add "Thanks to Arneoog for fixing some major bugs" Is that ok? yawn- time to add a nice UI |
yepp that's okay :D
|
1 Attachment(s)
I made this Icon for Maya some days ago...
|
cool- oh and just so you know you moved the <name> tag inside the <phong> one, and it gives errors.
edit- I added a conditional that writes lambert1 if the name is InitialShading... whatever :D |
All times are GMT. The time now is 09:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018