View Full Version : How to keep vertical line straight?
08-02-2003, 01:56 PM
I'm a beginner in the field of Augmented Reality. Now, I'm stuck with my project. Can everybody tell me how to keep vertical line straight in perspective mode when the virtual camera is being pitching or yawing? Many articles mention that it is a classic representation for architectural rendering. I don't want to use glortho because there is no perspective in this mode. Thanks a lot!
08-02-2003, 08:51 PM
All straight lines remain straight in OpenGL projection.
In a classic Architectural rendering ALL vertical lines remain vertical and parallel.
This would be like a Duke Nukem style rendering. The easiest way to do this is don't pitch or roll the eye. A pitch becomes a shift of the top and bottom of your frustum in the projection specification rather than a viewing multiplication. Obviously you can't roll the eye but you can yaw it (actually it's heading).
I don't see why you'd want this in augmented reality, since the objective is to match a virtual representation to real world projection. I'd expect your first concern would be introducing spherical aberration to match your camera lens (if you have one, otherwise correct for your display), although good lenses keep this to a minimum.
P.S. you probably could roll with no problems. Your verticals would roll but remain parallel. Hmm... it would roll around eye x,z = 0,0. The more you pitch the more confusing the roll would be.
You probably want to do a post projection roll, translate the screen center to 0,0, roll then translate back, and of course this is all post multiplied on the *projection* matrix. (If you want to support roll)
[This message has been edited by dorbie (edited 08-02-2003).]
08-03-2003, 01:42 AM
"You probably want to do a post projection roll, translate the screen center to 0,0, roll then translate back, and of course this is all post multiplied on the *projection* matrix. (If you want to support roll)"
This seems to be a good point. However, in my case, I just want to remain parallel vertical lines to support pitch and yaw. I don't need to use a real camera in my project. So, my problem is how I can do the perspective camera correction to support pitch and yaw. I also found Discreet released the "3ds max Design Extension" to solve this problem in 3DSMAX 5.0.
[This message has been edited by zsunshine (edited 08-03-2003).]
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.