Another assignment this week was to implement BSP tree structure. We started by reading material on what BSP trees are and what they can be used for.
At first we tried to implement the choose-dividing-polygon algorithm presented in:
- http://www.devmaster.net/articles/bsp-trees/
Unfortunately we ran into an infinitive loop. Our simple solution was to create a "new" algorithm that only optimized for equal sizes of front and back sets. That is, we ignore how many splits our algorithm creates - this could give some serious performance issues, but at this point we have chosen to ignore this fact and we will fix it if it becomes a problem.
We also had to test our BSP tree implementation, for this we used the guide presented in:
- http://www.aula.au.dk/courses/CGDF07/document/BSP-test.html?cidReq=CGDF07
We had some issues understanding how the drawing should work, but after some hours of trail and error we finally figured out how to properly draw back-to-front.
Another issue we still have is that textures aren't drawn fro BSP nodes (even if we use VisitGeometryNode(...) inside VisitBSPNode). We will ask for help tomorrow at the workshop.
No comments:
Post a Comment