   Frustum Plane Extraction
  Hi,I managed to calculate the six frustum planes fromthe combined matrix (modelview and projection)using this approach:http://www.cs.otago.ac.nz/postgrads/alexis/planeExtraction.pdfBut in which space are the resulting planes?I have the feeling they are in camera space.And another thing I don't really understandis that the constants of the planes arealways in a range [-1,1] although gluProjectionwas called with znear = 0.1 and zfar = 200.0.I need the planes in world coordinates so Ican clip my oriented bounding boxed (which are also in world coordinates).Anyone got this working?Help is really appreciated!   
Quote:in which space are the resulting planes?Read the section "Supporting Non-Identity World and View Matrices".Quote:the constants of the planes arealways in a range [-1,1] although gluProjectionwas called with znear = 0.1 and zfar = 200.0.The znear/zfar values that you pass to gluProjection() are in view space.The values in the range [-1, 1] are normalized device coordinates - the coordinates you get after perspective division. See here, FAQ 9.011.   ;  Does this mean I get the plane normals in camera coordinatesand the constant in normalized device coordinates?   ;  From the article:Quote:If the matrix M is equal to the combined projection and modelview matrices, then the algorithm gives the clipping planes in model spaceso your planes should be in model space.If you want the planes in world space, you'll need to just use the view and projection matrices. If you are using your own matrices, this should be easy: the combined matrix will be: Projection * View instead of: Projection * View * World.If you are using OpenGL's matrices, it will be more difficult because the world and view matrices are concatenated into one matrix.   ;Quote:so your planes should be in model space.Ahhh thanks!! I somehow missed that sorry.I guess in this case I'll skip this plane extraction approachand just calculate the frustum from my camera vectors and thewidth/height of the near and far clipping plane. This wayI get the planes in world coordinates. Thanks for your help!;Quote:Original post by SchnullaQuote:so your planes should be in model space.Ahhh thanks!! I somehow missed that sorry.I guess in this case I'll skip this plane extraction approachand just calculate the frustum from my camera vectors and thewidth/height of the near and far clipping plane. This wayI get the planes in world coordinates. Thanks for your help!I haven't read the whole thread carefully, but you should be able to use that algorithm to generate the frustum planes in whatever space you need them in (i.e. by using an appropriate matrix as input).If you're thinking that you need to abandon that algorithm (which is standard and works very well) and work up your own ad hoc solution, that's probably just because you're misunderstanding something about the article. As such, I'd recommend reading the article again and taking another run at it (and asking questions here as needed, of course :).   