I use Bullet and my own engine and I have a world collision mesh of around 8,000 triangles.
In this I have approximately 25 collision sphere’s/Physics Bodies and the collision seems to drop the framerate by around 5 FPS.
Does anyone have real world performance figures for Unity, I’m assuming this is very bad however I’m not sure as I don’t really know what everyone else can do?
It’s getting to the point where I’m thinking of moving over to Unity.
Couple of reasons. I’m currently concerned about the performance of C# and there’s no debugger. I’m old school, I grew up writing games in C/C++
My real world figures are this. For a world with tris and verts < 750, 19 draw calls, 11 box colliders and 4 sphere colliders, I’m getting 30 fps. Instantiating particle systems with a max <15 seems to be OK. I’m still figuring out how well that will scale as the geometry becomes more complex.
I’m also still feeling my way around C# script optimisation and what can and can’t be done.
That’s 27 draw calls, 27K polygons (8K for the mesh and about 21K for the spheres, which are the fairly high-poly built-in spheres), 25 sphere collider rigidbodies, 1 mesh collider (yes, with 8K polys). Good luck trying to beat that with your own engine, never mind creating a test like that in 3 minutes. C# (or Javascript) is compiled to ARM assembly. Due to the way Unity handles things, I can’t say I miss a debugger. Actually the fps are higher (~40fps) when the spheres aren’t bouncing off the mesh collider.
Thanks Eric that’s reassuring! I really don’t have time to write my own engine.
Is the 2nd gen iPod touch more powerful than the iPhone 3g?
In one case, I’m seeing a big hit on frame rate when instantiating objects, some of which are rigid bodies. Of course they are getting new’ed. Is it fair to say that one trick for instantiating objects would be to place inactive objects in the world then use SetActiveRecursively to enable them? Basically I haven’t yet got that instinctive feel with C# and how constructors are called, like I do with C++.
Try breaking up your mesh collider into multiple colliders. If objects are completely outside the bounding box they won’t be as expensive (and if you have one big terrain-like mesh collider objects will almost always be inside the bounding box).