Game Development Community

dev|Pro Game Development Curriculum

Plan for vincenzo panella

by vincenzo panella · 05/09/2001 (8:17 am) · 2 comments

New ideas how to implement a fast , dynamic visibility engine, discarded bsp , and octree
traversal seem tricky to get z sorted nodes correctly ordered along the line of sight of the player's position ,so i went across this solution , i need to do some code to see how good these ideas are , but for now , i'm conctentrating on college exams, when they'll be over i'll focus full time on
calculating the correct number of rays to shot
cause this seems to be the biggest problem for now, anyway i've written some ultra-optimized math routines for dealing with virtually anything in 3d , as we say in italy , who'll live will see....

About the author

Recent Blogs


#1
05/09/2001 (4:38 pm)
There's no direct way to pull sorting information from an oct-tree itself, like a BSP does. You could have mini-bsps in each oct-tree leaf node - which would help with alpha sorting - but not at the inter-node-level.

One thing you might do, an idea that just popped into my head:

Create (and cache) a couple planes from the top and bottom sets of points from the node's bbox. Test viewer relatioon to these planes (above/below, distance). Now, if the player is above being centered between these planes, you know one of the bottom 4 points are going to be farthest. One of the top 4 is your candidate if your below it. If you're dead center, you'll have to test all eight.

Doing the plane testing will most likely be more expensive than just testing distance to all 8 points of the bbox... but hey, it sounds cool. :-)

In any event, find the furthest point of the bbox of each visible node. Throw each of these into an array, with a pointer to the node it's representing. Sort this array via your favorite algorithm, and draw. Viola...

If you sort so as to have closer nodes drawing first, you could also do some occlusion testing. This would help alot, since oct-tree's have no inherent way of doing this, like BSPs do.
#2
05/10/2001 (2:28 am)
what you say is true Brian, there's is non z sorting information along the octree node and a bsp in node won't help to sort all the polygons traversed, i have used a 3d hash grid and mapped all the level's triangles int this grid then i trace a ray , tracking every box the ray pierce this assure you are walking correctly along the z axis of the ray then i have inside the node a bsp , the bsp is orderer by the size of the largest polygon which is agood candidate for stopping the ray ,anyway thanks for your ad