One skeletal mesh vs multiple static meshes


I have a plane with two nozzles which can turn to accelerate the plane and so on. I created a simple skeleton with three bones and rigged the nozzles to the second and the third bone. In UE4 I can easily manipulate the nozzles rotating the bones.
Now I wonder, if I create three static meshes (plane body and two nozzles) and parent the nozzles to the plane body and rotate the nozzles in their local space, would it be more optimal for the performance?

More of a preference thing and I prefer the bone route. Attaching the main asset to the control means you can change the asset at will with out having to redo the control over again.

Also no need to hardcode the alignment of the child meshes.

If an actor has an hierarchy of SceneComponents it means the engine applies individual transformation to each component vertices. In case of a skeletal mesh each vertex has a weight(s) and therefore an individual transformation. But I’m not sure whether it increases the overhead significantly.

In your case I doubt it makes much difference, you’ll be skinning rigid verts, not weighted, which makes it quite cheaper. From the sound of it, you don’t have enough pieces to really affect draw calls in a major way. Dealing with skeletal mesh is probably easier. So the choice is not too much reliant on performance, I don’t think, rather on work flow.

You mean the engine ignores the bones with zero weight?

Well, no, but for your moving pieces, they will be skinned rigid, meaning, a single bone control the vertex, not multiple bones per vertex. The more bones control a vertex, the more expensive it gets. But with something like a rigid object, you’re not doing soft deforming, so your skinning can be rigid, which means it’ll be the cheapest form of skinning.

With free floating bones, obviously they don’t add to skinning, but they are still processed, at however small cost.

The point is though, In this case, I doubt it matters much in the end whether you use skeletal mesh or static mesh in separate pieces, with regards to real performance impact. It comes down to workflow, and that’s where I think skeletal mesh wins.

Ok, I put the question not quite clearly.
I agree that in my case with a simple model it really doesn’t matter, but this is a principal question.
What is rigid and soft object? I think the engine doesn’t distinguish them. You have vertices and bones. Say, 100 vertices and 10 bones. Each vertex has 10 values, or weights, which define how each bone’s transform affect the vertex. In case of the rigid object, each vertex has only one non-zero weight corresponding to its controlling bone. And if I’m correct so far, the engine takes each bone and transforms all the vertices in correspondence with their weight for this bone. A weight being zero doesn’t simplify the calculations, unless the engine skips vertices with zero weights.

The engine does distinguish between various skinning. This is my point about it. Skinning can be less or more expensive, depending on how you do it, how you weight things.

With regards to zero weight, you wouldn’t want that because you want the whole model to move with the bones. All verts should be skinned to some bone at least. And if you had extra bones as markers or something, that’s something else. But all verts should be skinned.

So, I get that it’s a general question, but the answer is based on considering it generally. Like with most things in games, you can use one method or another depending on various other things. So, lets say on much larger scale, you ask the same question, I’d possibly still go with skeletal mesh. But again, it does depend on the project and everything else in it. But I would wager simple rigid skinning above many draw calls, at the base level of the comparison.

So, even in your case, maybe it’s simple and not a real performance question. When and if performance becomes the question, it’s still a close call in my opinion. It’s one of those things where you’d simply have to go and do a large scale test case if you really want to be sure. That’s how you learn what not to do outside of doing it wrong to start with. In my experience though you will use skeletal meshes for animated objects like that more often than not. It just makes more sense.

But just back to skinning. The fact is, it’s cheaper if you have 1 vertex skinned to 1 bone in stead of 1 vertex skinned to 2 or 3 or 4 bones. This is fact, so there should be no confusion there. I will admit that I’m not sure the line there in UE4. In the past, like UDK or other same generation engines, the limit was 4 bones. On PC I will say that it’s less of a concern to use 4 bones. You can get away with a lot more on there. But on mobile it’s more of a concern. Granted, more newer hardware may deal with it better, there’s still many devices out there that will choke real quick.

On the flip side, you have to deal with draw calls, if you use separate meshes. So you have your plane with 2 engines, which is 3 draw calls at best, in stead of 1. Now you add another plane, meaning 6 draw calls in stead of 2. You see where that’s going. Again on PC, you can go quite far, but on mobile, not so much. But still I think draw calls is a bigger concern as a general rule.

Hope that makes sense. What you can do in UE4, open your skeletal mesh, switch on Detailed Info and it will show you how many verts are rigid and how many are soft. So on a character for example, you’ll have a mixture, but on something like a plane, it should be all rigid, which means it will be cheaper for the whole model.

I haven’t heard of the concept of rigid/soft vertex before. I have only basic knowledge of how to rig a model in Maya LT (gained from a single tutorial) and I used standard Paint Skin Weight Tool to set up my mesh. There is an option when one can choose vertices and a bone, then flood these vertices with a value (in my case the value was 1). I thought it is a hack and there is a proper way to do it, but thanks to your tip I found out UE4 treats all the vertices rigid =)