Hello,
I'm trying to understand animations / gestures /sequences (a good start would be to know the difference between these things).
I searched for a good explanation on the internet, but couldn't find something.
Can anybody explain how these things work or can link a good tutorial on the internet?
You don't use/play animations in gmod as it, you play sequences with ResetSequence() and SetSequence()
About gestures, you make them work manually via hooks, that might be a bit hard and complex if you start working on it, so i recommend you to play with sequences
So for example 10 Sequences which play one after the other, build 1 animation?
Nope, you create animations SMD files, and then you create sequences from it
Sequences are composed by animations, so you shouldn't think about animations
It helps to think of these things separately.
I figured a lot of this out on my own after realizing what was missing. I'm using blender but this applies to anything:
- You have an SMD file, exported from your 3D modelling software which contains the mesh of your object. In the modelling software, that object needs to have been parented to your [b]whole skeleton object[/b]. This is called a [b]rig[/b] in some places. In Blender, it is called an [b]Armature[/b]. By parenting it to the whole skeleton (rather than a certain bone), the top of the SMD file for your main model SMD will then (when exported) include a list of "nodes" (bones) with numbers that link them all the way back to their parent bone.
- The collision model file is another SMD file - this particular object needs to have been parented to [b]only the root bone[/b] of your skeleton / rig / armature object.
Finally, there is an SMD file for each animation sequence that you want to create. Each of these SMD files can be referred to from your QC file and given a name, fps and whether to loop when active.
To make the animation, in your 3D software, there is normally some kind of timeline that lets you mark the positions of the moved bones onto the timeline (they are often called keyframes, because they are the key points of change of movement between the smooth animation).
If you are using Blender, before you move any of your bones, you will need to "weight-paint" the vertices onto those bones. This is so that the vertices move with the bones that they are linked to. This is the linking process: First select the mesh that represents your object, then make sure it is in Edit mode, and then go to the vertex tab on the right. In there, you create a vertex group for each bone in your model. The names of the new vertex groups need to match the names of the bones that are going to move in your sequence of movement.
- If you're using Blender, then so that you actually can see the vertices moving with the bones when you "pose" (move) them, you will need to add an "armature modifier" to the main model mesh. The armature modifier manipulates the mesh so that you can see it moving in the editor as you move the bones. You don't need to "Apply" the armature modifier - the "Apply" button just takes the new positions of your deformed mesh and saves them permanently as the new position of those vertices. Basically, leave the armature modifier there so that you can see the changes to the vertices being made by the bones, but don't press "Apply". It's a bit like merging down a layer in a drawing program. You want the layer but not to have it merged. The reason this doesn't need to be saved, is because your animation is what is in your timeline (just the bone positions) - so you don't need to "apply" any changes to your actual base mesh.
As you drag the cursor along the timeline, the bones will smoothly move between the keyframes you have placed down onto the timeline.
When you're done, export the animation as an SMD file, and include it in your QC file (there's plenty of documentation on that step).
Some of that will be simple to you because you already know it - other parts will be new. I hope that helps, but ask again if you're not sure about anything.
Sorry, you need to Log In to post a reply to this thread.