Create TreeCollision from OgreNewt::Collision object

maxwave

07-05-2006 15:19:57

For example, I have large scene with many polygons, and more objects of this scene is static objects. I think, that create "Convex" treeCollision from objects is not very vell, because it is not have good performance. For example I have architectural Column with many polygons, but collision object for it should be Cylinder. I create Cylinder collision, but how pass this collision object to treeCollision object?

walaber

07-05-2006 18:49:05

if it's all static, why not just use a TreeCollision object?

TreeCollision is made from a group of polygons, and CAN be convex. that is why it must be a static body.

you only need to worry about making thigns convex when they are dynamic objects.

maxwave

07-05-2006 21:31:18

So,we shall reason on another. For example, I have scene, which consist of 100 columns. Each column- 2000 polygons.When I load scene,I have two cases:
1) each static object (column) I pass to TreeColision.
Hence count of polygons of collision is 100*2000=200000.
2) for each column create cylinder(~30 polygons) and pass it to TreeCollision. Hence count of polygons of collision=30*100=3000.

In which case performance(productivity) of the physics is best? I think that in second case, because it have small count of polygons and time for calculating physics will fastest. Or no??? So, how to pass cylinder collision to TreeCollision?

walaber

08-05-2006 08:34:37

okay, I see what you mean. I think you have 2 choices.

1. make a TreeCollision for some data, and make other (static) bodies from primitives for the columns.

2. (suggested) have your artist make a low-poly version of the scene, and pass that directly to the TreeCollision.


basically, you cannot "mix" TreeCollision primitives with the other collision primitives (sphere, box, cylinder, etc) in a single compoundcollision. I would suggest using #2, I think it is the easiest solution.

maxwave

10-05-2006 16:43:17

2walaber
Thank you for ideas! :)