Lightwave 3D model loader

I searched the forum and found a few reference to Lightwave but nothing concrete. Is there/will there be support for loading Lightwave objects?

Java3D apparently had a loader for entire lw3d scenes.

http://ls7-www.informatik.uni-dortmund.de/students/lectures/doc_mmi0304/j3d-html/com/sun/j3d/loaders/lw3d/Lw3dLoader.html

Can the code from J3D be taken? I doubt it since it is probably copyrighted. Also it looks like it is very old 1998 or so.

My Version of Lightwave (7.5c) can export to 3DS, DXF and OBJ. Which of these formats would retain the most information from my LWO files?

I guess it depends on the export facility. 3DS supports a hell of a lot of features but they might not all be exported…

How complicated is the Lightwave format, could a loader be written?

Kev

I suspect parsing it would be simple enough as it uses the IFF standard of using chunks. The newest information I could find on the format is here:

http://www.newtek.com/products/lightwave/developer/75lwsdk/docs/filefmts/lwo2.html

I would write a loader but being a relative newbie to this stuff I would probably screw it all up.

There are examples of reading the format given here:

http://www.newtek.com/products/lightwave/developer/75lwsdk/docs/filefmts/lwo2ex/lwo2ex.html

The following file contains the C source code for parsing the files. Of special interest would be the smaple/lwo2prt/lwo2.c program. It appears to read in an object file and print out information about it to the console. This might be a good starting point.

http://www.newtek.com/products/lightwave/developer/75lwsdk/lwsdk75.zip

I’ve written a kind of basic Lightwave LWO and LWS importer for Xith3d, but it’s with many restrictions. Basically it just fits the needs for my current hobby project, so I’m afraid it’s not very useful to others.
It’s not related to the Java3d LWS/LWO importer because when I’ve started writing the importer I’ve been using JOGL. So in the end I’ve re-invented the wheel I’m afraid, but with my wheel being rather a kind of triangle. :wink:

LWO import:
° It doesn’t use the nice Xith3d Loader interface.
° It skips many of LWO’s more complex features (it’s a basic importer).

LWS import:
° Currently no support for animations, but will do this soon.
° Currently no support for bones, but when Xith3d supports it, I’ll add LW bone import.

Parsing exotic formats like the binary and hacked LWO file format isn’t my strength, I’m afraid. The vastly undocumentated LWS text file format isn’t a pleasure either.

I’d love to see a real and solid Lightwave LWS and LWO importer for Xith3d. So if someone liked to do this or ported the Java3d LWO/LWS importer to Xith3d this would be nice. I’d help where possible. Still there would be many things to add: new LW 7.5 features for example, etc. Soon there will be LW 8.0 and I’m going to add some of its features.