View Full Version : Advice on data storage
05-24-2002, 10:23 AM
Well, no help on the beginner board. I have combined heightmapping and octrees to do terrain. However I am unhappy with the way I am storing the vertices for each leaf, currently just storing each triangle seperately. This is redundant and not as memory efficient as I would like. How have others tackled this problem? Perhaps just store an index array in each leaf? Compile the data in each leaf into a display list? Its more of a preference thing, but I want to hear what others have experienced please. Just need some sound advice.
05-25-2002, 07:41 AM
Somebody must have some experience in this area. This is all new ground for me. Any good advice at all?
05-25-2002, 08:11 AM
In the past I've done the following:
Use heightmap to generate terrain tiles, each tile being something like 64x64 triangles. Those are compiled into a display list and the display list id goes into a quadtree node. Note quadtree, not octree. Since a heightmap can't overlap itself, why bother with an octree? Somewhere I had a paper describing octree/quadtree implementations where the nodes were pointerless, using linear maths to calculate node locations in memory. But the memory requirements for a linear quadtree left me unsatisified, so I stayed with a pointer branched quadtree. Later I dumped that in favor of simple nested AABBox trees. But these projects that I've been doing have not been the huge world type of projects, more like Mario or OddWorld where there is a constrained space that a single character is screwing around within...
05-25-2002, 09:10 AM
Hi, thanks for your input. Can you elaborate a bit more on the part where you said a heightmap can not overlap itself? Im using an octree because when I build the terrain from the heightmap it becomes fully spatial, not planer. Unless there is some other difference between an octree and quadtree I dont know about?
05-25-2002, 01:43 PM
05-25-2002, 02:11 PM
Hi, yes, thats a great site. I visit it quite frequently. Just wondering how that answers my original question?
05-25-2002, 07:22 PM
A heightmap is a 2D array of height values. It is not possible to for a single heightmap to represent data that overhangs or overlaps any data within itself.
05-25-2002, 08:43 PM
Ah, ok, makes more sense now, thanks.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.