Announcement

Collapse
No announcement yet.

IQM Skeletal Animation

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

  • #16
    Hey, please know that I wasn't being ungrateful.
    I tried to give you rep+ for your efforts but the system wouldn't let me.
    "till I spread the love around". I won't forget tho'

    Re: other people's work.

    I hear you but I have to try where I can. That's just the way I am.

    It's interesting point you raise, as there can be a fine line between influence and plagiarism.

    In my projects, I make everything you can see, The maps, textures, models, skins, animations. I place the lighting, actors, write the story and record the voice overs.
    In my current project I have recorded a lot of the sfx too but that, I admit is incredibly time consuming as you can imagine: hunting down the perfect sound to record and process.
    I hope those things at least reflect me, they might have similarities to other people's work but I never directly use their work and I don't sit down and copy side by side.
    It's the degrees of separation that makes a difference, I might look online at monsters for ideas but then I look away and sketch my own, I re-sketch it again and again, over and over. Then I render it and animate it.

    There is an immense amount of gratification that I get from seeing it then shamble around.
    Yes, it isn't Pixar but it is mine, as much as it can be.

    I feel the coder's is a harder job, much harder.
    I know he puts his own spin on it but it is (I imagine) near impossible to create much original work when there are strict constraints on what does or doesn't work.
    Plus as you say, there is nothing really that hasn't probably been made already and pushed into this antique engine.

    All I can do is try and hope I get better.

    There is a reason you are writing your own engine instead of using somebody else's, right?
    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


    • #17
      @rep... it's cool, it means you repped me before and I appreciate that.

      @your own work/degrees of separation

      I can dig that. I have similar ideals. I play to my strengths though. I'm totally going to use mocap for my animations. Not out-of-the-box but, I'm definitely going to let the supplied animations lay the groundwork for me. There is a lot that needs to be done to those animations to make them sensical to use in a game.

      @build my own engine

      Honestly, If FTE was more mobile friendly and allowed me to package it as a google play ready android app. I would simply use FTE and pay spike royalties. I'm building an engine because the engine I want to use sucks on mobile. I would much rather spend time making my game than having to build an engine too.

      @your art/games

      Personally, I think your games are awesome. I was blown away when I saw the Diver web page. I did not expect things to be so solid. In short, IMO you do a great job. I'm not the type of person to just hug and kiss you to make you feel good so, I really mean what I say.

      I don't think we are all that different regarding how we feel about making our own stuff. The only main difference I see is that I would rather utilize others work and provide a cleaner product for things I'm not very talented in so I can apply all of my energy to the things I am good at. My weaknesses are textures and animations. Some highly talented person(s) has already made these things for me to use. I have no issue giving them credit for it. There is still an "everything else" of things to showcase my strengths. IMO rarely are games made by one person in the first place. To use another persons work is like adding a member to my team. Of course I am referring to work that was released and licensed in such a way that was fully intended for others to use. I'm not trying to add Tony Hawk or Super Mario to my game...lol.
      http://www.nextgenquake.com

      Comment


      • #18
        I found a website that will take a model in the T-man position and will auto-rigg it for you, then you can use a library of animations to sequence. ill find the book mark here in a bit. i tried it and it does work nicely though my uploaded model wasnt a t-man frame.. but it still worked.
        www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

        Comment


        • #19
          I don't know if you guys/girls are familiar with MakeHuman but, it is some incredible free software. The stuff you make with it has the most open license you can get (CC0). I was messing with this a couple years ago and it was really good and really crappy all at the same time. It's come a long way in that time. It's also fully Integrated into blender. If you followed my MoCap tutorial you are already set up. You just need to go in file/preferences/addons and check the other MakeHuman addons.

          MakeHuman | Open source tool for making 3d characters

          A little taste of it's versatility...



          Last edited by MadGypsy; 05-18-2016, 09:38 PM.
          http://www.nextgenquake.com

          Comment


          • #20
            https://www.mixamo.com/


            [ame]http://www.youtube.com/watch?v=osSGZDmY-vE[/ame]
            Last edited by R00k; 05-19-2016, 01:21 AM.
            www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

            Comment


            • #21
              @R00k

              Hahahaha! That's fucking hilarious! Whenever you get a frag, your player model could do that stupid dance. I might give that website a shot, just to see what it does.

              @Gypsy

              Thanks for the download bro. Gonna dig into it now. I've been using Blender 2.69 for a long while now on my PC, so should work no problem.
              'Replacement Player Models' Project

              Comment


              • #22
                I found this whilst digging through the web, it is a quick CSQC tutorial written by Spike. I don't know how long ago, but it was posted on a mod page called AGR fairly recently:

                Idiots guide to CSQC by Spike AGRMania!

                This part was particularly useful regarding IQM skeletal animations:

                Advanced Skeletal Animation (FTE_CSQC_SKELETONOBJECTS):

                When animating players and such, you may desire more than just frames.
                If you�re using a skeletal model format (like IQM), then more complete bone control becomes available to you.
                When your entity is first spawned after you set the model, add some code like:
                self.skeletonindex = skel_create(self.modelindex);
                Each frame, update your .frame, .frame2, .lerpfrac, .frame1time, .frame2time accordingly and then call:
                skel_build(self.skeletonindex, self, self.modelindex, retainfrac, firstbone, lastbone, addfrac);

                That call needs some explaining. Especially the last four arguments.
                retainfrac is what fraction of the pose info to retain. At the start of each frame you should generally pass 0. Later calls will generally pass 1.
                addfrac is what fraction of the animation data to add. Note that this also serves as a sort of scaler. All skel_build calls for each bone in a single skeletal object should add up to 1 to avoid extra scaling.
                Using these two values you can blend multiple animations together, for instance allowing running animations to fade into a standing animation, or to blend both sideways and forwards running animations together at rates depending on direction+speed in order to achieve foot-sync.
                firstbone and lastbone provide a way for you to affect only a specific region of the model. Beware that this requires that your skeleton has bones that are carefully ordered.

                If firstbone is 0, it�ll be corrected to 1. Bone 0 is not otherwise valid, as 0 refers to the entity position itself.

                If lastbone is 0, it�ll be replaced with the total bone count.

                If ordered correctly, you can split the model by legs+torso by a bone at the base of the spine. With that achieved, you can find the spine bone with skel_find_bone(self.skeletonindex, �spine1�) or so (depends what your model calls it), and then build the two parts of your animation with:

                float() playerpredraw =
                {
                //interpolate origin, and calc displacement
                //note: you probably want to replace this with prediction if you�re working on the local player�s entity.
                float frac = (time � self.lastupdate) / (self.lastupdate � self.prevupdate);
                frac = bound(0, frac, 1);
                vector newpos = self.prevorigin + (self.lastorigin-self.prevorigin) * frac;
                vector moved = newpos � self.origin; //this is how much we�ve moved since the last render frame, note that it implies frametime.
                self.origin = newpos;
                //determine animation weights
                makevectors([0, self.angles_y, 0]); //set v_forward,v_right vectors so we can do dot products to see how much of which direction the entity moved in.
                self.forwardweight += fabs(v_forward*moved) * 32; //scaler should rise to 1 after 0.1 secs when moving at 320qu
                self.sideweight += fabs(v_right*moved) * 32; //scaler should rise to 1 after 0.1 secs when moving at 320qu
                //clamp
                float sc = self.forwardweight + self.sideweight;
                if (sc > 1)
                sc = 1/sc; //greater than 1 would add negative legs�
                else if (moved_x || moved_y)
                sc = 1; //don�t drop any movement weights if we�re moving
                else
                sc = max(0, sc � frametime * 10); //drop down to 0 over 0.1 secs if we stopped moving.
                self.forwardweight *= sc;
                self.sideweight *= sc;
                self.lerpfrac = 0; //just in case�
                //add forward animation (retain frac = 0 to reset it)
                self.frame = $forwardanimation;
                self.frame1time = (self.forwardtime += frametime * (v_forward*moved));
                skel_build(self.skeletonindex, self, self.modelindex, 0, 0, spinebone, self.forwardweight);
                //add side animation (retain frac = 1 to not overwrite forward)
                self.frame = $sideanimation;
                self.frame1time = (self.sidetime += frametime * (v_right*moved));
                skel_build(self.skeletonindex, self, self.modelindex, 1, 0, spinebone, self.sideweight);
                //add idle animation (retain frac = 1 to not overwrite directions)
                self.frame = $standanimation;
                self.frame1time = (self.sidetime += frametime);
                skel_build(self.skeletonindex, self, self.modelindex, 1, 0, spinebone, 1-(self.forwardweight+self.sideweight));
                //add torso animation (retain frac = 0 to reset torso parts. note that this doesn�t affect legs due to the bone ranges)
                self.frame = $torsoanimation;
                self.frame1time = time � torsostarttime;
                skel_build(self.skeletonindex, self, self.modelindex, 0, spinebone, 0, 1);
                return FALSE;
                }

                and in your spawn code:
                setmodel(self, �progs/skelplayer.iqm�);
                self.skeletonindex = skel_create(self.modelindex);
                self.predraw = playerpredraw;
                self.drawmask = MASK_ENGINE;
                and when its killed:
                skel_delete(self.skeletonindex);

                Then when your entity is added to the scene (via addentities), the predraw function is called to interpolate your entity�s origin and update its skeltal object.

                You�ll have to ensure your parse code updates lastupdate and prevupdate timestamps, along with lastorigin and prevorigin, that it updates the angles.
                $forwardanimation etc frame macros will need to be set to the correct framegroups within the model (note that this code requires framegroups, and would become more complex if you wished to animate between descrete frames for each animation, but that doing so is possible by using lerpfrac and frame2 instead of frame1time).

                The code does not interpolate angles, which is something you�ll probably want to add, as well as add a concept of actions so that you can blend between idle+shoot animations as appropriate.
                It seems like there are a few others searching around for info regarding this stuff, so I figure the more places it can be found the better.

                Thanks Spike.
                'Replacement Player Models' Project

                Comment


                • #23
                  hello dutch, did you look this thread?
                  http://quakeone.com/forums/quake-tal...-0-0001-a.html
                  the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                  syluxman2803

                  Comment


                  • #24
                    No I never came across that. Awesome, thanks nahuel!
                    'Replacement Player Models' Project

                    Comment


                    • #25
                      Originally posted by Dutch View Post
                      No I never came across that. Awesome, thanks nahuel!
                      these csqc work is bad done, because he didnt use custom stats!
                      but itś easy to fix it

                      Aniway the frame stuff and animations is really strange
                      the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                      syluxman2803

                      Comment

                      Working...
                      X