Adaptive Walking Motion

Discussion in 'Mod Discussions' started by zodiusinfuser, June 30, 2013.

  1. zodiusinfuser

    zodiusinfuser Member

    Messages:
    43
    Likes Received:
    11
    Hi All,

    I've been lurking around these forums for quite some time, watching the amazing discussions and ideas coming out of this community! It really pleases me to see so many people supporting Uber in making PA the best it can be :)

    One of the things that has always bugged me about RTS games is that the walking mechanics of most bots don't look that realistic. They tend to be fine when moving forward, but turning just looks silly. This is magnified when bots become larger, as is the case with the Monkeylord in SupCom. I think the only game that did this right was Universe at War with their Hierarchy faction (http://youtu.be/fUs5fKu9_8Y?t=39s).

    I was a TA modder back in the day, and tested out a number of ideas for how to make walking more realistic. In fact my 6-legged version of the script made it's way onto the C.O.R.E experimental in the TA:Escalation mod (http://www.youtube.com/watch?v=iRCqePtK6qw), my one notable contribution. Although not perfect, it was a significant improvement over the canned animation it previously had. Unfortunately, I never got chance to implement this for Supreme Commander :(.

    Although the bots in PA aren't that large at the moment, it would be great if there was the option for them to walk realistically, using inverse kinematics and "correct" foot placement. This is something I would like to create. I already have ideas of how to achieve it, after spending time in the hobby robotics community (here's an awesome example: http://www.youtube.com/watch?v=h_TlF6VJ_KU) and building my own hexapod.

    With all that being said I have two questions:
    - Are there any modding options at the moment for script to be able to control animation bones, and be able to perform collision checks with the terrain? (search didn't come back with anything useful).
    - Is this something people think would be of benefit for PA given the limited number of bots currently available and the overall scale of the game?

    Thanks

    Edit: Here's another video showing the kind of motion I would like to achieve https://www.youtube.com/watch?v=4nB2FqT81jg (also it's set on a planet like PA!). I don't think this game ever got released, which is a shame as it had some awesome concepts.
    Last edited: July 1, 2013
  2. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    Please Uber respond to this post. +1 to all said above, this man is a true gentleman.
  3. zodiusinfuser

    zodiusinfuser Member

    Messages:
    43
    Likes Received:
    11
    Thanks :D. I've updated my original post with a video that better shows the kind of motions I would like to create. Also I should clarify that I want to try this for more than just 6 legged machines, perhaps even making it into a tool that other unit makers can use to enhance their own bots (as I tried to do with TA).
  4. mushroomars

    mushroomars Well-Known Member

    Messages:
    1,655
    Likes Received:
    319
    Also a question, I'm not sure if this is entirely feasible with an IK rig designed specifically to adapt, but the strides each set of legs makes should be longer. Are the strides short because it is difficult to find a target for the IK solver and keep the system adaptive?
  5. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    Shorter strides for animations where IK is expected is because usually the system is just playing a single looping walk animation and the leg extensions needs to be able to reach all plausible height differences while still "landing" in the same spot. For biped based animation you can get away with switching stride animations on the fly for terrain slope changes is much more easily accomplished there's always going to be a point where one foot is on the ground directly below the character. You can blend from one animation to another and the foot on the ground will be roughly in the same spot on both. With quadruped or other multi-limb walk cycles you don't get that luxury, so the system has to be much more intelligent. You have to animate each limb independently or animate with a common "all feet on the ground" pose you can use to transition between.


    To answer the actual question in the post, it's not likely something you'll be able to script yourself into our engine. We're still figuring out this kind of thing, but it's plausible it'd be something we'll add ourselves anyways for our own units, or add specifically for mod devs.
  6. zodiusinfuser

    zodiusinfuser Member

    Messages:
    43
    Likes Received:
    11
    Sort of. My approach is to have IK be a visual effect on top a gait generator, which moves points around according to various rules. Limits have to be placed on how far these points move otherwise you end up with positions that the solver can't reach, or even having two legs intersecting (which is bad for real robots, as I discovered).

    The good thing with the system i've got in mind is that the limits can be assigned completely arbitrary and on a per leg basis.

    Edit:
    That's all presuming the IK is running off an animation system. The approach I'm proposing is to ignore all that and just have a gait generator take full control of the legs of the bot, meaning there's no walking anims, just an idle pose and the next IK target position, which gets updated every frame based on the units actual movement and the gait rules. Here's a prototype I did a long time ago: http://www.youtube.com/watch?v=lgRSC-BZ5_g (i've since refined the concept).

    Thats a shame, I had an awesome idea for a Mech Mod featuring bipeds, tripods, spiders and perhaps a few centipedes.
  7. neutrino

    neutrino low mass particle Uber Employee

    Messages:
    3,123
    Likes Received:
    2,687
    So you want the ability to write your own anim controller effectively. Yeah, this is something we probably would have to add to the engine itself.
  8. zodiusinfuser

    zodiusinfuser Member

    Messages:
    43
    Likes Received:
    11
    Hi Neutrino :)! I guess that is what would be needed to pull this off. I forget that things have moved on since the days of TA where animations where created completely by a unit's script.

    Despite the issue of taking control of the animations, I wonder if the underlying gait generator would be feasible with the current plans for PA. As I said earlier, the concept is to have a set of virtual points that move arounds according to the rules of the gait, so as long as the scripts are run on the server and have arrays this should be good. The only issue I forsee is integrating such a system with Chrono-Cam, as if you reload a save from an earlier point, the state of variables in the script would also need to be restored to guarantee that no issues occur with already moving units. Is this going to be possible?

    Thanks

Share This Page