Hi Erwin,
I'm not going to update it immediately: that's my last day at Ageia, my home PC is in a box, and I will not have any time for this before one or two weeks.
This eliminates the need for searching pairs, because the pairs get removed during the overlapping pair traversal, using an additional aabb check for each existing overlapping pair. It is nice for SPUs, reducing random access. This also gets rid of duplicates, so it works nice with a Multi-SAP where multiple broadphases report the same pair.
Yeah, I know this approach but I don't really like it. Having an extra overlap test for each *existing* pair seems to defeat the purpose of incremental results completely. If I have 20.000 sleeping pairs in my world, I don't want to perform 20.000 extra tests on all of them, that's madness. Never tried it though, it just seems... bad. My gut feeling is that performing a smaller (incremental) number of searches (which is O(1) anyway) is a lot better. But granted, I never profiled the alternative. (except when I profiled Bullet against the other SAPs, and found Bullet was slower. But maybe it's for different reasons, I didn't investigate much.)
Havok also uses the 16-bit or 32-bit quantized integers for the SAP broadphase, not just Bullet. Many games succesfully shipped with this technique, so not everyone shares your 'However this is not a great approach' sentiment . Note that the a better fitting world bound is better, and so is a 32-bit accuracy.
The fact that Havok uses it or that many games shipped used the technique does not make it the best approach in the world. This is not a solid argument, I'm sure you realize this.
As far as I can see it still forces the user to provide world-bounds at start of day, right? As a user myself, I find this super painful, not only because sometimes you don't know the bounds ahead of time, but also because - as you said - "better fitting world bound is better". In other words using poor world bounds gives worse performance, and it's one more option for users to screw up. And if they can screw up... they will.
Transforming the float also gives 32-bit integers, and you don't need the world-bounds, never. So it's quite obviously "better" in my book... I don't know, looks like a clear winner to me.
Code: Select all
this quantized AABB versus quantized AABB can be made branch-free, which is much faster on XBox 360/PS3. In the optimized BVH (not SAP), some game company reports 3 times speedup.
Yeah, the branch-free version might be a win on Xbox/PS3. For a SAP though, I doubt this makes much of a difference, as the overlap tests are not really the bottleneck. Probably worth a note anyway.
Thanks, I'll update the doc ASAP.
- Pierre