Page 1 of 1

Most efficient way to build collision meshes

Posted: Mon Jun 23, 2008 10:01 pm
by ChrisN
Hi, just woundering about performance and the best way to build collision meshes on object (like boards on a arena), should I build with low triangle count (very large polygons) or should i have a uniform tessellation?

cheers
/ Chris

Re: Most efficient way to build collision meshes

Posted: Mon Jun 23, 2008 11:17 pm
by Norbo
The best way to go about doing it is keeping everything on a similar relative scale. This means avoiding ultra-triangles extending for 600 units when your other objects are only a unit or two across. It's also good to avoid extremely stretched objects (1 unit across, 80 units long), which sometimes means leaning more towards uniform tessellation.

The cost of additional triangles is extremely low in terms of the time it takes to 'find' a triangle to collide against. If they become so small that one object can hit many triangles simultaneously, however, you will notice a performance drop due to the extra collision detection/response being done. Otherwise, the number of triangles is fairly inconsequential.

Re: Most efficient way to build collision meshes

Posted: Mon Jun 23, 2008 11:28 pm
by ChrisN
Thanks for quick reply.