octree... what do I have to learn before I can implement an octree class

Started by
4 comments, last by fantasy_world 19 years, 5 months ago
hi, I have heard about octree. IT's the way we can partition the space. But I don't know much about it. What I have to read before I can create my own octree. we can use octree for detecting collisions ? but how ? we partition the world at first time when games run ? so our world must be static object (a large mesh) ? First if we don't load objects into the world so how can we know their positions. I think we have to know object's position to assign it to octree ? or we have to create a complete world before we partition it ? and add how we can add dynamic objects to the world (if in my game I need a mouse which runs around the world) [smile] thanks for reading my questions... Because I'm a newbie so I ask many questions [smile]
Advertisement
Time to do some research! I recommend:

1. Search gamedev for 'octree' and 'loose octree'.

2. Google for the same.

3. Check one of the first two GPG books (I can't remember which) for good articles on both basic octree construction and loose octrees.

4. Check the tutorials/developers sections on flipcode - I think there may be an octree tutorial there as well.

It's a well documented topic - you'll just have to do some work to dig up the details. A couple of hints, though. Octrees can handle static and dynamic objects. Objects can be referenced from multiple leaves, or you can use a 'loose' octree and have each object reside in one leaf only. The loose approach can lead to more tests, but insertion of dynamic objects is generally faster.

Good luck.
3. Check one of the first two GPG books (I can't remember which) for good articles on both basic octree construction and loose octrees.

" its Game Programming Gems 1 "

you have to read more about Data structures .
Game Programming is the process of converting dead pictures to live ones .
thanks
I'm going to study octree.
I'll ask more questions at next time.
[smile]
okie

now I know the data structure used for octree.
but I have met a new trouble: how to assign mesh into nodes (end nodes).

I load a static mesh, then I have an index buffer and a vertex buffer, then I optimize the mesh(inplace).

I loop through the vertexbuffer to know the position of each vertex and where it should be put in. What can I do with the vertexbuffer? Should I create a vertexbuffer and an indexbuffer for each end node? or assign only index of vertex and index buffer to nodes.

thanks for your helps.
any ideas..? [rolleyes]

This topic is closed to new replies.

Advertisement