3D models: free source code (OpenGL/GLUT)?

Hi!

I am looking for some free 3D-models written in OpenGL/GLUT. I would like some industrial objects like pumps, tanks, valves, thermometers, level-indicators, speedometers, fans an so on.

Do you know of any code libraries with free sourcecode for such 3D-models?

-Written in OpenGL/GLUT, of course (not 3ds files).

Thanks!

Best regards,
Torbjørn

i’m presuming you want the opengl C / C++ code for whatever model?

if that’s the case create a model of what you want yourself and use a program like 3d exploration to convert then to the code - it outputs display lists i think…

Allan

Yes, I’d like C/C++ code, that’s right.

Do you mean that I should build my models myself using 3DStudio Max or other program, and then generate source code?

Or should I download existing models and generate code from them? If yes to this - do you know of a nice library of models?

Thanks again :slight_smile:

Best regards,
Torbjørn

Sorry, but I don’t think you will find a library of premade opengl or glut objects.

Maybe you could be the first person to do it!

What most people do is to get the source code for model loading routine and just load it in without having to convert the model. There are lot’s of tutors on loading 3DS, OBJ, and other formats.

There is a program that will convert most object formats into other formats, supports converting the object into a C file in the form of vertex data. But you would still have to write a routine to take that vertex data and make the object.

Originally posted by torbjorn:
[b]Hi!

I am looking for some free 3D-models written in OpenGL/GLUT. I would like some industrial objects like pumps, tanks, valves, thermometers, level-indicators, speedometers, fans an so on.

Do you know of any code libraries with free sourcecode for such 3D-models?

-Written in OpenGL/GLUT, of course (not 3ds files).

Thanks!

Best regards,
Torbjørn[/b]

Am I wrong, but I remember 3DExporter ???

well, If I get my Ass moving, I might create a small MFC program, that will allow you to load 3DS object/s and save vertices/faces as bunch of data in regular .txt file … You can later just read each #, 1-by-1 and put into array, and than display it …

The question is WHEN WILL I MOVE MY AZZ TO DO IT . ? .

Thanks for valuable input, folks :slight_smile:

My challenge is that I need to dynamically change the shape of some of the objects (not all).

One example is that I would like to show a temperature bar with changing temperature…

But I guess I could use static models and draw some additional OpenGL-kode on top of them?

Torbjørn

well to do that, you will need to load 3D objects with animation …

Depends on how you have to change them really - do you mean change the scale, orientation and position? or get a model to perform an action such as walking?

the thermometer example could be done by creating / using a model with a hollow cylindrical centre and using GL to generate a cyclinder model yourself - position them correctly and you could create the effect of the temperature getting hotter.

if it’s the second option i’d suggest using MD3 files - there quick and easy to get going and have built in animations for walking and such like

cheers

Allan

You can build those simple objects with glu/glut primitives.

Best way to start is with a piece of graph paper, draw out the object you want and what primitives would be needed to make it.

example:

// temperature bar.

glPushMatrix();
load_texture_with_temp_scale_marks();
Draw_quad_in_the_shape_of a rectangle();// place to put our temp scale image.

glColor3f(1.0, 0.0, 0.0); //The color red
gluCylinder( c_obj, 1, 1, hight_of_cylinder, 8,8);// Adjust hight of cylinder to relate to tem change.
glPopMatrix();

Easy euh?

Originally posted by torbjorn:
[b]Thanks for valuable input, folks :slight_smile:

My challenge is that I need to dynamically change the shape of some of the objects (not all).

One example is that I would like to show a temperature bar with changing temperature…

But I guess I could use static models and draw some additional OpenGL-kode on top of them?

Torbjørn[/b]

Thanks, guys!

I’ve been away for some days now, but I’ll start making models now!

Thanks again :slight_smile:

Torbjørn