Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to visualize a BSP tree. To do this, I need to project an arbitrary euclidean plane onto a projection plane. I was thinking about calculating the intersections of the plane with the viewing frustum (in world space), then triangulating the resulting quadrangle and projecting the 2 triangles.

Is there a better way? For example, I thought about transforming the plane into the viewing space first, creating an ONB (from the transformed plane normal). Then I would simply stretch the quadrangle, until it is outside of the frustum and transform the quadrangle back into world space and send it into the rendering queue.

How should I got about shading the plane approximation (quadrangle)?

share|improve this question
"To do this, I need to project an arbitrary euclidean plane onto a projection plane" Why? – concept3d Mar 14 '14 at 1:14
Because a BSP tree is made out of euclidean planes. But other visualizations are also possible. – user1095108 Mar 14 '14 at 7:29
My point was you don't need any projection. – concept3d Mar 14 '14 at 13:18
Yeah, it is done by GL or DX, but in principle it could also be done by hand. You can edit my question, if you like. – user1095108 Mar 14 '14 at 13:30
The problem with visuallizing BSP trees in 3D is that they are deceiving, when the tree is complex you won't be able to differentiate nodes from subnodes, I recommend building a 2D graph with list of objects that each node contains, I have done both before and the latter was much more useful. – concept3d Mar 14 '14 at 13:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.