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.
Thoughts?
[>] Brian
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.
Thoughts?
[>] Brian
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?)
Ah ha ... there's the effect. Can always learn something new! I'm going to have to move my translates out, but that's a minor fix.
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.
[>] Brian
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Perspective Screen to Obj Coordinates Mapping Question | WhatMeWorry | 5 | 7,562 |
Feb 17, 2011 05:40 PM Last Post: Holmes |
|
| getting the perspective i want | dave05 | 15 | 5,249 |
May 9, 2006 10:51 AM Last Post: unknown |
|
| Perspective View Question, (GL_PROJECTION Matrix), and GUI | hangt5 | 3 | 4,713 |
Sep 11, 2005 11:17 PM Last Post: hangt5 |
|
| SDL (possible dim3) Recommendations from Current Users | ggadwa | 10 | 4,176 |
Jul 8, 2005 12:09 PM Last Post: ggadwa |
|
| 2D to 3D and back (Ortho and Perspective) | Phate | 5 | 4,689 |
Nov 30, 2003 10:56 AM Last Post: AnotherJake |
|

