View Full Version : model format question
11-29-2010, 10:19 AM
My current data format for static geometry looks pretty much like a VBO dumped into a file. It's basically vertex arrays with some minimal ancillary info. Here I've followed the philosophy of doing the minimum of runtime processing of data. During runtime I basically just dump the vertex arrays from my files into glDraw* calls.
How well does this approach work alongside BSPs, octrees, AABB trees and such? Can one simply pack vertex arrays into those and then dump them into draw calls? Maybe there are problems with such thinking? These data structures are for fast rendering of static data and doing runtime processing while rendering them would surely hurt performance.
11-29-2010, 11:35 AM
You should forget about classic BSPs if you are using VBOs. A coarse BSP, octree or AABB tree algorithm can still help but never do it on a per-polygon basis rather in batches of several thousands (or ten-thousands) of polygons at least.
I would recommend you either loose octrees or coarse hierarchical bounding volumes but again, do not do too fine grained culling on the CPU. The good thing in these is that they can handle also dynamic data pretty fast if you implement them correctly.
11-29-2010, 12:17 PM
Well yeah, of course, I've had batches in mind. But it is difficult to say in advance what level of coarseness is needed. Benching needs to be done for that.
From your reply, I'd say you agree with packing vertex arrays into a tree, if it is not too fine.
BTW: How can one determine the optimal batch size, other than benching?
But otherwise, say you have a huge terrain to render. I really don't see how to do it without trees.
11-29-2010, 01:10 PM
I don't think that you can determine optimal batch size other way than benching but maybe the vendors have some recommendations about optimal vertex count ranges but I think the principle applies: the more you'll put in one batch the faster it gets.
Currently I don't know any completely general method to do otherwise than using some form of CPU based hierarchical spacial subdivision algorithm to perform scene management even though I'm actively researching the topic of GPU based scene management.
11-29-2010, 04:20 PM
Does anyone have some other views on the topic? Is packing vertex arrays into various spatial data structures feasible for rendering?
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.