RE: [Plib-devel] Nested LOD selectors almost works...
Brought to you by:
sjbaker
From: Vallevand, M. K <Mar...@UN...> - 2000-04-28 19:37:29
|
That's it! Yes, all of my tiles share the same origin. A simple tree looks like this: root |-LOD Selector |-branch | |-LOD Selector | | |-branch | | | |-1x1 tile at (0,0) | | | |-1x1 tile at (0,1) | | | |-1x1 tile at (1,0) | | | |-1x1 tile at (1,1) | | | | | |-2x2 tile at (0,0) | | | |-LOD Selector | | |-branch | | | |-1x1 tile at (0,2) | | | |-1x1 tile at (0,3) | | | |-1x1 tile at (1,2) | | | |-1x1 tile at (1,3) | | | | | |-2x2 tile at (0,2) | | | |-LOD Selector | | |-branch | | | |-1x1 tile at (2,0) | | | |-1x1 tile at (2,1) | | | |-1x1 tile at (3,0) | | | |-1x1 tile at (3,1) | | | | | |-2x2 tile at (2,0) | | | |-LOD Selector | |-branch | | |-1x1 tile at (2,2) | | |-1x1 tile at (2,3) | | |-1x1 tile at (3,2) | | |-1x1 tile at (3,3) | | | |-2x2 tile at (2,2) | |-4x4 tile at (0,0) However, the bounding sphere for each tile is in the correct location. The solution is what? Insert a transform branch above the LOD Selector? A transform branch in place of the regular branch? Regards. Mark K Vallevand ma...@rs... Outside of a dog, a book is man's best friend. Inside of a dog, its too dark to read. - Groucho > -----Original Message----- > From: Steve Baker [mailto:sjb...@ai...] > Sent: Friday, April 28, 2000 1:37 PM > To: pli...@li... > Subject: Re: [Plib-devel] Nested LOD selectors almost works... > > > "Vallevand, Mark K" wrote: > > > > Nested LOD selectors almost works. > > > > In my program, I recursively partition a tile into sub-tiles at > > at higher level of detail. If a tile can be partitioned, I create > > a LOD selector with 2 kids - one for the lower level of detail > > tile and a second one that is a branch containing the higher > > level of detail sub-tiles. Every thing works together really > > nice. The tree seems to be correct, all the leaf nodes at all > > levels of details are correct, and their bounding spheres > > have the correct center and radius. Lots of brute force > > debugging and print statements makes me believe things > > are correct. > > > > But, the same debugging and print statements show me > > that the range calculated in the cull of each LOD selector > > is the same for each selector. As I move the camera > > around the terrain, the range changes and I get different > > culling, but it is funny because the range calculated seems > > to be wrong. > > Hmmm - the LOD range is measured to the local origin of the > model...so could it be that your terrain tiles all share > a common origin? > > > So, my questions... > > How is the range calculated when culling to the viewing fustrum? > > I don't calculate the range. I transform the bounding sphere > center using the current modelview matrix and compare it to the > plane equations of the six clipping planes that make up the > view frustum. > > -- > Steve Baker http://web2.airmail.net/sjbaker1 > sjb...@ai... (home) http://www.woodsoup.org/~sbaker > sj...@ht... (work) > > _______________________________________________ > plib-devel mailing list > pli...@li... > http://lists.sourceforge.net/mailman/listinfo/plib-devel > |