Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

edwinnie

arbtrary world point on viewplane??

This topic is 5277 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

hihi, i was trying to find out how to compute an arbitrary point on a camera view plane. given that the camera moves around (first person camera), and the 4 world coordinates of corners of the view plane can be found by using the model view projection inverse. But how can i find an arbitrary point on the view plane, that is related to the window screen coordinates, lets say (325,225), without using the inverse matrix?? so far, i based on the 4 corners, i could get a plane normal and plane reference point. thx! Edwinz

Share this post


Link to post
Share on other sites
Advertisement
The camera near plane isn''t flat, however it is at a fixed distance,

divide the total pov (in a dimension, x or y) by the number of pixels in that dimension + 1,

calculating the position of a pixel can then be done by multiplying the pixel''s position + 0.5 by the degree per pixel value,

convert this value to radiants and convert it to a normal and multiply that normal by the near plane distance.

The pov variable is the y pov in degrees.
I am not sure of one thing, whether the pov the total pov or half the total pov (so there are pov degrees up and pov degrees down), you''ll have to sort that out, that wouldn''t be a problem i''d say.

Share this post


Link to post
Share on other sites

  • 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!