Skinned solid mesh vs. transform multiple Game-Objects

Hi!

I am currently building a lot of non-organic models for my game, mostly machinery and equipment. Some of them will have moving parts and my question is: What is better for overall performance?

Combine all object pieces to a single mesh (about 3.5k polys) and use bones for animation or use a transform based animation on different smaller meshes (about 3 or 4 mesh-pieces per object, most of them below 1.5k Polys)

Each complete object (comined or uncombined) uses only one texture.

Has anyone experience with that?

Thanks!

Frank

I’d trust the UT guys better than me, but I believe it is ALWAYS better/faster to have a combined mesh animated by bones rather than several meshes, even if they share one texture.

Well then it will be good to hear what the UT guys have to say on this, because it is my understanding that simple object transforms are vastly faster/better performance than skinned meshes. This being because with an object transform you’re just acting on the whole object at once in a simple math function. However with skinned meshes, even if you have 100% single vert to single bone weights, every frame you have to determine which of the subsets of verts (providing there are multiple bones) were affected by which bone(s) and translate them uniquely from any remaining verts of the mesh.

So my vote would be for object transforms over skinned mesh transforms for performance, but I’ll be interested to hear otherwise.

Also, performance with lots of objects was significantly improved with Unity 2.0. (For example, this ran at 30fps with a 9x9x9 cube on my machine. That’s a total of 387 separate objects. But when I loaded the project into 2.0 recently and rebuilt it, 9x9x9 now runs at 50fps.) So I’d be inclined not to combine objects in this case.

–Eric

It’s definitely going to depend on the scale of numbers, of course, and I wasn’t aware of the improvements in 2.0. (nice!) I became very aware of the issue because my --eternally on the back-burner-- game deals with many objects and the frame rate was initially very disappointing. We are talking STATIONARY objects, here, as well. :slight_smile:

So, the best way to try this is to do a specialized test for your needs, but I’m starting to lean with the other guys here on your specific case. Going bones seems a bit like overkill for only a few sections animating.

UT to the rescue? :smile:

:smile: Well no real rescue needed here. I was just asking, if someone already has experience in this matter.

As most objects arent animated constantly i am also tending to go the “seperate meshes” way and use mesh-combining when things are idle. I guess, that will be the smoothest way. If i am wrong… tell me :wink:

Making a basic test would be pretty easy, too. Just make one animated model both ways and instance about 200 --or a variable amount-- of them. Check the frame rate. :slight_smile:

The answer depends on your concrete situation.

Many separate objects will be transformed on the graphics card, but there will be lots of draw calls.

A skinned mesh will be transformed on the CPU, but there will be far less draw calls. In case of 1 bone weight skinning, of course it’s quite fast to transform on the CPU (we have separate code paths for 1, 2 and 4 bone skinning).

Which is better depends on, uhm, a lot of factors :slight_smile: