dim3 Perspective - How does Quake/UT do it?

I've been playing with the perspective on dim3, and comparing it with other games. One complaint has been that the sky globe doesn't move right.

Well, I d/l'd and look at a bunch of demos, and it seems Quake/UT have some kind of strange "look" rotation; It basically fish-eyes the persepective. For mine, things farther away move faster (except the sky, there's a bug there) when looking. In Quake III, for instance, everything, no matter what distance, moves the same speed when looking up.

Example: If you were looking at two fences, in dim3, the farther fence would move down faster when looking up. In the other games, they move at the same rate.

If anybody here has looked through the Quake ||| source, are they faking the looking? Or are they using the gl perspective matrixes in a different way then I am? To me, Quake looks funny, but to everybody else on the planet, mine will look funny

Basically, trying to get a handle on what they are doing. This could easily be something I don't know or something wrong with my numeric system.

Just guessing but, on most FPS games, when you rotate the camera it is centered at the point of rotation, so the effect is the same as in a QTVR movie. Maybe you are rotating your camera having its center behind/in front of the rotation center? (that is, you also have a translation so your camera is actually moving "in the surface" of a sphere?)

PowerMacX Wrote:Just guessing but, on most FPS games, when you rotate the camera it is centered at the point of rotation, so the effect is the same as in a QTVR movie. Maybe you are rotating your camera having its center behind/in front of the rotation center? (that is, you also have a translation so your camera is actually moving "in the surface" of a sphere?)

Well, that solves one long standing problem, thanks much PowerMacX. Sometimes you work in a program for so long and can't remember what you did or why certain parts are certain ways, that's why this board is so helpful sometimes.

ggadwa Wrote:I've been playing with the perspective on dim3, and comparing it with other games. One complaint has been that the sky globe doesn't move right.

Well, I d/l'd and look at a bunch of demos, and it seems Quake/UT have some kind of strange "look" rotation; It basically fish-eyes the persepective. For mine, things farther away move faster (except the sky, there's a bug there) when looking. In Quake III, for instance, everything, no matter what distance, moves the same speed when looking up.

The fish-eye effect is probably due to setting a gluperspective with a large FOV (like in photography), can be obtain with glFrustrum and math (trigo).

The rotation speed (perspective speed by the viewer) is faster for thing away (faster in angular unit).
But at a certain distance all things could be considere "infinity", typically the skybox is one of them in games.
You could find soem skybox implementation on internet, but the simplest one is just a box (3d square) with texture on side drawn at a very big distance (ie. 100 times the max distance in the game).
For the skybox you have (i'm not expert, i just implement one for a demo) :
- draw the skybox first
- to enable hidden surface draw (because the viewer is in the box)
- alway draw it center to the camera (not translation, just rotation)
- disable temporaly the depth buffer

The problem you'll face is the distance according to the zMax fixed with gluperspective of glFrustum. You can avoid this by changing the zMin/zMax only for the skybox then switch back to the normal zmin/zmax for the other objects.