We used a quadtree-based approach to tiled landscape rendering in our application. We achieved good performance by using SwitchNodes to manage what tiles are displayed after culling the quadtree against the view frustum. We essentially took a static LOD approach: the quadtree held 4 levels of detail and we used a SwitchNode to display tiles. This is much faster than adding/removing BranchGroups. You can probably achieve the same thing by toggling the display bit on the RenderingAttributes of a Shape. Our LOD scheme worked like this:
1. Intersect the quadtree against the camera's viewing frustum. This yields all the terrain tiles that are currently visible. 2. take this set of tiles and find the distance to the camera. We used this to determine at what level of detail the tile should be displayed at. Tiles further away displayed at a lower LOD than closer tiles. 3. Use this set of tiles to determine what you make visible using the SwitchNode. 4. Repeat for the next delta in position of the camera. Note you can compile the BranchGroup for each tile and pickup some optimizations there since they dont change with this method. This method worked pretty well, the biggest problem was cracks between tiles that had different LODs. I got around this by adding a large quad underneath the terrain that was an earth color, this made the cracks much less noticeable than when u you could see the sky. Not perfect but easy to code. ----- Original Message ----- From: "Corysia Taware" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 14, 2002 1:27 PM Subject: Re: [JAVA3D] Landscapes, again > This weekend I was reading "Game Programming Gems II" and in it there > was a chapter on tile-based terrain. It was very similar to what I've been > trying to figure out what to do. The author stated that this method could > potentially be faster than ROAM or VIPM methods. I haven't had the > opportunity yet to code up a prototype. > > ----- Original Message ----- > From: "Lan Wu-Cavener" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Monday, January 14, 2002 11:14 AM > Subject: Re: [JAVA3D] Landscapes, again > > > > Hi, all: > > > > I am also facing the same problem. I have tried the strategy to devide the > > data into cells. But the performance is not appealing due to detaching and > > re-attaching BranchGroups while navigating through the scene. > > I have read quad-tree algorithm but I don't know how it can be applied. > > What is ROAM? > > Could some one please give some hints on dealing with such issues? > > > > Thanks in advance! > > Lan > > > > > > At 03:32 PM 1/11/2002 -0700, you wrote: > > >Hi all, > > > > > > I'm starting to poke about with landscapes again. I've mastered > > > rendering a 32x32 heightmap. Last night, I figured out how to put in > > > water, but I've still got to make a test program to see if I've got it > > > right. And I'm looking forward to eventually getting a model walking > > > across a scene. > > > > > > I've a couple of FUDs (Fear, Uncertainty, Doubt) about a few things, > > > tho. I'm not sure how I can use a quad-tree or oct-tree to do culling > > > within a scene graph. I can understand it in immedate mode. It seems > to > > > me that the Shape that I'd create would have to be removed and rebuilt > > > with each movement of the camera. Even just panning from left to right > > > would cause it. Doesn't that create a lot of overhead? Or am I just > not > > > grasping it? > > > > > > One way I though of handling a large landscape was this: I would > > > break my landscape data up into cells. I would only load a few cells at > > > a time, the cells the camera is in and the adjacent ones. Something > like > > > this (gotta love ascii art!): > > > > > >[ ][ ][ ][ ][ ] > > >[ ][X][X][X][ ] > > >[ ][X][*][X][ ] > > >[ ][X][X][X][ ] > > >[ ][ ][ ][ ][ ] > > > > > >[*] = the cell the camera is in > > >[X] = adjacent cell > > >[ ] = unloaded cell > > > > > > I was thinking that I could use some sort of LOD routine, perhaps > > > ROAM, to handle the loaded cells. But that brings me back to the > > > question of manipulating the Shape I've loaded into the scene graph. > > > > > > > Lan Wu-Cavener > > Research Associate and Programmer > > Dept. of Landscape Architecture > > > > > =========================================================================== > > To unsubscribe, send email to [EMAIL PROTECTED] and include in the > body > > of the message "signoff JAVA3D-INTEREST". For general help, send email to > > [EMAIL PROTECTED] and include in the body of the message "help". > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com > > > =========================================================================== > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff JAVA3D-INTEREST". For general help, send email to > [EMAIL PROTECTED] and include in the body of the message "help". > =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
