Cheering Monkey animations

Cheering Monkey animations

Postby theTomasPat » 06 Jan 2019, 04:36

So I'm new to STK and would like to help out a bit. For my first contribution I was wanting to do some updates to the cheering monkey library asset. I figured this would be an easy introduction to STK development and Blender as well, seeing as how I've never used it before.

I've posted gifs of the animations so far that can be found here: https://imgur.com/a/XSGEtLl
(the banana throw is still very WIP).

I'm absolutely open to constructive criticism and ideas for more actions!
Last edited by theTomasPat on 22 Jan 2019, 05:42, edited 1 time in total.
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Auria » 07 Jan 2019, 00:07

Hi, nice work, it looks really good!
Image
User avatar
Auria
STK Moderator
 
Posts: 2975
Joined: 07 Dec 2009, 03:52

Re: [WIP] Cheering Monkey animations

Postby Ludsky » 07 Jan 2019, 14:17

Wow, it's funny; very good work :)
User avatar
Ludsky
 
Posts: 681
Joined: 07 Aug 2011, 12:52
Location: France

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 13 Jan 2019, 03:14

I added a new animation to the monkey.
(attached but also hosted here: https://imgur.com/1kIR0sj)
monkeyKnees.gif
Monkey's knees jitter on anim cycle
monkeyKnees.gif (530.75 KiB) Viewed 2746 times


The animation is finished but I'm running into some issues when the animation cycles. The knees jitter like crazy and I'm having trouble figuring out why that's happening. Can someone help me out with this?

The monkey's legs are rigged using IK and the keyframes on the targets are the exact same on the first and last frame of the anim set. I had just copy-pasted all the keyframes so there should be no difference between the start and end when the cycle loops. I'm getting this problem with at least one other anim set although the jitter in the knees is nowhere near as bad as with the bum spanking.

I'm guessing this is an export bug but I would really appreciate any help in diagnosing the issue!
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Auria » 14 Jan 2019, 04:06

Can you please share the blender file? This will be hard to debug without access to the file

Unfortunately, this particular issue seems like it may be hard to fix
Image
User avatar
Auria
STK Moderator
 
Posts: 2975
Joined: 07 Dec 2009, 03:52

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 14 Jan 2019, 18:34

Absolutely!

I've attached the blend file below.
Attachments
stklib_monkeyCheering_a_TomasP.zip
blend file for monkey cheering library asset
(340.62 KiB) Downloaded 45 times
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Auria » 15 Jan 2019, 00:44

Thanks, I have created an issue : https://github.com/supertuxkart/stk-code/issues/3710

Unfortunately, since this is likely quite complex to debug, it may take quite some time before we have a fix
Image
User avatar
Auria
STK Moderator
 
Posts: 2975
Joined: 07 Dec 2009, 03:52

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 17 Jan 2019, 05:28

Ok so this might be pretty long but I think I found a solution to this issue. I'm writing all of this as a resource for anyone who might be interested in working on animation for STK as well.

The short version is basically that, as far as I can tell, Blender doesn't update pole targets in the same UI update as the rest of the IK chain on Suzanne's legs. I'm using Blender 2.79 and I don't know if this is consistent across versions but I'll come back to this issue in a little bit.

The way that the animations are setup in my .blend file is that everything is animated on the main timeline. I'm new to Blender and don't yet understand actions and the NLA editor so everything is just dumped onto the main timeline. That means that an animation set's <start> frame isn't isolated from the previous set's <end> frame. For simple rigs with only FK controls or objects animated using only their LocRotScale (I believe this is called IPO in Blender?), this wouldn't present an issue in itself. This is because the exporter iterates over every frame in the timeline and grabs the information from every keyframe in every bone and for objects animated without bones, the IPO keyframe data is used instead.

The issue I'm having with Suzanne's knees is because Blender seemingly doesn't compute IK bone rotation using pole targets in the same update frame as the rest of the armature. This means that when the exporter iterates over the timeline, looking for keyframes, it's getting rotation data for bones that haven't fully updated yet.

I've included an example in this gif:
IKLateUpdate.gif
Example of updating IK chain late


You'll notice that in the example, I'm going frame by frame using the right arrow key and that I reach the end of one anim set on frame 196 and start the bum spanking anim set on frame 197. On frame 197, the pole targets (the selected objects) are in their proper place but the knees are all messed up. One frame later though, the knees are rotated correctly and the pole targets haven't moved (besides the slight inherited movement from the parent object). This is where the funkiness was coming from in the earlier gif of Suzanne in-game.

Now for the solution. It is admittedly very hack-y but it gives satisfactory results; at least until a better solution is found. I ended up shifting every keyframe in the animation set forward by one frame and duplicating the keyframes on the <start> frame. This means that frames 197 and 198 in my blend file are identical. Then I made sure that the <start> timeline marker was only on frame 198.

Here's an example:
IKLateUpdateWithSolution.gif
Example of solution to late IK update


The leg bones are still always updated one frame late but as long as the pole targets don't move very much from one frame to the next, it's almost impossible to tell that it's incorrect.

Now I suppose it's worth talking about "real" fixes to the problem and not just silly solutions. I believe the problem comes from Blender. I've tried Googling the issue of the IK chain not updating all at once but can't seem to find any one else talking about it. I also don't have the expertise to comb through Blender's source files and confirm whether or not updating IK chains on a different update call is intentional.

Perhaps there's a way to invoke an extra update through the Blender API? This could be done in the spm exporter before grabbing the keyframe data. This would ensure that the data is correct and not "off by one frame". But again, I believe this is only possible if there's an API method to invoke an update without changing frames. I don't know Blender's API so maybe one of the devs could confirm or deny this.

Another point is that this behaviour could be different in 2.80. I haven't had the chance yet to try 2.80 but that doesn't change the fact that the STK Addons don't yet support 2.80 so animations couldn't be exported anyway. But it's possible in the near future that this won't even be a problem anymore.

One last point I can think of is that perhaps my armature isn't setup properly. I have the pole targets setup as empty objects that are parented to the root bone. I've looked at other videos and tutorials since then and it seems that the "normal" way to setup pole targets is to use actual bone objects that are a part of the armature. That could be why the rotations on the IK chains are being updated later. I haven't been able to test this yet but I would like to in the near future and if I do, I will post an update.

Also, if I got any information wrong, please let me know! Like I said, I'm new to Blender and STK and there's a very good chance I've misunderstood some implementation details. And I realize all of this work for a background character seems crazy but I would like to contribute some more significant pieces to STK in the future and I think this is a good opportunity to identify some technical boundaries.

EDIT:
I forgot to add an example of the fixed monkey in-game!
monkeyKnees_fixed.gif
MonkeyKnees fixed
monkeyKnees_fixed.gif (561.68 KiB) Viewed 2564 times
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Alayan » 17 Jan 2019, 11:48

By the way, theThomasPat, it's nice to see you working on modelling. STK has a need for artists to improve its visual quality with better models, animations, etc. and your work is very much welcome.

Small enhancements and fixes like you have done until now are a great way to get into the project, I hope you will stay. :)

What are the next things you'd like to tackle ?
Alayan
STK Moderator
 
Posts: 220
Joined: 25 Mar 2012, 22:11

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 18 Jan 2019, 00:57

I've been looking through the Github issues and it looks like a lot of the tickets tagged with "3D modelling" are pretty old and irrelevant with the newer versions of STK (like the Ravenbridge Mansion tickets. Ravenbridge Mansion became Blackhill Mansion right?).

Unfortunately I don't know much about the lower-level tech art stuff like shaders but maybe one day I'll be able to make big contributions like Samuncle :P

Besides Github issues though, I think I would like to work on updating the karts and try to make my own tracks. I would also really like to update the intro cutscenes but I would like to build up a bit more confidence before tackling that task!

I feel like the github issues should take priority but after those, is there anything in particular that the dev team would like to see updated first?
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Auria » 18 Jan 2019, 01:50

theTomasPat, of course it is up to you to decide what interests you the most. One possibility to consider : if making a full new track from scratch is too intimidating a task, you could take one of the older tracks, for instance Scotland (Nessie's Pond) and gradually improve it
Image
User avatar
Auria
STK Moderator
 
Posts: 2975
Joined: 07 Dec 2009, 03:52

Re: [WIP] Cheering Monkey animations

Postby QwertyChouskie » 18 Jan 2019, 01:55

Actually Ravenbridge Mansion is replacing Blackhill Mansion soon, it's already in the donation gift package. Cutscenes and kart animations IMO are great areas to work in. I don't think making cutscenes better than the current ones would be very hard. ;) A new overworld eventually needs to be done, but this is a pretty big undertaking...
Not an official dev, but a huge fan of STK!
User avatar
QwertyChouskie
 
Posts: 382
Joined: 29 Jun 2016, 14:57

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 18 Jan 2019, 03:09

@Auria: Yes! That's a great idea. I have a few ideas for new tracks with interesting drivelines but it definitely makes more sense to start off updating existing tracks.

@Qwerty: Sorry, my mistake! I'm actually quite thankful there will be changes to Blackhill. The winding hill leading up to the mansion and especially the 180° turn inside the mansion in the current Blackhill are really tricky!

Do you know who is working on the Ravenbridge Mansion? Issue #3629 (https://github.com/supertuxkart/stk-code/issues/3629) lists quite a few critiques. I could probably help out with that track as well.
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby mr_Spoon » 18 Jan 2019, 21:33

Cool animations.
mr_Spoon
 
Posts: 64
Joined: 25 Aug 2011, 20:54

Re: [WIP] Cheering Monkey animations

Postby Alayan » 19 Jan 2019, 01:56

Do you know who is working on the Ravenbridge Mansion? Issue #3629 (https://github.com/supertuxkart/stk-code/issues/3629) lists quite a few critiques. I could probably help out with that track as well.


Ravenbridge Mansion is samuncle's track, but he doesn't seem to be working on it to fix these issues. However, the .blend for the track doesn't seem to be available right now, so you can't tackle correcting this until we've fixed this issue. :)

Otherwise, I second Auria suggestion of updating an existing track, it will likely be easier for you than doing a track from scratch. Though you can also try this of course, but the first attempt will likely have many mistakes.

I highly recommend you discuss here the changes you want to make to a track before going ahead. This will give you some valuable feedback, especially for any change which is not purely cosmetic, i.e. impacts gameplay and not only visuals ; especially as some of the tracks most in need of a visual overhaul would also benefit from some deeper changes.

Doing things like better animations for karts would be greatly useful for the project (if you need some code-side update, ask to see what can be done), but when you will feel confident enough to tackle your own new track, my feedback advice applies even more. Some track elements, like a good driveline or the integration of the driveline within the track's theme, are hard to change once they're done, so an early feedback will save you from having to redo a lot of work (or from settling with an inferior version to not throw out work on details done too soon). Once the core of the track, how it will play and how the track's theme is built around the driveline, is good, you can focus on adding details, models, nice textures, etc. The Black Forest track had this feedback process starting a bit late (many elements were already done when the first version was posted), but you can see in its thread just how much improvement was made possible thanks to this feedback loop with new alpha versions of the track.
Alayan
STK Moderator
 
Posts: 220
Joined: 25 Mar 2012, 22:11

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 19 Jan 2019, 05:18

Those are really solid recommendations! I'm in the process of writing out my list of things I'd like to work on and I'll definitely make new posts for them to get feedback along the way. Thanks everyone :)


Also, I think I'm ready to upload the cheering monkey. I understand it's going to have to go through a review process before it's considered for inclusion so I'm just going to upload a zip file with everything in it here. I've included the source .blend file as well in case there are other modifications that need to be made.
Attachments
stklib_monkeyCheering_a.zip
Cheering Monkey files
(346.17 KiB) Downloaded 40 times
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby Auria » 22 Jan 2019, 02:31

Hi, thank you, I have tested the animations in-game and they look really good. I have committed the new animations to the repository :)
Image
User avatar
Auria
STK Moderator
 
Posts: 2975
Joined: 07 Dec 2009, 03:52

Re: [WIP] Cheering Monkey animations

Postby QwertyChouskie » 22 Jan 2019, 03:10

Congrats on your first contribution! (Well, not counting https://github.com/supertuxkart/stk-code/issues/3610 ;) )
Not an official dev, but a huge fan of STK!
User avatar
QwertyChouskie
 
Posts: 382
Joined: 29 Jun 2016, 14:57

Re: [WIP] Cheering Monkey animations

Postby theTomasPat » 22 Jan 2019, 03:40

Whoa, thank you for committing it! :D

Is it possible to change the title of this thread? I think it's appropriate to remove the "[WIP]"
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: [WIP] Cheering Monkey animations

Postby QwertyChouskie » 22 Jan 2019, 04:48

I think if you edit the first post you can change the title.
Not an official dev, but a huge fan of STK!
User avatar
QwertyChouskie
 
Posts: 382
Joined: 29 Jun 2016, 14:57

Re: Cheering Monkey animations

Postby MTres19 » 28 Jan 2019, 16:54

I added a license file for the monkey to make sure your work can be attributed to you. Since samuncle released the model under the CC-BY-SA 4.0 license, your modifications have to be considered under the same license. Hopefully that's OK and thanks for your contribution.
User avatar
MTres19
 
Posts: 191
Joined: 17 Aug 2015, 20:15

Re: Cheering Monkey animations

Postby theTomasPat » 28 Jan 2019, 21:35

Sounds good to me :)
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Re: Cheering Monkey animations

Postby tempAnon093 » 02 Feb 2019, 23:54

Thank you very much! One of the issues I noticed with the game is that the animations of default characters like the monkeys and racers are very simple tweens. If anyone has played as the add-on Tysone-Tan/3DMish characters (eg. Dashie) then you will probably notice how much difference the animations make. Compare those with the originals, which look robotic in comparison.
So I am always happy to hear someone putting in time and effort to improve the game animations. It's not easy but it makes a huge difference.

I may have missed an update in the thread, but I have only a few constructive suggestions:
1) The first animation of the monkey doing a flip is very well done! With the part where the monkey is on the ground and moving their upper body up and down, I personally think it would look a bit smoother if they didn't move up and down as far (maybe about half or three quarters of the distance?) so that it provide a bit of rest between the flips while still being dynamic and moving.
2) With the animation of the banana being thrown upwards and caught, would it look better to have the banana do a flip while in the air? Or would this be too fast and busy? I'm not sure...
3) With the banana being thrown forward, maybe instead of spawning the banana out of thin air in front of them, have it appear once the monkey brings their arm back past their torso (so it looks like it's being taken out of their pocket. Yes, I realize they don't have pockets.)

Again, thank you for doing this.
tempAnon093
 
Posts: 131
Joined: 02 Feb 2019, 12:09

Re: Cheering Monkey animations

Postby Alayan » 05 Feb 2019, 16:31

I'm all for better animations, but I tested Dashie, and the character's head turning a lot when turning looks plain bad in two situations :
1) when doing small trajectory adjustments, the head will move back and forth in a very unnatural way. It also harms concentration on one's driving. Only the hands should move.
2) when skidding, the head movements are very weird. This would likely require an update of the code itself to be able to differentiate the situations.
Alayan
STK Moderator
 
Posts: 220
Joined: 25 Mar 2012, 22:11

Re: Cheering Monkey animations

Postby theTomasPat » 06 Feb 2019, 02:27

Sorry tempAnon093, I only just noticed your post.

Thank you for your feedback! If I ever revisit the monkey, I'll refer back to them! Actually most of what you've mentioned I've already noted for myself. I admit the anticipation for the backflip was kind of a poor choice. I had originally planned to do a different pose but I quickly realized I hadn't rigged it properly to allow that pose and by then I had already done 2 animations. I wanted to keep moving forward so I went with that weird crouch instead. As far as how much it bobs, I agree it could probably be toned down a bit, thank you!

A banana flip would be cool! I certainly think a single flip wouldn't make it too busy at all.

And as for the banana throw, making it look like it's being pulled out of a pocket makes a lot more sense! In fact, animating the banana reappearing probably isn't even necessary. The anticipation for the throw is only something like 3 frames and in that short of a time span, having the banana just appear in its hand would be totally acceptable.

I know the animation certainly isn't great but I did make some deliberate choices to simplify it because honestly, when you're racing around a track, the monkey is usually only visible on screen for a couple of frames anyway. And where it's a background character, it really shouldn't stand out too much. The only places the monkey really gets any screen time is during the GP win cutscene.

I also just tried out Dashie. It's super awesome seeing a racer with more fleshed out animations but I think I agree more with Alayan. They're a bit distracting. When you're stationary or going really slow and looking behind, the turning poses look great! but when you're going at speed, having the head turn that much is really distracting. The win and lose animations are a fantastic opportunity to show character though! And Dashie's win and lose animations are really fun :D

I think subtle leans are all that's needed. I don't know how many racers do that in their anims but I know Pidgin does. Also, it might be nice to have an animation pose for backing up straight, not just back-left and back-right.
theTomasPat
 
Posts: 17
Joined: 05 Jan 2019, 06:19

Who is online

Users browsing this forum: No registered users and 1 guest

cron