Advertisement

Perspective corection

Started by October 23, 2002 03:48 PM
5 comments, last by Raduprv 22 years, 4 months ago
I want to make an isometric engine, and, from what I seen, I have only 2 options: Perspective correction (not exactly good for an isometric view), and orthogonal view. The seconds seems morse useful, however, I DO need perspective corection for the x axis. I THINK that this MIGHT be acomplished with some matrix transformations, etc. Basically, is there anyone who knows how to disable the perspective corection for y and z, and let it on on my z axis? Thank you very much, Radu. Which is worse? Ignorance or apathy? Who knows?! Who cares?!
Ok, this is just one idea...

OpenGL uses the projection matrix to transform a 3d vector on a 2d vector. Ortho and perspective are just kinds of matrix...

I think that you can give your own matrix and these one can do what you want!!!

Filami

Techno Grooves
Techno Grooves
Advertisement
What do you mean by perspective correction ? You want to correct textures ? If so, you don''t need any correction at all in orthogonal view.
I mean perspective corection for triangles, not for textures (besides, if the triangles are smaller, the texture on it will look smaller, of course).
What I mean is this:
I have 2 planes: The first plane is where the camera is, and it is perpendicular to the ground.
The second plane is, say, 20 units (meter, inches, whatever) away, parallel with the first plane, having the same size (width and lenght) with the first plane. Just like the front and back sides of a cube.
So, naturally, in a perspective mode, the farther plane will look smaller, on both x and y (depending on the distance, field of view, etc.)
Now, I want the farther plane to look smaller only on X, but have the same lenght on Y (visible lenght, I mean).
So, I want perspective corection only on X.

Filami: I was thinking of that too, but math (especially matrices) is not exactly my strong point...
I finally solved my problem...
Turned out that Ortho was what I needed, in the first place, I just had to find a proper angle, and set the viewing volume properly..
okay I see what you want to do now. It can be done using custom matrices just like Filami said. It's the first time I see an application that uses such projection.

BTW, what you're talking about is "perspective division", not "perspective correction".

I'm not sure that glOrtho can do what you want. With glOrtho, both X and Y coordinates will be orthographic. That is, you can't have an orthographic X with a perspective Y for instance.

[edited by - vincoof on October 28, 2002 1:52:26 AM]
Advertisement
No, Ortho is what I really wanted, I just missed the fact that I can rotate on the X axis... :D
Basically, what I want is the standard 45/70 degrees isometric engine
Thanks all for the help.

This topic is closed to new replies.

Advertisement