I’m working on an indie project, and we are trying out PhysX for our physics and collision systems.
Our level geometry is built from a great number of convex meshes, that the user can modify in real time, however each mesh has the limitation that it has to be a valid convex polyhedron. They are just about the same thing as brushes from the Quake era, however we don’t use a BSP tree.
Each polyhedron is limited to 8 vertices, and 12 faces(They start as cubes, and each face can be triangulated once). So each mesh is very simplistic, however we have a lot of them. They will always be static and non-modifiable while the physics system is actually doing simulation however.
I’m doing some simple tests right now and my first approach was to simply generate a convex shape and a static rigid body for each “brush”, add them to the scene and let PhysX deal with it.
The level geometry can get quite dense in certain places, where the artist decided to go a bit crazy with the detailing.
As opposed to trying to guess a number of brushes, I’ve taken a screenshot from the visual debugger showing the complexity of a fairly full-featured room: http://imgur.com/a/fm5Qc
We’re basically looking at 5-15 times that, for a level.
The question is if this is a decent approach or if I’ve completely missed some other way of doing things that would be preferable? In terms of polygon counts we’re not breaking any records obviously, however I’m worried about the sheer count of separate static meshes.
Any insight from someone with more experience would be helpful.