Peformance warning

Peformance warning

jan_k's picture

Hi

I just created a hkpExtendedMeshShape wrapped into a hkpMoppBvTreeShape for static geometry. It's all working fine, but i get the following warning:

Havok Error:
.CollideAgent3BvTree3hkpBvTreeAgent3.cpp(371): [0xad345a23] Warning
: 'Peformance warning: hkpBvTreeShape::queryAabb() returned more than
256 hkpShapeKey hits.'





The mesh, that i created is a Torus with about 2000 triangles, so it is quite dense. My question is this:

Am i doing anything wrong? Does this message mean, that i should use some other type of mesh or so? Or does it simply mean, that there is a very dense mesh and collisions with it will be slow and i can't do anything about it, except for maybe reducing the detail of that mesh?

Thanks,
Jan.


5 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.
havokdaniel's picture

Hi Jan,

This happens, as you can see, when queryAabb() is called on a hkpBvTreeShape, and the number of hkpShapeKeys (one per child shape) which come back from the query is higher than 256. This can occur if the 2000-triangle torus is colliding with an object which has an AABB which encloses more than 256 children of that shape. In general, a 2000-triangle static landscape is not a problem, but if hundreds of triangles from that shape end up inside the AABB of a dynamic rigid body, all will have to be checked for collisions which can be expensive.

Could you explain your use-case a little? If you're hitting this warning then it's likely that you don't need to have such a highly-tessellated shape, but maybe your case is a bit different to what I'm imagining.

Thanks,
Daniel

jan_k's picture

Well, my use-case was simply, that i added support for collisions with concave meshes into my engine and i needed some concave geometry to test whether it works, so i created that torus. It is nothing, that i would expect to have in a real level (in that size and detail), but i was still wondering, whether i was doing something fundamentally wrong.

But thanks for the detailed explanation, in which cases exactly that warning appears.

I have uses Ageia's physics-engine for quite some time, since it was the only professional and free engine available. But working with that engine was a nightmare, especially because of their almost non-existing support. Now that Havok is free, i am converting my whole engine over, which works quite well so far. Havoks asserts and messages are very helpful and i want to really understand what they mean, that's why i ask so many questions lately ;-)

I really have to add, that the support from you guys on this forum is amazing. From Ageia i was used to have to wait at least a weak, before i got any answer, at all, and it usually was something crappy like "read documentation" (yes, some of them were not even able to formulate half-decent english sentences). So, in the next two weeks, while i learn Havok and convert my code, you can expect a lot more questions from me ;-)

Thanks,
Jan.

havokdaniel's picture

Hi Jan,

Thanks for the feedback. I appreciate that it's difficult to understand what all the messages mean without source visibility, but remember that whatever questions you have, other people do or will have them too... so keep them coming!

Daniel

whugang's picture
hi, I also met that problem, for my model was made by numbers of triangles more 256, and that model was used to interact with other objects. have you solve it or found a more flexable solution ? thanks

Login to leave a comment.