Announcement

Collapse
No announcement yet.

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

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    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
    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.

    Comment


      #3
      Originally posted by nilamo View Post
      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.

      Comment


        #4
        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.

        Comment


          #5
          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.

          Comment


            #6
            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.

            Comment


              #7
              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...

              Comment


                #8
                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...
                Last edited by MostHost LA; 06-16-2019, 09:12 PM.

                Comment


                  #9
                  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?

                  Comment


                    #10
                    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... ... ...

                    Comment


                      #11
                      Originally posted by MostHost LA View Post
                      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.

                      Comment

                      Working...
                      X