Invisible triangles in hkpExtendedMeshShape

Invisible triangles in hkpExtendedMeshShape

Hi,

I'm developing a windows application with Havok 2011-2-0 (hk2011_2_0_r1). My platform is Windows7 Professional and VisualStudio 2010. I use hkpExtendedMeshShape for the dynamic rigid body, and I found a problem. The tiny triangles are invisible via visual debugger. Is there any restriction for hkpExtendedMeshShape?

I attach theimages of original triangle mesh  (Autodesk FBX), and hkpExtendedMeshShape via visual debugger (with invisible triangles). 

Thanks in advance.

5 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

Hi Kenjiro,

Firstly, are objects colliding correctly in these "invisible" areas, or do they behave correctly and this just a cosmetic problem?

Just how small are these "small" triangles? It is possible that these triangles are being flagged as "degenerate" if they are very small (see section Hello World -> Creating Physics Objects -> Shapes -> Landscapes -> Extended Meshes in the documentation for more details about this an how you can increase this tolerance).

Also, the shape in fbxoriginal-triangle.jpg looks like it could be represented in the physics world as a list of boxes and cylinders which would be more efficient. Is there a particular reason you are using an hkpExtendedMeshShape (which is usually used for fixed objects) for this dynamic body?

Amy Developer Support Engineer Havok www.havok.com

Hi Havok_Ami, thanks for your reply.

Just how small are these "small" triangles? It is possible that these triangles are being flagged as "degenerate" if they are very small (see section Hello World -> Creating Physics Objects -> Shapes -> Landscapes -> Extended Meshes in the documentation for more details about this an how you can increase this tolerance).

I investigated the problem according to your advice, and it is turned out that the invisible triangles are being flagged as "degenerate". But I can't be convinced to the cause of this problem, because the degenerate triangles are farther large than hkDefaultTriangleDegeneracyTolerance (1e-7). Please check the attached image. It shows that the shortest edge (of  a degenerate triangle) is about 0.0017.

Also, the shape in fbxoriginal-triangle.jpg looks like it could be represented in the physics world as a list of boxes and cylinders which would be more efficient. Is there a particular reason you are using an hkpExtendedMeshShape (which is usually used for fixed objects) for this dynamic body?

I'm trying to integrate Havok into our system which is a kind of modeling and animation tool. So, the users of our tool make a decision about it. In some cases, they will use hkpExtendedMeshShape for dynamic bodies to check for collisions more accurately.

Allegati: 

AllegatoDimensione
Download smalltriangle.jpg57.18 KB

Hi Kenjiro,

This is a comment from our isDegenerate(...) code:
// Degenerate is assumed to be:
// - it has very small area (cross product of edges all squared less than given tolerance).
// - it has a aspect ratio which will cause collision detection algorithms to fail.

If you are certain that the area of these triangles is above the threshold, they may still be failing the second check.

I understand that sometimes users will use the graphical representation as the physical representation for an object but there are limits to what the engine (and floating point values) can reliably simulate, and these small, long thin triangles are likely pushing this limit (which is why we mark them as degenerate).

So unfortunately, your users will have to avoid using meshes with triangles like these for the physical representation of bodies and will need to create a simpler mesh to give to the physics system (although the graphical representation can be whatever they like).

Amy Developer Support Engineer Havok www.havok.com

Hi, Havok_Amy.

I understood. There is no problem, if I can explain for users why it occurs and how to avoid it.

Thank you so much for your support.
Kenjiro

Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi