Which selection is better?

As you know, we can use from the 3D modles created with other softwares and simply load them with their textures. So it seems that some features and functions of OpenGL aren’t useful in the current games.As an example why do we need to use from the multitexturing while we can simply load a 3D model? --I know that we need to use from the OpenGL functions to load our model;But we can download a loader function from the net and so don’t need to write that loader function as well.
When should we simulate our scene with OpenGL and when should we load a 3D model?What about the quality?And in general, which selection is better:1.Creating a scene with OpenGL functions and simulating the effects with OpenGL-multitexturing, static shadows, etc-Or loading a 3D model such as MD2?
And i know that we should load the complicated models and shoudn’t create them with OpenGL–It’s to hard to simulate them with programming.But what about the walls?What about the static things?..
Thanks,
-Ehsan-

you need multitexturing anyway. with your modelloader or opengl functions! think of a terrain of 100meters…how would you map a texture on it? 4069x4096 or what? i you load a model you also have to create shadow maps and stuff like that. i don’t understand your question in this case.

if you have really complex models you need to load a model from another modelling app. watch this image (working with friends on this game): – how would you generate this modell in opengl??

h.stony

This thread has me very confused, I don’t understand what you guys are talking about?

OpenGL is a software interface to the graphics hardware… its an API (a graphics library).

3D models are a collection of points/vertices/textures/etc that must be sent to the graphics hardware via some interface (OpenGL and DirectX being the most commmon).

You mentioned MD2, which is Quake 2’s file format. It stores 3D modeling information but can not draw it. You can draw MD2 using OpenGL if you like (see http://tfc.duke.free.fr/old/models/md2.htm)..)

So like I said, I am confused.

i think his question was: is it better to code the object directly with opengl functions or using modelloaders

is this the question? you can’t say what is better. it depends on the situation. essential it’s the same…with a md2 loader you use the data of the file? what is the question exactly?

i think his question was: is it better to code the object directly with opengl functions or using modelloaders
Yes. My meaning is that quote–Thanks for your assistance :wink:

Ok. I remember that i sent a mail to Dave Astel about this topic. Fortunately i found that mail-This mail refers to 6 months ago.here’s my question:
Dear Dave
for creating the graphics of games, we can use from a file to give the information of an environment. here’s my question: Are the graphics of games indivisual from other topics such as virtual reality and physical modeling?can we create the graphics of our game first and then in the next stages add the properties to them?
another question is that which selection is better: 1)creating the environment with the softwares such as 3dMAX and import them or 2)using the OpenGL coding and a file to draw the objects–as NeHe have used from this manner for creating a building.
I’m looking forward to hear you suggestions
…Ehsan

And here’s his response:

At the most basic level, all games just read data from a file. The data in the file is generated from some external program. Those are about the only generalizations you can make. Which program generates the file, and how a game uses the data are questions that are answered according to the needs of each individual game. There is no wrong answer.

My question is about the bold text.As an example i can use from the OpenGL to create the building or i can use from a model and load it.For none-complicated models such as walls and buildings–Assume that we want to create a city like the game Midtown Madness-i have two option:1. create a city and load it-That is simple- Or use from a text file and OpenGL programming to make that city?What about the quality? What about the speed?
-Ehsan-

“is it better to code the object directly with opengl functions or using modelloaders”

Again, you are missing the distinction between where the model generation stops and where OpenGL begins.

OpenGL has zero to do with model generation. The points/objects/etc that you pass to OpenGL (and OpenGL then passes to the hardware) must be created before OpenGL ever enters the picture.

There are no openGL functions for generating models. It (OpenGL) is only an API to the hardware.

Now, if you are asking if it is easier to use a modeling package to create a model or to do it by hand… well of course it is faster to use the package. Someone already spent hours coding up functionality that makes model generation easier.

However, those modeling packages that you can use to create the models most likely use either OpenGL or DirectX in order to send the models to the hardware so that they can be displayed to you.

Take Maya or 3DMax, I believe they are both coded using OpenGL as a graphics library. 3DMax makes the points/vertices/textures/etc and OpenGL displays them.

Well.But what about that NeHe lesson?That lesson has used from a text file and OpenGL coding to build the walls :confused:
In my new project i should create 3 small streets.The quality is too important in this project.So what’s your suggestion? Coding them directly or loading a file?
-Ehsan-

I am sorry, I do not understand what you are trying to say (not trying to be rude, your english is WAY better than me trying to converse in your native language).

You said… “That lesson have used from a text file and OpenGL coding to build the walls.”

So basically you loaded the model (the walls) from a file and then drew it with OpenGL (you did not use OpenGL to create the model).

You also said… “Well.I have used from MD2 models many times.I can load them”

What do you mean? You loaded them into what?

“So what’s your suggestion? Coding them directly or loading a file?”

Either works just as well, it makes no difference when it comes time for OpenGL to draw the model.

However, like I said before, it will take you MUCH longer to code up a complex scene by hand then it will to use a modeling application. Thats what the applications are for, to facilitate (and speed up) the modeling process.

If you are concerned about performance it is how you use OpenGL to display the model that needs to be investigated. But this happens after the model has been generated (either from file or by hand) and stored in your application.

Thank you.

This question is impossible to answer definitively, as there are inevitable trade-offs in all design decisions. As already poined out, there’s no wrong way; it’s a matter of balance for your particular application. So the trick is finding a way to structure your tools and formats to make creating a game using your engine as pleasant and efficient as possible. Obviously, what this entails is going to vary greatly from one engine design concept to another, as each concept can differ vastly on many fundamental levels.

And while interesting, questions related to object persistence would probably be better suited to a game engine design forum. Folks here like to keep a clear distinction between tool sets/file formats and OpenGL. I hear GameDev and Flipcode are good for this sort of thing :wink: