Re: [Plib-devel] Nested LOD selectors almost works...
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2000-04-28 18:41:14
|
"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) |