Jump to content
  • Advertisement
Sign in to follow this  
kreaThor

OpenGL projection matrix with more than one vanishing point

This topic is 4620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I saw some very interesting pictures of a cube drawn by projecting it with a perspective projection with more than one vanishing point. Can this be done in OpenGL? If yes, how can the projection matrix be calculated?

Share this post


Link to post
Share on other sites
Advertisement
It is not fully clear: The "standard" perspective projection has 1, 2, or 3 vanishing points visible, dependend on how the viewed object is oriented and positioned w.r.t. the cam (to be precise: the projection plane).

However, dozens of kinds of (also perspective) projections exist. Unfortunately due to the fact that it could not be modeled using homogeneous matrix math most of them could not be simulated by OpenGL. Obviously no projections w/ curved projectors could be done. Also no "inverse" projection could be done (as far as I know). EDIT: Projections w/ curved projection planes could be done but only approximately.

Whether the projections you have in mind could be done isn't answerable as long as you don't name them. But I'm not confident.

Share this post


Link to post
Share on other sites
ok U guys thanks. I will delve some more into the topic, though I understood from haegarr that it can't be done in opengl.

Share this post


Link to post
Share on other sites
Quote:
Original post by kreaThor
ok U guys thanks. I will delve some more into the topic, though I understood from haegarr that it can't be done in opengl.

Notice please that I said that I'm not _confident_ that it will be possible, but due to lack of knowledge of what you've actually found I could not definitely say "yes" or "no".

The standard 1/2/3 point perspective projections work simply by unaligning the projection plane, as the site following Sneftel's link above shows. As a real projection mode, the unalignment is done by the projection matrix. However, the _effect_ is the same as could be seen if the objects are unaligned. E.g. take a wire-cube, and place the camera in front of it. What could be seen is a single vanishing point. Changing the heading of the cube by 45 degrees, and you see 2 vanishing points.

I somewhere have seen projections with more than 3 vanishing points. As far as I remember, these projections cannot be simulated by OpenGL.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!