Original Post
Ok, i''ve never programmed any 3D before, but i''ve spent the last little while reading tutorials and going over other peoples Octree code, so i think i''m ready to start coding and i was just wondering if you think i''m on the right track before i get started and waste a bunch of time.
So at this point all i''m looking to accomplish is creating my octree (gotta crawl before you can run) and this is *basically* how its works as i can understand it.
1. Read in Height map
2. Find the smallest cube that the whole world/scene fits in
and store the center vertex and the width of the cube
3. If the # of triangles inside the cube is greater than some limit (say 64) divide the cube into 8 cubes and test the # of triangles again. Repeat this until the # of triangles is <= the limit OR until the max level of subdivision is reached (don''t really know what that number should be yet).
4. When a cube doesnt need to be (or cant be) subdivided anymore store the triangle info in that node of the octree
wow, now that i''ve typed that out, it all seems so simple.
Anyone see any major flaws in this?
Thanks for the input.