View Full Version : News: Maya2Lw source code available
Hullbr3ach 01-24-2005, 11:33 PM Hello everyone,
it's been a long time since I started writing Maya2Lw. As of today, I'm including the source code for the LScripts in the download, as I am no longer maintaining the scripts.
Feel free to get them on my webpage under http://www.3danim.de/pages/free_stuff/maya2lw/maya2lw.html
Cheers
| |
faulknermano
01-31-2005, 10:24 AM
thanks!
i'm easing into a lw-maya workflow now, more than ever. it is my hope that i can expand on your current set of tools, and will most likely be open source, just like yours.
thanks again.
Zarathustra
01-31-2005, 02:56 PM
My first hope is for this to work properly and then I'll cry about it working on OSX. :hmm:
It's my understanding that these scripts are a bit buggy on OSX.
We've been discussing this on Splinecage a great deal. Truth is, when I first saw this mentioned about a week ago, I didn't know anything about it.
Link (http://www.splinecage.com/forums/showthread.php?t=910&page=1&pp=10)
To be able to use LW for rendering would be great. The pay-per-cpu option of MR is pretty restrictive if you're trying to make use of a renderfarm. For a little guy like me, that's pretty expensive. Being able to bring the animation back to LW for rendering across the farm.. yeah, that would be really helpful.
Hullbr3ach
02-03-2005, 12:05 PM
@zarathustra
Some users have reported, that the MEL interface in Maya does not look right on OS X. I have never tested this, as I don't have a Mac. In theory however, any MEL interface should look the same on Windows, Linux and Mac.
Regarding Lightwave: I assume that the LScripts will not work anymore, as NewTek has probably changed the LScript commands after I released the last version of the scripts for LW 6.5. Depending on how much they changed, you might only have to change a few commands to reflect their new structure, or up to possibly having to rewrite the whole LScripts.
In respect to OS X support: The purpose of built-in scripting languages is often to also abstract the underlying OS, meaning that a script will work on any platform that the application runs on. In other words, there should not be a difference between behavior on OS X and that on PCs, as long as NewTek did their homework and properly wrote their LScript engine.
@all
I suggest taking a look at writing out to a Motion Designer file (was it .mdd ?) instead of a textfile, if anyone wants to improve the scripts.
There are two ways to do that:
1. write a native (e.g. C++) application that converts the .m2l files to that format
2. write a C++ Maya plugin that will write directly to .mdd
The problem is that you cannot set the byte order when writing binary files from MEL scripts, so there is no way that I know of, that you could use to write to .mdd directly from MEL, as that format has big-endian byte order (opposite as on PCs).
faulknermano
02-03-2005, 12:17 PM
Regarding Lightwave: I assume that the LScripts will not work anymore, as NewTek has probably changed the LScript commands after I released the last version of the scripts for LW 6.5. Depending on how much they changed, you might only have to change a few commands to reflect their new structure, or up to possibly having to rewrite the whole LScripts.
they work pretty fine on 8.0, at least.
@all
I suggest taking a look at writing out to a Motion Designer file (was it .mdd ?) instead of a textfile, if anyone wants to improve the scripts.
exactly what i was thinking. but mdd's are not documented, afaik. i've asked around though, hopefully someone will respond with some useful information.
Julez4001
02-03-2005, 02:10 PM
Look at Pointoven
Mark has released a DOTXSI (softimage) with open source, I think.
www.ef9.com (http://www.ef9.com)
Julez4001
02-03-2005, 02:11 PM
Look at Pointoven
Mark has released a DOTXSI (softimage) with open source, I think.
www.ef9.com (http://www.ef9.com/)
Chewey
02-03-2005, 02:22 PM
I've been using the Beaverproject for LW to Maya and back. Works great. No mac version.
Zarathustra
02-03-2005, 03:11 PM
No Mac version for either Pointoven or Beaver, but thanks for at least letting me know that they do work for you fellas. That's good to know.
It's my understanding that something in LScript changed in 8.2. Now I don't know any of that programming stuff, but I know some people have had to make some changes to get their stuff working in 8.2. Once again, I know nothing about details of that stuff.
I have heard from an OSX Maya user that there are problems with Maya2LW, but I'm not sure if it's on the Maya side, LW side or what.
Maybe someone will expand on this? Maybe? Please.
zuzzabuzz
02-03-2005, 04:16 PM
It's my understanding that something in LScript changed in 8.2.
The only thing I've noticed, with respect to a script I'm writing, is that bugs were fixed. There are some annoying inconsistencies with the mac implemenation (as far as I've noticed) of LScript. So, I've had to test on both platforms and come up with workarounds that keep the mac and pc happy. Might be a similar case with these scripts?
Zarathustra
02-03-2005, 04:28 PM
Like I said, I don't know much about this stuff but Pawel apparently has to make some changes for Surpasses to work or maybe just to install in 8.2.
I just think something here or there changed, so some things have to be written different. I don't know, I'm really out of my element talking about this stuff beyond simply wanting the final product :D
Hullbr3ach
02-04-2005, 03:01 AM
exactly what i was thinking. but mdd's are not documented, afaik. i've asked around though, hopefully someone will respond with some useful information.
I found the docs on that Japanese LW plug-in site some time back. Think it was OGO-Hikari or so...
Paste this into an HTML file:
<B><BIG><BIG> MDD (MotionDesigner) file format </BIG></BIG></B>
<P>
The MDD file
is the file format which retains the simulation result of the
MotionDesigner. <BR>
This file binary - is the file, byte
order is the Big Endian (Motorola type). </P>
<P>
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="3" WIDTH="80%">
<TR ALIGN=CENTER><TH> Field name
</TH><TH> Data type </TH><TH> Size </TH><TH> Contents
</TH></TR>
<TR><TD> Fmax </TD><TD> Int </TD><TD> 4 bytes </TD><TD>
Maximum frame number of MDD file </TD></TR>
<TR><TD> Pmax </TD><TD> Int
</TD><TD> 4 bytes </TD><TD> Maximum number of particle
</TD></TR>
<TR><TD> Time [ fmax ] </TD><TD> Float </TD><TD> Fmax * 4
bytes </TD><TD> Time of frame </TD></TR>
<TR><TD> Org [ pmax ]
</TD><TD> Float [ 3 ] </TD><TD> Pmax * 12 bytes </TD>
<TD>
Coordinate value of point of original object </TD></TR>
<TR><TD> Data [ fmax
] [ pmax ] </TD><TD> Float [ 3 ] </TD><TD> Fmax & pmax * 12
bytes </TD>
<TD> Coordinate portable data of each every frame
</TD></TR>
</TABLE>
</P>
<P> Structure </P>
<PRE>
Struct mdd { int fmax; Int pmax;
Float time [ fmax ]; Float org [ pmax ] [ 3 ]; Float data [ fmax ] [
pmax ] [ 3 ]; }
</PRE>
faulknermano
02-04-2005, 04:21 AM
markus: thanks... mike green pointed out to me a link in the lscript mailing list where ernie wright spelled out the format in plain english ;) , which was very simple. but thank you, regardless.
in my testing and `warm-up` phase i wrote an M2L to MDD converter using LScript. bare bones stuff. i havent tried writing out to a binary before; i'm rather green in this respect.
http://www.geocities.com/faulknermano/Maya2LW.zip
from here on out i will start appending, modifying the same zip. i've included markus' MEL scripts (mel and lscript) there and will keep them intact.
will keep posting here all the progress that i make regarding maya2lw.
faulknermano
02-04-2005, 04:25 AM
I just think something here or there changed, so some things have to be written different. I don't know, I'm really out of my element talking about this stuff beyond simply wanting the final product :D
the only thing i'm worrying about, from where i'm standing, regarding maya2lw is pc - mac byte ordering which had it's own discussion in the lscript mailing list a long time ago. but i am not sure exactly its implications with reading / writing mdd files on these two platforms.
Hullbr3ach
02-04-2005, 10:56 AM
the only thing i'm worrying about, from where i'm standing, regarding maya2lw is pc - mac byte ordering which had it's own discussion in the lscript mailing list a long time ago. but i am not sure exactly its implications with reading / writing mdd files on these two platforms.
That's where all the .mdd problems come from (in terms of programming). If you don't find a way to tell LScript to write bytes in a certain order (big endian in this case), you will not be able to create .mdd files with it on a PC.
If you can convert to a binary representation inside LScript to which you still have access with your script, you should be able to do the conversion by hand. However I forgot what they told me back in computer architecture lectures on that topic, so I can't tell how you would do that exactly.
EDIT:
Seems like this is possible:
The File Object Agent methods that deal with binary file modes now accept an optional Boolean argument that indicates whether or not the read numeric value should have its byte ordering swapped. By default, byte ordering will remain as it was read in from the file. Passing a Boolean true will cause the byte ordering to be swapped before the value is returned.
So all you would have to do is pass a TRUE to writeInt on PCs.
faulknermano
02-04-2005, 12:47 PM
So all you would have to do is pass a TRUE to writeInt on PCs.
i'm not sure if it's for writing as well. but if you look at the M2L_MDD code the bottom part is thanks to ernie wright, though i have absentmindedly omitted a direct credit to him. i'll correct that when i upload another revision for the zip.
btw, the format you pasted here is better than ernie's delineation of it. it seems he omitted the 3rd "chunk", that is, the `rest` position of the points.
small update is up. same place
http://www.geocities.com/faulknermano/Maya2LW.zip
markpassion
02-04-2005, 01:56 PM
To be honest guys, even if you can get the mdd IO working, you're still stuck with the LScript speed limitations. As soon as you get a big mesh its going to go mightly slow.
Point Oven is all C++ hence the speed. If I can be of any assistance though just drop me aen email.
Mark
www.ef9.com (http://www.ef9.com)
faulknermano
02-04-2005, 02:05 PM
To be honest guys, even if you can get the mdd IO working, you're still stuck with the LScript speed limitations. As soon as you get a big mesh its going to go mightly slow.
Point Oven is all C++ hence the speed. If I can be of any assistance though just drop me aen email.
Mark
www.ef9.com (http://www.ef9.com)
well, the lscript converter is just a test, and a backup just in case the maya route doesnt pan out.
but i am assuming, when you're talking about lscript speed, is the conversion to the mdd format. because once the m2l is converted, playback is as fast as MD_Plug can possibly give us.
again, the intial step i'm trying to take with this open-source project is to translate maya info into mdd directly for use with lw's MD_Plug. byte order is my worry, because maya does not seem to have options for it, and writing binary data by whole chunks, nor single bytes, unlike lscript. and lscript's capability to write single bytes, ernie's code managed to arrange the order. hopefully the maya translation pans out.
Hullbr3ach
02-04-2005, 10:55 PM
again, the intial step i'm trying to take with this open-source project is to translate maya info into mdd directly for use with lw's MD_Plug. byte order is my worry, because maya does not seem to have options for it, and writing binary data by whole chunks, nor single bytes, unlike lscript. and lscript's capability to write single bytes, ernie's code managed to arrange the order. hopefully the maya translation pans out.
I saw the conversion code at the bottom. You can probably take it out as the boolean flag would do that for you. Further looking at your code, isn't writeInt(f,dur,FALSE); doing exactly that already?
Don't have too much time to look into it, as I have some of my final university exams on Monday and my head feels like it's going to explode from learning :banghead: ;)
markpassion
02-05-2005, 12:21 AM
Ah yes of course, I keep forgetting about the md_plug. Sorry about that. The only way I can see MEL being able to write the biary data you need is to write a simple command for MEL in C++ that handles the byte order and writes for you. I guess if you go that far though, you might as well do the whole thing in C++.
Mark
www.ef9.com (http://www.ef9.com)
faulknermano
02-05-2005, 02:13 AM
isn't writeInt(f,dur,FALSE); doing exactly that already?
yes. the code was originally about pc and mac ordering. i still have to get my bearings on that. i'm not sure if md_plug reads it differently on different platforms, you see. :D
Don't have too much time to look into it, as I have some of my final university exams on Monday and my head feels like it's going to explode from learning :banghead: ;)
i hate school. good luck! :D
The only way I can see MEL being able to write the biary data you need is to write a simple command for MEL in C++ that handles the byte order and writes for you. I guess if you go that far though, you might as well do the whole thing in C++.
i personally wouldnt go that far. :D yes, fwrite() does not seem to write things out as a PC MD_Plug would like; fwrite() writes out in intel order so i'm stumped. i've asked around the mel forum to see what's up. if this one doesnt pan out, i might as well learn C and write a small external utility translating maya-exported-intel-order-binaries into mdplug-readable-motorla-order-binaries. yeesh...
suture
02-05-2005, 03:49 AM
Hi thanks for the script. BTW it looks like your forums been hacked
http://forum.lwhub.com/
Hullbr3ach
02-05-2005, 09:58 AM
Hi thanks for the script. BTW it looks like your forums been hacked
Strange, I am absolutely sure I removed the link a few months back. Thanks for the tip.
markpassion
02-05-2005, 02:01 PM
The problem I imagine isn't coming from the fwrite() function. fwrite in c/c++ only writes intel ordered bytes as far as I know. What you need are functions for handling bytes in MEL, which I don't think exist but could easily be wrong.
Basically all you need to write out are ints and floats to make an mdd. Both are 4 bytes. So you need to extract those four bytes into four chars (char = 1 byte) and then link them back into 4 bytes in the opposite order and then frwite() them. Thats basically how Point Oven does it, and I presume how md_plug does it. md_plug won't do this on the mac as the fwrite/read call on the mac will be reading the bytes the native way round for the mdd.
Hope that makes sense and is useful.
Mark
Julez4001
02-05-2005, 02:58 PM
Hey Hullbr3ach (http://www.cgtalk.com/member.php?u=288) vbmenu_register("postmenu_1946466", true);
what happen to your scifi final fantasy project?
You were rendering in lw but animating in messiah.
You guys had a interview done cgchannel a few years back.
Hullbr3ach
02-05-2005, 11:19 PM
The problem I imagine isn't coming from the fwrite() function. fwrite in c/c++ only writes intel ordered bytes as far as I know. What you need are functions for handling bytes in MEL, which I don't think exist but could easily be wrong.
Basically all you need to write out are ints and floats to make an mdd. Both are 4 bytes. So you need to extract those four bytes into four chars (char = 1 byte) and then link them back into 4 bytes in the opposite order and then frwite() them. Thats basically how Point Oven does it, and I presume how md_plug does it. md_plug won't do this on the mac as the fwrite/read call on the mac will be reading the bytes the native way round for the mdd.
Ok, I think we're losing each other so let me try to state my points again:
IMO, there are 4 ways of doing the conversion to a .mdd format.
Write a MEL script that outputs directly to .mdd.
Unless you would find a way to convert to big-endian byte order before passing the data to fwrite, it seems to be impossible to do this. That seems to be what you were talking about in the above post.
_
Write a C++ application that converts from .m2l to .mdd
Should be rather straightforward and I think some user sent this to me in source code some time back. Will have to search my e-mails from way back... Writing big-endian shouldn't be a problem here.
_
Write a C++ application that writes directly to .mdd using the Maya SDK
A bit more tricky, as you will have to iterate over the scene graph using the SDK and the need to interact with some sort of GUI (either created in MEL or via the SDK). Though in the long run probably the cleanest solution. Big-endian not a problem here either.
_
Write a LScript that will convert from .m2l to .mdd
That's what faulknermano already wrote. Only problem seems to be to make sure that LScript writes in big-endian style.
what happen to your scifi final fantasy project?
You were rendering in lw but animating in messiah.
You guys had a interview done cgchannel a few years back.
If you mean me, I don't remember having been interviewed on cgchannel ever. Maybe you are mixing something up?
faulknermano
02-06-2005, 06:16 AM
markus and mark, thanks for the inputs and advices:
@mark: the fwrite() that i am speaking of is the fwrite() in MEL - MEL has many identical C/C++ funcs. the fwrite() in C has, no doubt, more control. but in MEL, there's precious little control of how you want your bytes stored. btw: MEL's fwrite() stores intel-order 8 bytes long (if you're feeding floats into the func), which is NOT what we need.
i have, over the weekend, been working on this and the fastest solution i came up with is this:
in maya, i write out a binary, of course 4 bytes for ints and 8 bytes for floats and intel ordering, as MEL only allows.
in lw, i made an lscript that processes this new binary into something useable for MDD; i convert the float value of the 8 bytes into 4, and swap the order. it's basically the same workflow as m2l to mdd, but only two marked differences. exporting data to binary from maya is significantly faster, AND translating the new binary to MDD is faster too. writing a plugin for maya will probably be the ultimate: but i only use what i have. :) (for me, that's the fun of the open-source... hehehe)
i'd like to upload what i've already done but the MEL is a mess and i havent updated the UI to give user control specification of filenames and what to export, and such.
Hullbr3ach
02-06-2005, 10:50 AM
I've recently rewritten most of the MEL scripts in an attempt to create a XML exporter for a university project I was working on. It includes recursive scene graph traversal (i.e. you select a node and it will export everything below it) and a restructured albeit minimal UI code.
If you want, I could post it tomorrow after my exam.
markpassion
02-06-2005, 03:11 PM
faulknermano (http://www.cgtalk.com/member.php?u=10526): You don't have control in C over how fwrite orders bytes either. You just reformat your bytes before passing them to fwrite. Anyway, glad to hear you got Lscript to reformat the data. I didn't know Lscript could do that.
Mark
www.ef9.com (http://www.ef9.com) vbmenu_register("postmenu_1948010", true);
faulknermano
02-07-2005, 02:41 AM
faulknermano (http://www.cgtalk.com/member.php?u=10526): YYou just reformat your bytes before passing them to fwrite. Anyway, glad to hear you got Lscript to reformat the data. I didn't know Lscript could do that.
just like C, the bytes are reordered manually. i searched for some byte handling code and found one from ernie wright, and used that. lscript provides very precises byte writing and reading, which is cool.
faulknermano
02-10-2005, 09:16 AM
http://www.geocities.com/faulknermano/Maya2LW.zip
from the index.htm logs:
05.07.05
- Combined the two scripts into one. UI and export functions are now in one script.
- Re-did the logic flow so that the all exports are created in one timeline pass.
05.08.05
- Previous Maya2LW rotation transforms will not yield the correct rotation when importing to LW due to the difference in their rotation methods. Using the transformation matrix instead.
05.10.05 (rev 2.0.1)
- New proprietary binary format called *.m2md (Maya-to-MotionDesigner). However, this can be a little misleading. The file it outputs it NOT readily readable by LW's MD_Plug. This file must go through a converter to work. You might be wondering why this is so. Unfortunately, there is no direct way for MEL to write out four byte floats. It defaults at 8 bytes (doubles), and the order is Intel. The MDD file format requires not only four bytes, but is in Motorola order. I've opted to use LScript to rearrange the order and scale down the float values to four bytes.
- The new LScript is called M2MD_MDD_ConverterGN.ls
- *.m2l files are now binary. Obviously, this is a totally different format. Currently, the m2l format is designed to carry transform attributes and, in the next revision, cameraShape attributes (e.g. focal length, focal distance, etc). Again, cameraShape attributes are not exportable at the moment.
- Removed the object type Light from exportable items. This exclusion is part of the development vision I have for Maya2LW. Please refer to the Development Plan section for more information.
- Replaced the Light type with Transforms for export. Transforms carry only transform attributes, obviously. The interface mechanism to pinpoint valid transform nodes with parents is not fully tested. Hence, for this revision, export only transform nodes without parents. Only Translate, Rotation and Scaling attribs are exported. (As stated in entry 05.08.05, rotations are expressed in matrices to be recalculated back into LW's HPB.)
- Removed LW Scene file creation. See Development Plan for explanation.
- Removed previous Maya2LW LScript that controlled displacement, channels, and motion. See Development Plan for explanation.
- Temporarily disabled OBJ export. Will add this back soon (e.g. next rev) as a separate export option when relevant interface mechanisms have been sorted out.
i also added a development plan and outlined the procedures i'm planning to take so people know what to expect from this.
btw: only the M2MDD export is fully functional at this point. while there have been many improvements, they mainly have been on the maya side. i still need to get a master-class lscript working to apply the M2L files into their relevant items. i posted this so as to keep folks here updated on whats happening.
faulknermano
02-19-2005, 01:12 PM
updated: http://www.geocities.com/faulknermano/Maya2LW.zip
from the notes:
02.19.05 (rev 2.0.2)
- Maya2LW Scene Controller v1.0. Master-class LScript. Handles all M2L importation functions. See separate documentation for details.
- Added frame stepping for Maya export.
- M2MDD_MDD_CoverterGN can now batch convert multiple M2MDD files.
- M2L file format included under ..\_notes
so basically, i finally got Maya data into LW. :)
Julez4001
02-19-2005, 02:29 PM
SWEET!
Its great having alternatives for the Maya and LW pipeline
Thanks for putting the effort in?
REQUEST though thats not part of the original maya2 lw set:
Import and exporting of maya and lw camera data.
Chewey
02-19-2005, 02:59 PM
I just wanted to give you kudos and a big thumbs up for your efforts!
:thumbsup:
faulknermano
02-20-2005, 02:04 AM
Import and exporting of maya and lw camera data.
to be clear, you are asking total camera data interchange between lw and maya. lw -> maya, maya -> lw. that will be fairly easy to do.
@chewey: thanks. right now i'm tackling getting pfx info into maya, and laster, maya pdc (particle cache) files into pfx format. but i'm concentrating of pfx to pdc first because i find it personally important.;)
Julez4001
02-20-2005, 02:20 AM
to be clear, you are asking total camera data interchange between lw and maya. lw -> maya, maya -> lw. that will be fairly easy to do.
.;)
Yes
Just a simple camera import/export between the apps thats not tied to another app (like Kaydara). Whikle camera target would be nice for the transfer, not needed (especually if we can just bake the frames) and exchange between the apps.
Thanks in advance
faulknermano
02-20-2005, 03:49 AM
Whikle camera target would be nice for the transfer, not needed (especually if we can just bake the frames) and exchange between the apps.
yes, very much so. it's a case of the differences that apps use to evaluate their data. the best and most robust route is baking.
UPDATE:
M2MD export was not working. corrected this. uploaded new file. please refer to link above.
Julez4001
02-21-2005, 02:51 AM
Is a Maya mdd importer hard to make?
Ignorance is not really blissful, it can be very aggravating at times.
faulknermano
02-21-2005, 09:04 AM
Is a Maya mdd importer hard to make?
Ignorance is not really blissful, it can be very aggravating at times.
it's all about the application of the data in the file. in this case, i am not yet informed about how to manipulate vertices over time. in maya, we usually use deformers to manipulate points. we hardly move the points themselves. we can use clusters create transform nodes to better manipulate the points.
it's not like lightwave where there is already an inbuilt deformation plugin architecture where this interface is readily made available. it's very convenient.
in maya, it will not be as straightforward. MDD is point by point. what's the equivalent of that in maya? i think it's a wrap deformer. but i do not know how efficient.
faulknermano
03-02-2005, 08:01 AM
i'm living in an exciting time. :)
rev 2.0.3 is up.
02.30.05 (rev 2.0.3)
- Improved name handling. Previously, the MEL script could not handle nested nodes that contained "_" characters.
- Added Tutorial On Basic Export for animation with LightWave subdivision surfaces.
- Brought back the OBJ Export and added two options with it: Original or Deformed. With Original, the script attempts to locate the original mesh of the current shape node. Since shape nodes can be inputted by many deformers which can subsequently be inputted with different meshes, tracking down the intended original mesh is fraught with errors. The script will default by searching for a node containing the name of your shape node plus the word "Orig". If the script finds it, then it is this mesh that gets outputted as an OBJ file. With Deformed, the selected shape node, along with its current deformations is exported. This serves little use however. Please read tutorial on Tutorial On Basic Export for more info.
- If nothing is checked in the interface, the script will now get the currently selected items and process it. Items which do not fit the supported types will be ignored. As a tip: you may store a set of items in a Quick Select Set, or store a series of MEL commands into the toolbar. This way it will be easier to export a group of objects altogether.
- Maya2LW Scene Controller v1.0.1. Fixed importation problems regarding rotations.
- Sven Pampel has contributed a simple, but uber-useful M2MD > MDD converter (M2MD_M2L.exe), which is utitlised by the MEL script to automatically convert the generated M2MD files into MDD. The MEL script will now clean up the M2MD files, so all that is left are the usuable MDDs. Kudos to Sven for finally allowing MDD files to be generated directly out of Maya. (Source code included).
- You must put the M2MD_M2L.exe file into a system path. A safe bet would be the \bin directory of Maya.
- Short names are again now possible by checking the box under the Misc popdown. But I have not coded this with the possibility of non-unique names. Please be advised.
- Added a Generic LScript (ApplyMD_PlugGN.ls) that will batch apply MD_Plug on every object in the scene. The script will prompt you for a LightWave scene file to process, and will output a user-specified scene file.
- Added a Modeler LScript (SaveLWOsEnMasse.ls) that will take a series of OBJs (or any Modeler-loadable format) and automatically save them as LWOs (e.g. no prompts). Extensions are renamed.
*special mention*: Sven Pampel, aka EvilE has authored the M2MD_M2L.exe app, which makes it possible to remove one step of the exporting process. this streamlines the whole process VERY MUCH.
to this end, remember to export to a directory that will be shared by MD_Plug. as long as MD_Plug is pointing at MDD files located at that directory, it update itself when you do a scene reload. more info on the tutorial.
i've been using maya2lw on an on-going 2-week project, so fixing bugs while working on it has been a living hell for me, in a sense that i dont get much sleep. ;) but it's getting better.
http://www.geocities.com/faulknermano/Maya2LW.zip
EDIT: by the way, the camera export / import stuff will come later, possibly in the next rev, since i first develop what i need at the moment.
EvilE
03-02-2005, 08:07 AM
I thought u wanted to do some more bug fixing before you release this ?
... anyway this plugin :buttrock:
Sven
faulknermano
03-02-2005, 08:13 AM
I thought u wanted to do some more bug fixing before you release this ?
Sven
:) i was running Maya straight for two days due to the short deadline. i think i had to flush the global variables that i used, but i didnt think about that when i was debugging it, so i kept getting non-critical warnings. at any rate, there was no problem at all. however, i did fix a "bug" that saved an OBJ file on the current frame instead of the start frame.
hope you enjoy it. ;)
Julez4001
03-02-2005, 01:05 PM
:thumbsup: :buttrock: You deserve a buttrock!
faulknermano
03-09-2005, 02:07 AM
03.02.05 (rev 2.0.3.1)
- released this patch due to a problem reported by Daniel Smith regarding cameraShape / transform export / import problems. This mainly due to file format changes that I failed to coordinate between the two. please use only rev 2.0.3.1 (and not versions before) with Maya2LW_SceneController_v102 only. I am putting the older revisions into a directory called oldstuffs just to keep it from confusing everyone.
- The tranformation matrix method that I used did not hold up to rotations that go more than 360 degrees. I opted for a way, instead, to convert the rotation order into the LW standard. An important note: Maya defaults to the "xyz" rotation order. LW's standard is "zxy". While the MEL will try to resolve "xyz" rotations to "zxy", it will not always yield the best results. Before animating, please use the "zxy" rotational order to best comply with LightWave. The rotation order for the transform node is accessed via popdown in the Attribute Editor, or by using the Channel Editor, you can place the rotateOrder attribute in your Channel Box. The MEL exporter (rev 2.0.4) and the LW importer (rev 1.0.2) have been updated to reflect these changes. Please do not use older M2L files since the LScript will not grok it.
- However, there is an alternate way of getting camera transformation into LW regardless of what rotation order you have. Simply parent a locator to the camera and move it in front of the camera. Export this locator as a transform node. In LW use this as the target for the camera, whose transform node should also be exported.
- Added an option to keep the outputted M2MD files. Previously, by default, M2MD files were deleted after export.
- MEL script now checks if the output directory is valid. Should have done this a long time ago.
i'm in the process of setting up a site that will house the project, so people can get the files individually instead of always downloading the whole zip everytime..
btw: rev 2.0.3.1 is essentially a 2.0.4 in progress. mr daniel smith brought to my attention about how the scripts that i uploaded previously werent working together. ;) thanks to daniel smith.
faulknermano
03-11-2005, 11:48 AM
i've finally put up the Maya2LW site:
http://thespread.ghostoutpost.com/Maya2LW.html
(in addition, i've put up my main site too http://thespread.ghostoutpost.com)
i'll stop posting here regarding updates. if anyone would like to be updated regarding my progress with maya2lw, email me at faulknermanoATyahoo so i can collate a mailing list. otherwise just keep checking back at the site for updates.
so long... ;)
Karmacop
03-11-2005, 02:23 PM
The site is looking good. Are you going to put your old script back up? Also, I could give you an email address at ghostoutpost if you wanted, and have it foward email to you?
Either way, it's just good to see you finally update the site ;)
Julez4001
04-11-2005, 03:58 PM
new features
- LW particles are now exportable to Maya
- changed the M2L transform export to deal with
pre-frozen transformations
- formal documentation
- LW OBJ export, to replace existing Maya OBJ Import.
[new renamed link - please update]
http://thespread.ghostoutpost.com/Maya2LW2.html (http://thespread.ghostoutpost.com/Maya2LW2.html)
he's knocking it out!
faulknermano
04-12-2005, 03:03 AM
julez, did you get the email on the version 2.1 update? just wondering if it got through.. ;) thanks.
Julez4001
04-12-2005, 10:51 AM
yes I did, but looking in my Outlook, I missed it at the time you sent it. I'll give those features a go as well.
Thank you very much.
CGTalk Moderation
04-12-2005, 10:51 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.