0
\$\begingroup\$

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)?

\$\endgroup\$
  • \$\begingroup\$ "To do this, I need to project an arbitrary euclidean plane onto a projection plane" Why? \$\endgroup\$ – concept3d Mar 14 '14 at 1:14
  • \$\begingroup\$ Because a BSP tree is made out of euclidean planes. But other visualizations are also possible. \$\endgroup\$ – user1095108 Mar 14 '14 at 7:29
  • \$\begingroup\$ My point was you don't need any projection. \$\endgroup\$ – concept3d Mar 14 '14 at 13:18
  • \$\begingroup\$ 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. \$\endgroup\$ – user1095108 Mar 14 '14 at 13:30
  • \$\begingroup\$ 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. \$\endgroup\$ – concept3d Mar 14 '14 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.