Why would one use a static mesh vs a skeletal mesh and vice versa?

I am using the free fantasy weapon sample pack in the epic store. I am just realizing there are Skeletal meshes and Static Meshes. Why would I not always just pick one…
Is it just that all skeletal meshes should come with a physics asset and will allow the weapon to bounce off people when you attack; and also that it allows it to move if its on the ground and gets kicked?

I am also seeing that a Blueprint can be used as well for static and skeletal meshes so it doesn’t seem there would be any benefit there.

As far as not using a skeletal mesh… is the only reason to simply use a static mesh is just to save space and prevent game slowdown, assuming the item is never meant to be picked up, moved/kicked around?

2 Likes

Skeletal meshes are mostly for animation so it can be changed. Like for a gun, there’d be a skeletal mesh so you could have the trigger moving for example. Without looking at the assets in question, I don’t know why there’d be one for swords, since none of it moves anyway.

As far as you know, the best way to have a trigger move upon being fired would be by having this be changed within a blueprint correct? Or is that not as cost effective as a different method if doing it via blueprint is even feasible.

I’m still pretty new to Unreal, so I’m hoping someone else jumps in here, but I don’t think animation has anything to do with a blueprint, aside from calling the PlayAnimation/PlayAnimMontage nodes.

Skeletal meshes allow you to use deforming animations or more complex animations. It’s not strictly necessary for stuff that’s not deforming, for example with a gun you could have the gun itself and the trigger as two separate static meshes and then control the movement of the trigger with blueprints. But most likely you would have the gun as a skeletal mesh as well so you could have more complex animations like loading and stuff like that.
As far as swords go, you can do that as a static mesh that’s attached to a socket located on the character’s hand.

I think I am understanding now. My thought then is it seems for a basic game, there is no need for a sword to have a skeletal mesh unless its a more complex game and the sword can break in half or something (assuming the skeletal mesh has two separate pieces for the blade itself.

I really can’t think of a reason for the sword to have a skeletal mesh, unless maybe an older version of Unreal didn’t have sockets for meshes/actors, so skeletal meshes were used for grip points or something. Like a sort of “player holds this bone” kind of thing. But meshes have sockets, which fill that role perfectly…

I guess you have never used any kind of sword or ever swang a stick at anything - nothing wrong with that I suppose, its 2019 afte-all.
Swords and any metal or stick CAN bend. They often do, in combat particularly. This is especially true for something like the ulfberth which was specifically superior because it would bend but not break.

Essentially, if you need to be able to procedurally control the bone position based on hits, you would obviously need a few bones in a chain to be able to bend a mesh without a morph and complications.

Technically one could even pre-animate the bend and activate it based on a custom curve - you would need the skeletal mesh to do just that.

Plenty of reasons for almost any weapon that has some amount of flexibility to have some bones - naturally it all depends on how you implement things.

I haven’t seen any decent game do swordplay right just yet.

The closest has been Kingdom Come Deliverance, but it took them about a year of tuning and they definitely do not have their swords bend or incorporate and type of Flat hit that would call for that type of effect.

Like you mentioned it is very likely that someone at the studio though “mhe, swords don’t bend” incorrectly and that now they would have to re-do around 200 assets to incorporate bones within them…

Anyway. That’s why a sword can (and maybe should) have a skeleton even with just 1 bone.
so if you change your mind later you can modify the skeleton and not the asset…

on the “useless bones” note I’ll give you another example of a blatant omission that everyone does out of simplicity.
arrows.
realistically an arrow flying once let from a bow will bend in what is commonly referred to as the archer’s paradox - a sort of sine wave.
While I have never seen any game even attempt to create this effect, it doesnt mean that arrow assets shouldn’t have at least 3 bones for someone to later come along and implement it.
the difference there is the fact that an arrow is usually 1 to maybe 10 assets in a game, unlike a sword which you could really have billions of…

Thanks MostHost LA. Unfortunatly i don’t have my game PC for a while to be able to test this. Kinda confused how to implement the bend if the skeleton mesh has one socket and its at the grip point as you say. Seems it could only be rotated. Am I missing something?

You would need to add additional bones for it to bend.

As a rule of thumb I generally atart a new bone every 15cm to get a decent bend on items that have to oscillate. A sword is usually 40cm to maybe 120cm for a claymore’s blade approximately, so you are generally good with 3 to 8 bones or so. It’s really a matter of taste and of how much you intend to push the bending of the item.

The point though is that even if you add just a single bone at the hilt you can later modify the skeleton without having to touch the mesh/texture and the way you attach since you would have to change from static mesh to skeletal everywhere you try to attach.

Another sort of hack I have used in the past is to actually bake the bend into 2 ik bones and fabrik solve for the spring effect.

so you have a sword with 8 bones, plus 2 IK that are a copy of the tip offset from the tip as far as you wish the tip to bend.

Because using IK in engine you can then manipulate the oscillation with a curve value for the alpha - and you have specific settings to avoid the stretching of the mesh (in case your IK bone is forward instead of rotated to keep track of the blade length).

as a bonus, should you choose to programmatically shift/reduce the intensity you can modify the IK bone position on the fly, and the alpha curve will still blend into it.

Come to think of it, this technique would also be good for the arrow parallax effect and for the drawing of the bowstring (though the bow can have many more bones in that chain and does require locking of 2 axis which is significantly more troublesome.)

I can see the arrow flight being driven by 2 ik bone controls at tip and end that oscillate circularity by a product of procedurally combining a sine wave, the speed of flight, and the derived rotation values… all the while diminishing the effect based on length of flight governing the Alpha value, so that it just stops still once you stop the movement no matter what… I need to get to try and implement this… … …

You have been truly helpful with your information. thank you very much.

Like the others said the guns need to animate so they need to be skeletal meshes.
For the sword there are 3 reasons why you would want a skeletal mesh

Reason 1: guns use skeletal meshes, so if you want a master item for all the objects you want to pick up you will have to decide if to use static meshes or skeletal, since you can’t change the type of component of a child mesh, so you will use a skeletal mesh for everything, guns, swords, any random object you want to hold in your hand, even a simple credit card
Reason 2: character animation, imagine you have a dagger that you can either hold by the handle or by the tip of the blade when you throw it, you would want 2 bones, one for the handle and one for the tip, so you can use the bone as a pivot point
Reason 3: Animating the sword itself, like breaking and bending, or for items like a staff or long stick you might want the character to hold it at different parts, so you would have a root bone and the mesh weighted to a second bone, the root bone would be where you character is holding it and you can animate the second bone to have the staff slide in the character hand

Another reason, which I didn’t see when skimming the thread, is that certain approaches to building characters require you to use skinned (skeletal) meshes, not static meshes.

If you attach the weapon as a static mesh to the socket of the hand bone or whatever, that only needs a static mesh, but if you use Master Pose Component, each component must be a skinned mesh, and if you use Skeletal Mesh Merge to get the number of draw calls down, that can also only be done with skeletal meshes.

More information here:
https://docs.unrealengine.com/en-US/…ers/index.html

1 Like