Announcement

Collapse
No announcement yet.

IQM Skeletal Animation

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

  • IQM Skeletal Animation

    Long story short: I have wanted to model what I consider a "mid-poly" Ranger model, kind of a middle ground between CapnBub's faithful but improved version, and the Q3 version of Ranger. It also needs to have separate leg and torso models (MD3 style) so that the running and shooting animations stay separate. I don't want to go crazy on the poly count, nor do I want to have a massive texture resolution.

    Well, I got the entire model done within those parameters, and it looks good. But I'm never happy with just 'good'. Halfway through rigging it with an armature, I got sick of the overlapping vertices and pockets that are unavoidable with vertex-group rigging.

    So I said 'fuck it' and decided to jump in all the way. Inter-Quake Model format with CSQC-based skeletal animation. One single model that incorporates game logic. Maybe some simple ragdoll physics. Who knows. I'm knee-deep in the unknown as of now. There's not a lot of real nice documentation on this, so I'm going to do this step by step and share everything I learn. If it all turns out well, I'll post a new thread with a rough tutorial.

    Here I goooooooo.....wish me luck.

    EDIT: yeah, forget the ragdoll physics. Just did some reading. SO not worth it.
    Last edited by Dutch; 05-16-2016, 02:57 AM.
    'Replacement Player Models' Project

  • #2
    When you succeed at IQM are you going to be unsatisfied that it isn't a living, breathing human and learn witchcraft?

    I think it's awesome that you're willing to learn and teach IQM. Just remember that you can't ever finish something if you don't finish it.
    http://www.nextgenquake.com

    Comment


    • #3
      in theory, just create a skeletal object compatible with your model, set up the various frame fields on your entity and then call skel_build. then do it again with a different range of bones. yes, this means you need to ensure that your model editor does not re-order bones and stuff (or gives you control over that order).

      think of the skeletal object as a load of matricies that express the orientation of each bone relative to its parent. you can interpolate those per-bone matricies individually, or you can completely replace them with a different animation, and because they're relative to the parent bone, the torso stuff all stays attached to the legs, etc.

      if you want more control, you can explicitly set a bone's matrix, or multiply it (read: rotate it). a bone matrix is easy enough to calculate with makevectors and a displacement vector.

      note that skel_build can be used to source animation data from a different model than the one that you're rendering with, although if you do that then you'll have to do lots of stuff to ensure that the skeletons is compatible.

      if you want to go crazy with it, you can blend multiple animations depending on how far the entity has traveled, and in doing so you can get the animation to play at exactly the right speed, even diagonally, in order to keep the feet synced with the ground.
      if you're feeling lazy, you can instead twist the model at the hips (see the skel_mul_bone builtin that I aluded to earlier).
      certain animations are more messy than others, like jumping...

      using framegroups properly means that you get two-way interpolation for free, just update frame[1|2]time for the animation and then call skel_build. getting your exporter to behave is a different matter.

      anyway, good luck
      Some Game Thing

      Comment


      • #4
        Dutch, you should make a super simple IQM first. Something that isn't even anything but represents many of the conditions that you might face... like a tube with 2 bones in it.
        http://www.nextgenquake.com

        Comment


        • #5
          I have been working on humanoid forms in Blender lately.
          Assigning vertex groups then attaching them to bones.

          I implemented a run animation, attack, pain and death animations, and they work but its really hard trying to avoid the model folding in on itself or warping in some weird way.

          Also, unless your making something quite basic then the auto-frame feature doesn't help much so you end up tweaking every frame to avoid unusual behaviour.

          Then there is the added obstacle of your creation looking like it is ice skating around, it's not a huge deal but lining up movement speed with your walking /running anims so that it looks like they are firmly placing there feet down is no easy task.

          Its all practice and I am improving but it can be dis-heartening to spend ages on something for it to turn out looking a bit on the dumb side.

          I will be interested to follow your progress.

          I have a question: What's the advantage of using IQM over MD3?

          @Spike: You mention keeping the feet synced with the ground, is this something I can achieve in MD3? do you have some tips for doing this?
          Whenever I make things in Blender, regardless of where I have the origin point set, I always have to adjust them up or down so they stand on the ground and don't float or have there feet sunk in the geometry. Maybe its a hit/bounding box thing?
          Username : Atomic Robokid on Steam

          Please check out my Quake made things:

          https://www.indiedb.com/games/run-over
          https://adam-freeman.itch.io/hazard
          https://adam-freeman.itch.io/diver
          https://adam-freeman.itch.io/beyond

          Comment


          • #6
            @Adam

            The benefit of IQM is that you can have just one single model that is controlled in client-side code, to my knowledge. MD3 is simply three different models (legs, torso, head) "glued" together, which definitely gets the job done, but still doesn't look all that great.

            I have been doing a lot of research tonight into armatures and rigging (which included digging through Gypsy's old cloneman threads), and there are ways of avoiding nasty deformation with conventional methods. This requires spot-on modeling and a badass armature. I may elect to refine my methods and shoot for this. Good results are much more obtainable, then starting from square 1. And believe me, from what I've gathered tonight, IQM is absolutely square 1. But I'm still intrigued by this, and still want to play with it a bit. I saw a video on YouTube of a guy who pulled it off with Spike's help (I forget his name at the moment). There was a character model running and crouching and what not all through skeletal animation...it was pretty slick.

            @gypsy

            Haha. Witchcraft. That had me laughing. You're right though, I'm my own worst enemy when it comes to making shit. I've noticed you have a similar problem...our shit's never good enough for us. It's frustrating as fuck. I might double back and re-evaluate some options. I would like to finish something SOMEday.

            @spike

            Thanks for the info. I started off making a real simple hourglass-shaped object with a top and bottom bone. The idea will be to rotate the top bone as the player walks around it (the bottom bone is stays put), to test the mesh deformation on the top half of the object as a single bone is rotated...no idea how it will work, but I did export to IQM and opened the export file and saw the matrices you refer to. If I'm following you correctly, I should be able to call on this bone in CSQC and rotate it's angles to deform the mesh (vertices) attached to it through the .iqe file, correct?

            EDIT: @Adam yes that's a bounding box thing. The models contact the BSP (game world) based on the size of the entity. If you're making items that aren't solids, you'll want to make sure their origin is +Z (right on top of the z-plane in Blender) and set their size in code as '0 0 0' '0 0 0'. The origin is technically on the floor (if the entity is on the floor, that is), but the model is saved as being above the floor. Player models are a bit trickier though. The origin of the player is not in the exact z-center. If you use the original player model as a reference, it should work.
            Last edited by Dutch; 05-16-2016, 06:20 AM.
            'Replacement Player Models' Project

            Comment


            • #7
              @me regarding "never good enough"

              To some degree you are correct but, if we are going to take recent examples as the litmus we also have to take the content into consideration. I'm building an engine that needs to work on everything. A lot of my work wasn't so much about making my engine better, it was about getting it right in the first place. Quake is 20 years old and people are still fine with using a model that doesn't even have a jump animation and is (without mod) stuck with a "multi-gun". I'm not saying that's good or anything. I'm saying you should take a moment and determine what you are building this for. Are you prepared to go this far for everything? If not, how is your work going to fit in the Quake universe? If you can't get a good mid-poly, middleground model completed, how is making it far more complicated going to go?

              You need to also consider that I can write/change 10 lines of code that make all the difference in the world. You aren't going to do the equivalent of that with a model (in time/effort) and see really any results at all. My BSP parser was pushing subgeometries into a geometry and ran like an unwiped ass. I made like 2 lines of change to simply keep pushing to one subgeometry and loaded/ran an entirely rendered e1m1 at max fps. That's not really the same thing as taking something perfectly fine and never being satisfied.

              To be clear, it's awesome IMO that you are messing with IQM. I just believe it would take far less effort to simply fix whatever you already have. You can then take those lessons you learned to make lots of really good things at that LOD.
              Last edited by MadGypsy; 05-16-2016, 09:48 AM.
              http://www.nextgenquake.com

              Comment


              • #8
                Let me give you a hint... assuming you have good weights painted why cant you simply add a bone that reacts in such a way to push the pocket out when the model is bent in such a way to create the pocket?

                You have to look beyond your own physical skeleton when creating a model. Constraints are your friend, learn them all and use them ingeniously.

                e: are you sure the tail/head of your bones are in a good spot to begin with? Have you tried simply increasing the mesh density in the problem joints? What about removing all weight from the edge that makes the pocket? If the edge is a pocket it's because it's an axis edge (ie everything is basically revolving around that edge). Try to stop the edge from moving at all or give it so little influence that it has very little movement.

                e2: find a tutorial that shows you how to add a bone that imitates a bicep being flexed when the arm is bent and use that system to destroy pockets. If you are using a frame animated model type it really doesn't matter how many bones you use. It just has to work and shouldn't be a pain in the ass to work with.

                PS: If you go to my website http://www.onemadgypsy.com the only thing there is an armature tutorial. It's the same armature tutorial I posted here a long time ago but, at least you don't have to search around for it and the information may help you have some "aha!" moment or something. I mess with constraints a good bit in that tutorial. It might even serve as a good introduction to constraints. You may want to download the slides (link at the bottom of the post) because I will be stripping that entire site and reworking it to be oriented to my engine in the next few weeks. Which also means I wouldn't bother becoming a member or anything. I intend to delete everything, database and all, and start entirely over.
                Last edited by MadGypsy; 05-16-2016, 10:10 AM.
                http://www.nextgenquake.com

                Comment


                • #9
                  @adam, foot-sync is basically impossible if you're rotating the legs to do it.
                  for instance, as soon as you move in a slightly different direction, you have to play an entirely different animation. the feet are going to slide.
                  doing it 'properly' basically requires 4 different animations all getting blended together based upon the direction and speed and stuff. it gets quite involved.
                  single-iqm is superior to separate-legs+torso if only because the verticies around the waist are not disconnected. also, you can twist multiple bones around the waist/spine to smooth out the discontinuities so that it doesn't look quite so strange.
                  rotating the legs with just forwards+back animations is easier than making lots of different animations all synced to each other, but the final result isn't so good.
                  what I personally never figured out was how to get jumps smooth and not goofy.
                  Some Game Thing

                  Comment


                  • #10
                    @spike

                    I can imagine jumping would be difficult to do. If you wanted the feet to be perfectly synched on the ground, then there would have to be some level of latency between the player pressing jump, and the actual jump happening, because if the model was in mid-run (no feet on the ground) then how could it jump? Or if only one foot was on the ground, the jump animation would have to launch off of that one foot, which would require another check... Another thing I just thought of...if the skeletal animations are handled client-side, and the jump mechanics server-side, could there potentially be a mis-match between what the model looks like to the client vs. other clients/server on a multiplayer game given any lag? Would there have to be some prediction involved? I can see all that being a real nightmare if a perfect, realistic model was the goal...

                    @gypsy

                    downloaded your slides, thanks man! Learned a few things reading through them, that will help with constraints.

                    @not being satisfied
                    I was mostly refering to some of your older modeling projects I was keeping up on back in the day...I know what you're working on now is apples and oranges to modeling. I'm gonna go for round 2 on this ranger model. I'm going to really focus on keeping the geometry very clean and uncluttered, and properly rigging and constraining the rig where need be. Super clean.
                    'Replacement Player Models' Project

                    Comment


                    • #11
                      Here brah. Already rigged quake cloneman


                      https://drive.google.com/open?id=0B_...1A5Y0FkeGxEVU0

                      it shouldn't be too hard to adjust this to be less specific in some parts, subdivide it and sculpt it

                      edit: New Link - I returned the model to quads (edit mode: A[select all], Alt+J), killed all the armature transformations (pose mode: A[select all], Alt+G,R,S), adjusted the screen layout to be what you expect from blender > 2.49b (cause I made this in 2.49b), and removed unnecessary copies and layers in the scene.

                      edit2: returning this model to quads is not a perfect world result. It is what it is bro. If nothing else you have a halfway decent armature to play with. If you don't like having wireframe over solid simply make sure that only the model is selected and on the right in the object panel deselect the "wire" checkbox. The box I am speaking of is in the above image.

                      This is a version 2.63 file but, that shouldn't make a damn bit of difference if you are using a more recent blender. If you are using an earlier blender (<2.5) I'll have to give you the original copy. I actually upgraded the file from 2.49b to 2.63 under the assumption that you would be using a newer blender. If that assumption is wrong and you think this file will be useful to you, let me know and I will upload the original.
                      Last edited by MadGypsy; 05-17-2016, 07:35 AM.
                      http://www.nextgenquake.com

                      Comment


                      • #12
                        Thanks for all the info gathered here. It will take a bit to process.

                        I find it interesting/confusing that IQM is referred to as one model and MD3 as three split, as I make a custom animation skeletons for each model and have it all linked as one entity through having them physically linked or by them being assigned a parent.
                        I haven't ever created one with three parts (legs torso, head).

                        It also doesn't help that I try to keep the poly count down as,
                        when you do a wide movement like swinging your arms wide, it's hard not to squash some parts at one extreme of the movement. There is always separating the limbs completely but that makes it look like a plastic action figure.

                        Even tho' it causes problems, I find over-exaggerating the movements turns out better for me. It's cartoony but in some ways distracts from the unrealistic aspect.

                        Somebody, somewhere has probably hacked a Kinect sensor to relay basic mocap info to Blender. That would be damn handy.

                        I might be a bit rubbish at it but I find it enjoyable. Which helps.
                        Username : Atomic Robokid on Steam

                        Please check out my Quake made things:

                        https://www.indiedb.com/games/run-over
                        https://adam-freeman.itch.io/hazard
                        https://adam-freeman.itch.io/diver
                        https://adam-freeman.itch.io/beyond

                        Comment


                        • #13
                          @Somebody, somewhere has probably hacked a Kinect sensor to relay basic mocap info to Blender. That would be damn handy.

                          this

                          @It also doesn't help that I try to keep the poly count down ....

                          Sacrificing 100 poly's or so that may be necessary to the integrity of your animated model is a bad design. This is why you are having so many problems. If flash can run (at least) 15,000+ polys at max flash fps (60 to 120 depending on what device you are on) your 100 or so poly reduction doesn't amount to crap but a lot of wasted effort by you trying to ever get it to work in an animation. Use poly's where you need them. It will make your job easier and it isn't going to make much/any of a difference in the end regarding fps. Study, study, study and practice, practice, practice. People have been making bad-ass low/mid poly models that work/animate great for well over a decade. If you are having problems, you are doing something wrong. Personally, I would start by making sure your model has the proper mesh density in the joints. 3 loops brotha. If you are dead set on making models that do not have enough information then be prepared to be dead set on pockets and other anomalies. You aren't going to get quality results from something that doesn't have any quality to begin with. Imagine if your maker said..."Meh, I'll just give everyone one eyeball. Depth perception is overrated." ...and then complained that the world he created is just one accident after another. Necessary is necessary.
                          Last edited by MadGypsy; 05-17-2016, 06:07 PM.
                          http://www.nextgenquake.com

                          Comment


                          • #14
                            I read your original post earlier that linked to the mocap depository and as far as reference material goes it was very informative.

                            I really appreciate your efforts and I might work through for the education of it but I won't ever use somebody else's work. For better or worse, I prefer to make things from scratch.
                            It's limiting for sure and does mean that I have to accept that some things can only be as good as my current ability but I can live with that.

                            Luckily, I don't feel precious about that things I make, they can always be better and I don't have a problem with scrapping something and starting over, each time I get a little quicker and a little better at it.

                            This encompasses my problems with limb connections bending strangely, I'm not so low poly to be restrictive, I just prefer a more minimalist approach and I will over time learn how to better construct my joints.

                            As you mentioned it is practice, practice, practice that will make me better at this.

                            Thanks again for posting the links and tutorial. I will study them.
                            Username : Atomic Robokid on Steam

                            Please check out my Quake made things:

                            https://www.indiedb.com/games/run-over
                            https://adam-freeman.itch.io/hazard
                            https://adam-freeman.itch.io/diver
                            https://adam-freeman.itch.io/beyond

                            Comment


                            • #15
                              I hear ya on "other peoples work" but, everything you are doing is based on other peoples work. Using the resources I provided you with isn't a magic solution. There are still lots of modifications that need to be made in order to be usable for your needs. You also have to consider that the people that spent all this time making these things, want you to use their work. It gives it purpose. Don't you use Darkplaces for all your games? You didn't make that. How is this any different? Will you argue that you only use other peoples work when it's something you have no clue how to make yourself? Well, do you know how to make mocap files yourself? In order to not use someone else's work you would have to reinvent everything from the ground up all the way down to the device your stuff runs on and every component inside it. You couldn't use vertices, faces, edges, bones, any existing software or technology, any existing languages, file types, nothing. You would even have to invent an entirely new game genre, otherwise you are using the work of the first game that was ever created in that genre, and possibly even the works of the games that followed in that genre. When you perceive this, you realize that very little of anything you make is actually yours to begin with. Obama really wasn't all that far off when he said "You didn't build that.". For the record, I can't stand that guy and don't like admitting he was right about something so profound or anything else for that matter. You could say "I don't use other peoples work" all day long but, it's never going to be true. The best you could hope for is a flavor of a vision that many people before you made possible, utilizing tutorials (that are other peoples work), tech (that are other peoples work), concepts (that are other peoples work) and more (that are other peoples work) in order to accomplish it.

                              See what I'm saying?

                              I know I suck at writing things that don't sound confrontational. Just know that I'm not trying to be confrontational. I'm just throwing a wrench in your philosophy gears.
                              Last edited by MadGypsy; 05-18-2016, 11:02 AM.
                              http://www.nextgenquake.com

                              Comment

                              Working...
                              X