A quadtree component for terrain/landscape management. I am using Microsoft's XNA Game Studio v1.0.
Download current release for source code
NOTE: My Octtree component for outerspace games can be found at
http://www.codeplex.com/Octtree.
GET ACTIVE IN THE "Discussions" FORUMS or leave a comment below, IF YOU TRY OUT OR ARE USING THESE COMPONENTS, YOU MUST HAVE SOMETHING TO SAY OR ASK, SHARE IT!
CURRENT FEATURES:
- Creates a quadtree from a Texture2D.
- Lies in x,z plane
- Culls nodes that are not at least partially within the viewing frustum
- Allows setting of texture for terrain
- Allows setting of sector size (#cells in x,z)
- GetHeightAt will return the height at a particular location
- Loads all nodes at once (no paging)
- Properties for Ambient light and Fog, and Effect
- Renders itself (only what is visible)
- Add Models to the terrain (will draw or cull them for you)
- Remove Models from the terrain
- Attach user class object to QuadtreeModelInfo
- derrive your components from class QuadtreeGameComponent
- QuadtreeGameComponent.Draw method called only when visible
- An example TankGameComponent derrived from QuadtreeGameComponent
- See the Quadtree nodes that were drawn each frame in a HUD
- Added tutorial on creating heightmaps "Creating a Heightmap and Texture.txt"
Current Screen Shots
Planned Features
- Detail texture (repeat a grit/detail texture each sector)