One walk cycle

  • #1, z darren-beckettTuesday, 28. February 2017, 14:59 hodinky 8 years ago
    Is there a way to have a character walk to a destination but to ensure the full walk animation is completed?

    I'd like to have a character animation start when the character stops walking, so there is a seemless join to the animations.

    Čestný člen

    384 Posts


  • #2, z afrlmeTuesday, 28. February 2017, 15:20 hodinky 8 years ago
    You mean play a end walk animation before triggering any actions/animations that should be executed/played upon reaching the destination?

    I guess it would be possible, but not very easy to sort out. You would probably need some loop to store the current walk frame inside of a variable or VS value & you would need to store the destination / destination object actions inside of another variable/table, then you would need to listen out for character stop, clear the destination actions, then call an end animation based on the direction the character is currently facing & then force it to play from the animation frame value you stored in the variable. Quite a bit of work involved & no guarantee the end result will be very smooth. I think you would also have to take into account which leg is currently the leading leg, so you would probably need 2 different end walk animations per direction.

    P.S: it would look weird if you played out the entire walk animation if for example the character reached the destination near the beginning of the walk animation.

    P.P.S: the only other thing I can think of is controlling the speed but there's no guarantee that will be accurate at all.

    Imperátor

    7285 Posts

  • #3, z darren-beckettTuesday, 28. February 2017, 22:13 hodinky 8 years ago
    You mean play a end walk animation before triggering any actions/animations that should be executed/played upon reaching the destination?
    Yes.

    I was thinking if it was forced to play the complete walk cycle then you could just use the "wait for character to stop" action, then play the required animation.
    But you're right, the character might reach the destination at the start of the walk animation and end up walking on the spot in order to finish the walk cycle.

    Čestný člen

    384 Posts

  • #4, z afrlmeTuesday, 28. February 2017, 22:52 hodinky 8 years ago
    If you haven't already played Broken Sword 1, then I recommend checking that game out. The walk, stepping, rotation, begin & end walk animations are really well done. Though Revolution Software use their own game engine "Virtual Theatre" it's something I would one day like to see Visionaire capable of easily allowing users to create walking animations like those. Having said that, the indie developers who made the Broken Sword 2.5 fan game also managed to create the walk animations like that too & they did that with ScummTM engine somehow.

    http://www.brokensword25.com

    I think it's very complicated to sort out decent end walk animations & even beginning walk animations as they require counting frames & storing the destination coordinates, destination object & destination actions. Maybe it would be easier to manage if Simon could create a Lua hook function to listen out for character start walk, end walk or near destination or something...

    Imperátor

    7285 Posts

  • #5, z marvelWednesday, 01. March 2017, 12:18 hodinky 8 years ago
    I also recommended that the character should finish the whole walk-animation, so that he doesn't stand abruptly after he had his feet in the air just a moment ago. 

    I spoke with Simon about it a while ago but he was sceptical - I guess because he thought that it might look strange when the character walks at the spot until the animation is finished. 

    But I'm still sure that it would provide a way better walking animation. We see that behavior in many modern adventure games.  

    Probably this would lead to the best result:
    1. The character should make slightly smaller/bigger steps when he reaches the destination... based on the remaining frames of the walking animation. Probably there must be some kind of intelligence. 

    2. There could be an optional animation, that sets the character in a standing position AFTER finishing the walk animation.

    3. There should be a turn-animation when the character moves on to another destination.

    This means more work for the animator, but I'm sure it will lead to the best result. Lee is right, Broken Sword does this right for more than 20 years now smile

    Zabiják klíčů

    599 Posts

  • #6, z afrlmeWednesday, 01. March 2017, 13:04 hodinky 8 years ago
    I also recommended that the character should finish the whole walk-animation, so that he doesn't stand abruptly after he had his feet in the air just a moment ago. 

    I spoke with Simon about it a while ago but he was sceptical - I guess because he thought that it might look strange when the character walks at the spot until the animation is finished. 

    But I'm still sure that it would provide a way better walking animation. We see that behavior in many modern adventure games.  

    Probably this would lead to the best result:
    1. The character should make slightly smaller/bigger steps when he reaches the destination... based on the remaining frames of the walking animation. Probably there must be some kind of intelligence. 

    2. There could be an optional animation, that sets the character in a standing position AFTER finishing the walk animation.

    3. There should be a turn-animation when the character moves on to another destination.

    This means more work for the animator, but I'm sure it will lead to the best result. Lee is right, Broken Sword does this right for more than 20 years now smile
    I think Simon could easily implement (well maybe, not that easily, but still) a begin walk animation as that just needs to be played before walking if rotation is not needed (otherwise the animator can include the begin walk animation in the rotation animation).

    The end walk animation is complicated because it all depends on which walk animation frame was last shown before character stops, which you would then need to use to determine which frame the end walk animation should play from.

    One thing that would really make things easier from an animation perspective is if you could independently animate the left leg from the right leg, thus allowing stepping (the character should only walk if the player clicks on a coordinate far away enough from the active characters current position to be able to take at least one walking step).

    If you were to implement the ability for the engine to play the walk animation to the end then it should be optional, but again it would be better if individual legs could be animated independently so you don't have to see character doing the entire walk animation if they stopped walking near the beginning - or maybe could allow user to enter a range which determines what should be played. If frame < x play to x. My other concern with that is it depends on how you have animated the walk animation as not everyone starts off with a frame from the idle position & ends with feet near idle position. In my case for ALLD I picked specific frames to make it look like we had a begin walk rather than the protagonist just starting mid stride, but I did this because I used the update character position on frame change method rather than sliding to make it look like his feet were firmly planted to the ground.

    I do think that all of these things would be possible with Lua script & a bit of trial & error to find what works best, but an in-house pure animation option would be preferred.

    Imperátor

    7285 Posts

  • #7, z sebastianWednesday, 01. March 2017, 14:25 hodinky 8 years ago
    If you haven't already played Broken Sword 1, then I recommend checking that game out. The walk, stepping, rotation, begin & end walk animations are really well done. Though Revolution Software use their own game engine "Virtual Theatre" it's something I would one day like to see Visionaire capable of easily allowing users to create walking animations like those. Having said that, the indie developers who made the Broken Sword 2.5 fan game also managed to create the walk animations like that too & they did that with ScummTM engine somehow.

    http://www.brokensword25.com

    I think it's very complicated to sort out decent end walk animations & even beginning walk animations as they require counting frames & storing the destination coordinates, destination object & destination actions. Maybe it would be easier to manage if Simon could create a Lua hook function to listen out for character start walk, end walk or near destination or something...
    As far as i know the BS 2.5 team did a lot of LUA stuff in their game. I remember that i once opened the games data.b25c file with an extractor and found all game resources.
    Maybe the Dev-team could have a look and get some inspiration on how they solved this...
    wink

    Kapitán

    2346 Posts

  • #8, z bonesWednesday, 01. March 2017, 18:15 hodinky 8 years ago
    With 3d characters and 2d cut-out characters (Spine, Dragonbones, Spriter) it is much easier to provide smooth blending and mixing between animation states, and mask parts of the animation (for example, combine two animations while hiding one or more parts/mixing parts).

    Engines like Unity and Godot support this type of blending out-of-the-box. I mentioned animation blending for Spine imported characters to Simon, and he answered he would have to completely rewrite the animation system to make blending/cross-fades possible - which is not going to happen anytime soon.
    (See http://www.visionaire-studio.net/forum/thread/visionaire-5-p...!/18/#178)

    As it stands, Spine imported characters also jank from one animation state to the next state in Visionaire.

    However, actually implementing animation blending in a game engine is quite a hard thing to do. Better focus on getting the new V5 running stable with all the roadmap features first.

    Bažant

    48 Posts

  • #9, z afrlmeWednesday, 01. March 2017, 18:25 hodinky 8 years ago
    With 3d characters and 2d cut-out characters (Spine, Dragonbones, Spriter) it is much easier to provide smooth blending and mixing between animation states, and mask parts of the animation (for example, combine two animations while hiding one or more parts/mixing parts).

    Engines like Unity and Godot support this type of blending out-of-the-box. I mentioned animation blending for Spine imported characters to Simon, and he answered he would have to completely rewrite the animation system to make blending/cross-fades possible - which is not going to happen anytime soon.
    (See http://www.visionaire-studio.net/forum/thread/visionaire-5-p...!/18/#178)

    As it stands, Spine imported characters also jank from one animation state to the next state in Visionaire.

    However, actually implementing animation blending in a game engine is quite a hard thing to do. Better focus on getting the new V5 running stable with all the roadmap features first.
    That's not to say it's impossible for us to actually create it ourselves with Lua script as we can create loops & event listeners/handlers to listen out for certain things, store the relevant data then act upon it. It's just complicated is all & it's possible that the stored frame might be a couple of frames off. I vaguely recall trying something out last year which involved animation index swapping for walk animations & it kept messing up. I had same issue with trying to store the current playback position of sound files with Lua script then resuming them after scene change - it ended up being a second or so off, so it didn't end up resuming correctly.

    Imperátor

    7285 Posts

  • #10, z darren-beckettWednesday, 01. March 2017, 18:26 hodinky 8 years ago
    I checked out the Broken Sword 2.5 videos on youtube, I think they've done a pretty reasonable job of it.
    I may look at implementing something similar.

    Čestný člen

    384 Posts

  • #11, z afrlmeWednesday, 01. March 2017, 18:53 hodinky 8 years ago
    I checked out the Broken Sword 2.5 videos on youtube, I think they've done a pretty reasonable job of it.
    I may look at implementing something similar.

    Game is free on the website I linked. I think was small-ish download too. Not a very long game.

    Imperátor

    7285 Posts