Jump to content

  • Log In with Google      Sign In   
  • Create Account

Clipping a plane to the view frustum


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 metsfan   Members   -  Reputation: 654

Like
0Likes
Like

Posted 03 October 2012 - 04:04 PM

Hello all,

I am currently trying to accomplish what the title states: Take a plane, represented as a 4D vector, and clip it to the view frustum so that it forms a bounding area. Here is what I am thinking, I just want to make sure this make sense:

1. Transform the view frustum's 6 planes by the camera's view matrix.
2. for each frustum plane, find the intersection point between the current frustum plane, an adjacent frustum plane, and the plane I am looking to clip. Assuming that they meet at only one point, I would recored this point and move on.
3. Wind the points found to form a bounding area.

This seems like it's a bit overcomplicated and contains a lot of math (such as transforming each view frustum plane). Does this make sense? Is there any easier way to do this?

Thanks.

Sponsor:

#2 Lauris Kaplinski   Members   -  Reputation: 841

Like
2Likes
Like

Posted 04 October 2012 - 07:32 AM

I think it will be easier to take all edges (i.e. line segments) of frustum, find the intersection points of these and your plane (you have 0 or 1 intersection point for each segment) and then wind those points.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

#3 metsfan   Members   -  Reputation: 654

Like
0Likes
Like

Posted 04 October 2012 - 02:27 PM

I think it will be easier to take all edges (i.e. line segments) of frustum, find the intersection points of these and your plane (you have 0 or 1 intersection point for each segment) and then wind those points.


This is a helpful improvement, thank you.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS