Dimensions in the OpenGL Matrix

Now I got a question I asked myself many times, but never somebody else.
Wich sizes (dimensions) should I use for OpenGL Models? Does the difference of size influent the speed? Is it a difference if I just use integers for my vertexes instead of floats?

For example in the Quake3 Engine, how big is a charakter is it (in OpenGL values of course) 0.1 , 1 or is it 10 . What

To what criterions should pay attention when I define my Models? (For Example a Landscape or some 3D-studio exported objects)

Thanx for any help

    • -== HECK ==- - -

The internal float point representation in most implementations is IEEE 32 bits float.

Most other formats need a conversion to float internally and will therefore be slower.

This general rule can have exceptions for special implementations. E.g. SGI came up with shorts for normals etc.

Also check out the FAQs on performance of you desired vendor.

I use floats for all coordinates and tend to keep models in the lower float range. Adjust your dimensions accordingly. E.g for a detailed human model you could work in milimeters or centimeters, but if you like to display those humans on the Titanic better model in meters. You got the idea.

I think, It’s better to use integer than float due to the floating point. But matrix are defined in a homogeneous system:
(x x x 0)
(x x x 0)
(x x x 0)
(0 0 0 1)
with homogeneous vector (X Y Z W) where w is often equal to 1. But remember that the vector is (X/w Y/w Z/w W). So you can always use integer with W = 1000 for exemple…But here is not the problem and i think it’s not a performent issu.

The only thing I could say, it’s to minimize the use of decimal values.

Sorry, for my English (I’m Spanish by birth, living in France and poor in English).

Regards.

Instead of calling type Vertex3f calls, your proposal needs Vertex4i. Integers have the same size as floats so you need 4/3 times the data. That is a performance issue.
And the additional internal conversions to float cost some more.

Relic,
you talked about centimeters and meters. Can you equate the OpenGL measurement 0.1, 1 and so on… with these physical lengths? And what if I cant say what size my models have in reality, because they dont exist ?

To your second post:
I’ m not using glVertex4i(); i’m using glVertex3f(); If i understood right, all the Vertex definitions will be converted internally to floating point values?

>>you talked about centimeters and meters. Can you equate the OpenGL measurement 0.1, 1 and so on… with these physical lengths? And what if I cant say what size my models have in reality, because they dont exist ? <<

You can choose every unit behind those values you want. Nanometers or parsecs doesn’t matter. The point is the relationship between your models and the whole world you want to display.
If you have a huge terrain it does not make sense to specify it in milimeters because you loose precision with bigger floats. I think floats have the best precision around 1.0, if I remember correctly.
My point is, to specify the values in a reasonable range. Reasonable means in a nice relationship to your biggest necessary value in the world (and meaningful to the programmer and/or modeler who works with the data.)

I really don’t know the Quake dimensions, but from the levels I know, I would specify myself in meters which is 1.96. (don’t mess with me. ) Pretty understandable if I shoot someone with the railgun 200.0 units away.

The glVertex4i was an answer to Sancho. Don’t do that. Current geometry hardware prefers three or four floats.