Archived

This topic is now archived and is closed to further replies.

Chaucer

octree again

Recommended Posts

Chaucer    122
I''ve still not been able to speed up my octree structure. I get higher fps when I don''t use it at all. As I zoom my camera out, it looks like the structure is being created correctly because I see ''squares'' of terrain disappear. I think that I may have realized what part of the problem is but I''d like to check to see how it is normally done. In the tutorial I looked it that taught me how to create an octree set the dimensions of the root node to the size of the entire world. I was thinking that it would be better to set the dimensions to just the size of the terrain (the width, depth and height) instead of having nodes with all that sky in there. I can see if I was using some objects in the sky why I might need those nodes but I see it as a waste right now. I think what''s slowing down is the fact that some nodes are being drawn with only a few polygons (at the top of the hills) and the time it takes to recurse to those nodes is what is slowing it down. So how do you do yours? What is the common method?

Share this post


Link to post
Share on other sites
Chaucer    122
Ok so my octree reads out of one large vertex buffer and is split into index buffers for each texture group in a node. I was told that batching these would improve speed so in my render method, if a node is visible, i add all the index buffers of all the texture groups in that node to a batch.

Then I set my texture and render all the index buffers in that batch, go to next texture and render all the index buffers in that batch.

I''ve gotten no speed gain this way. Is there a better way to do it. Should I lock my index buffer each frame and add to it so I just have one large one?

Thanks.

Share this post


Link to post
Share on other sites