milkshape exporter

5f405a0105dc5408e44697caaf244818
0
danieljamestravers 101 Nov 05, 2005 at 23:24

Hi All.

Ok, heres my situation. I want to develop a 3D space application. I am going using opengl/glut/C or maybe C++ to create it. I want to create a quite simple spaceship in a modelling program.(probably milkshape). The creation of the spaceship doesnt pose that much of a problem to me. But the exporting of the final model is my biggest problem that i am thinking about at the moment. Heres what i would hope you can help me with.
1. I want to know what I need to be able to export my model into my opengl application.

  1. What is a better/simpler/easier modelling program for a newbie to use for modelling and also exporting the model? (3d studio max OR milkshape)

  2. What do I have to do (code-wise) to actually render it in my application? (if there is any good code examples out there on the net for rendering the model in my application. if you could give me a few web links i would be very greatful)

  3. Also, have yee any tips to help me out at all? Remember I am a newbie to this whole modelling application exporting thing. So please, try keep it as simple for me to understand as possible.

Thanks all in advance.

Daniel.

3 Replies

Please log in or register to post a reply.

B7568a7d781a2ebebe3fa176215ae667
0
Wernaeh 101 Nov 06, 2005 at 00:20

Hi there =)

  1. I want to know what I need to be able to export my model into my opengl application.

A programm that exports to a file format you know (see wotsit.org for a quite comprehensive listing), and an importer (… you usually can write this one yourself…) that loads the appropriate file into a memory structure your code can handle.

  1. What is a better/simpler/easier modelling program for a newbie to use for modelling and also exporting the model? (3d studio max OR milkshape)

Well, if its just about usability, and such, I’m quite in favour of Cinema 4D by Maxon (not all too well known, but still very good if you need a poly modeller).
But, considering you think of yourself as a newbie, I’d rather dissuggest buying 3D Max or any other expensive software package (… and I do hope you didn’t talk about a _illegal_ copy …) Either go for milkshape, which I think is quite uncomfortable to use, or use blender, which is even worse to get into, but free.

  1. What do I have to do (code-wise) to actually render it in my application? (if there is any good code examples out there on the net for rendering the model in my application. if you could give me a few web links i would be very greatful

Well, after you got the entire mesh in memory, just walk through all tris and push them with

glBegin(GL_TRIANGLES);
glVertex3f(x, y, z);  // Repeat this one for all vertices
glEnd();

Not fast, but good enough for testing purposes. Then, read up on VBOs, or display lists to get it fast. Also have a look at nehe.gamedev.net, I think they have a tutorial about mesh rendering as well.

  1. Also, have yee any tips to help me out at all? Remember I am a newbie to this whole modelling application exporting thing. So please, try keep it as simple for me to understand as possible.

Start small. Don’t try to get a pixelshaded doomy bone animated physically correct moving zombie on screen as your first test object, you will most probably fail doing so.
First, try with a box and a simple (maybe text based) format, so you can walk through your code by hand and see what every line does. I’d suggest sticking to the milkshape ASCII format at first.

I hope that helps.

Cheers,
- Wernaeh

5f405a0105dc5408e44697caaf244818
0
danieljamestravers 101 Nov 06, 2005 at 00:43

that did help Werneah. thanks.

F373d9db2d13fdef465493773a6affab
0
roxtar 101 Nov 06, 2005 at 04:24

One of the NeHe tutorials has exactly what you asked for. Hope that helps.