Sign in to follow this  
Nextgenneo

Finding camera view intersection w/ the X-Z plane?

Recommended Posts

Nextgenneo    122
Hi, I am trying to find out the 4 points that intersect with the X-Z from a camera. Drew up a little diagram to explain: The red dots are the points I want to find on the x-z plane. The black dot is the position of the camera and the black lines are the way its looking. Any suggestions or links to how this is done?? I have access to all the necessary information such as the view, projection matrix and the camera position, camera target. Thanks

Share this post


Link to post
Share on other sites
Wyrframe    2426
You have the camera position, look-at target, and both vertical and horizontal FOV, right? So use trivial ray-plane intersection down the edges of the frustrum.

Intersection; http://local.wasp.uwa.edu.au/~pbourke/geometry/

Share this post


Link to post
Share on other sites
MJP    19790
You'll just to figure out the corners of your frustum. This is easy to do...this tutorial shows you how to do it. You can just calculate the near or far corners, then from those you can get 4 rays by doing corner - cameraPos. Then you just have to do ray-plane intersection with the plane Y = 0, and you'll get the 4 points of intersection.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this