PDA

View Full Version : Access to Lightwave Model



bostonvr
07-24-2008, 02:35 PM
So I buy lightwave and was to use my cool blob in a game I want to write.

How can I access the model information and say render it in OpenGL?

Is there a way to access the model to view the polygon configuration, texture map ect?

I am looking for a map to the file format for a model or scene where the structure and texture of the model is laid out and can be converted for some kind of use.

Does anything like this exist. How does a game maker or applications developer use Lightwave to model stuff for your app?

Jim

Brunson
07-24-2008, 02:48 PM
...
I am looking for a map to the file format for a model or scene where the structure and texture of the model is laid out and can be converted for some kind of use.

Does anything like this exist. How does a game maker or applications developer use Lightwave to model stuff for your app?

Jim

It seems like you're asking some very broad questions that can't be answered very simply. People go to school, some for years, to learn game development. Its complicated. As for the quoted text, however, I believe game developers usually use the .obj format for game models. You can export models in LW as .obj format. I don't really know what you mean by a "map" of the file format, but you can open .obj files in notepad and it gives a full listing of all the vertices and polygons of the model. But, you're not going to write a game overnight. There's a lot to learn about game modeling and it takes a lot of time and hard work.

bostonvr
07-24-2008, 04:40 PM
Actually the question is broad for a reason and thanks for your reply. You mention that obj files have the information. This is super. As far as writing the game, the physics models are completed and I have primitives and things work.

I need the grooving sculpture that could much easily done in a modeler than by hand and code. If there were a script to read the model or scene files in Lightwave, then I could grab what I want or need and hard code it into my game or as a data file to be loaded when called. Everything is static as far as the models themselves, (no moving joints and such) so being able to produce a nice looking widget in Lightwaver and then incoorporate it into the game is where I am headed.

I am not looking for information on how to make a game. I am looking how I can open a model and read it to then convert it into a model in opengl. As far as map, I am suggesting the follow:
Model object is a binary file. First 50 bytes are junk. Next 6 bytes are the length of the next data set, being total number of obects in data set and then following is the length of the first object. So say the next 100k of data is the first obejct, The next set of information descibes the color or image data mapping and how it is mapped over that object........... This starting to make sense?

Does exporting to obj files loose anything during the export?

Lightwolf
07-24-2008, 05:13 PM
This starting to make sense?
Yup. The file formats used by LW are explained in the SDK, including sample code:
http://www.newtek.com/lightwave/developers/

Does exporting to obj files loose anything during the export?
Yes. I don't know if it makes any difference for you. I suppose that depends on what your engine can support.

Cheers
Mike

warmiak
07-25-2008, 05:11 PM
You would be better off writing a custom exporter as a Lightwave plugin.
It is much easier since you have a lot more options at that level (the whole Lightwave SDK API - including stuff like animation, IK) as opposed to a binary file.

If you look at commercial game engines , this is how these things are handled generally.