Octree Data Format

Started by
1 comment, last by SoD 22 years, 6 months ago
Hi, i''m implementing a 3d octree engine but i can''t understand how to store/link the poly''s data in each node of the octree. i''m thinking to use vertex arrays that are loaded with the triangles of the nodes visible in the frustum. But if i''ve a terrain mesh built of triangle stripes, i''ve to split it up in triangles when i subdivide the world objects in bounding boxes? rendering triangles isn''t slower than rendering stripes? The other question is what is the common method to store poly''s information in a octree? i store the data in the game object (a model,a skydome, etc) and refer to it with a link and so copy data in the vertex array and render? or it is better to store vertex arrays of static objects before building the octree and after refer to them ? i can''t understand if it''s normal to swap data to the rendering each frame or prepare all before. and dynamic objects? i can''t use vertex array for it isn''t? how i can refer to them in the octree node? excuse for my dumb answers, but i''ve read a lot of articles about octrees but it''s diffucult to use the pratically
Here we go!
Advertisement
You can really do everything you wrote. In the case of teh strips The best choice remains in a balance up on what you consider priority:

-fast code
-your sanity

Both questions also may have different answers depending on the size of your data models. Bot one thing is important: to copy data from anywhere to anyotherwhere usually is not a good idea. Just using the data where it is located is faster.

If brute force does not solve your problem....you''re not using enough!
If brute force does not solve your problem....you're not using enough!
Load the vertices buffer at the loadtime and don''t change it.
Your octree node just have the indices and you put them into a index buffer at the cullingtime. I think it will be faster.

Why English rules?? C pas très malin tout ça!
_______________
Jester, studient programmerThe Jester Home in French

This topic is closed to new replies.

Advertisement