Import Lightwave object files (LWO) manually?

I’d like to render some (not too complicated) Lightwave object files (".lwo") with Java OpenGL (JOGL). Including textures.
With Java3D there’s a class named “com.sun.j3d.loaders.lw3d.Lw3dLoader” … which apparently does what I would like to do, but I don’t think I could use a Java3d scene graph, or could I?
My intension is to read the data of the Lwo-file into my own data structures which then get rendered via Jogl.

Later on I think I’ll want to read Lightwave scene files, too. The Java3d class does do this, I read. Again for the Java3d scene files which I can’t use for Jogl, can I?

Next to Newtek’s (=autors of Lightwave) description of their LWO-format there’s a downloadable code sample on the Lightwave site and then you get: “Sdk-Sample/sample/lwobject/” which contains several plain C files which demonstrate how to import LWO files in C. However it’s relatively complex (because LWO handles very much 3d stuff of course :wink: and it’s … C… uahh.

Is there a simpler format to parse than LWO is? (I could ask to get the files converted to another format.)

What’s your experience with import(ers) in general and such ones which fit nicley to OpenGL / Jogl ?

Check http://web.hypersurf.com/~sully/OpenGL/DemoBox.html

There are a bunch of loading demos there, possibly has what you want. Not sure about lightwave. It’s written using gl4java, so converting should be simple.

Thanks for the URL; I’ll have a look at.

I’ve taken a quick look at the VRML V2.0 text format, too. Looks to be much better parsable than LWO. It’s plain text so I could use GAWK … uhm … I mean the cool “Regular Expressions” API of newer Java versions.

Is VRML still alive? Does it have major drawbacks?

The new standard is called Xj3D isn’t it ?

Kev

[quote]The new standard is called Xj3D isn’t it ?
[/quote]
I don’t know unfortunately. I’m pretty new to 3d formats.
Is your mentioned Xj3D a successor to VRML ?

Are there any 3d format importers available at SUN’s site? I mean, like the Jav3d’s util classes, but more “common” ?

http://www.web3d.org/TaskGroups/source/xj3d.html

Seems X3D is the standard (and VRML sucessor). Xj3D is the reference implementation written in Java.

Kev