Jump to content

[1.1.3] Kerbal Animation Suite


MrHappyFace

Recommended Posts

12 minutes ago, MrHappyFace said:

@nightingale just released the first mod that uses Kerbal Animation Suite's API, also featured in a Scott Manely april fools video. :D 

 

Which reminds me that I never gave you any credit in my haste to get that thread up! I'll fix that as soon as I get home.

Link to comment
Share on other sites

Updated my OP with the proper credit, and thanks for the link back!

I should also point out that your API class needs one small change to work with Unity 5 - you have to set the "legacy" flag on the AnimationClip object:

https://github.com/jrossignol/KerbalSports/blob/master/source/KerbalSports/KerbalAnimation/KerbalAnimationClip.cs#L170

There's also an issue that I attributed to Kerbal Animation Suite but didn't have time to investigate or report as I was rushing to get this all done for the deadline - if you look at all my animations, the decal on the EVA pack is offset by about 100 cm to the rear.  I suspect there's a problem with your default animation positions for that component.  If I'm right you should be able to reproduce by simply creating any new animation (I created the animations in KSP 1.0.5).

Link to comment
Share on other sites

@nightingale, I looked through your animations, and you didn't use any mixing transforms. Mixing transforms are a way to tell unity animation clips to only apply to certain bones in the skeleton, for example: If you added the left shoulder bone as a mixing transform, then the animation would only affect the left arm and shoulder. That would probably fix your issues, although mixing transforms wouldn't at all work for animations that affect the entire skeleton.

There is a way, with code, to make mixing transforms not apply to their children bones (shoulder -> arm -> elbow, etc.), which would allow you exclude specific bones, (such as the jetpack bone) but I didn't include it in the UI because programming with the old GUI system is quite tedious.

Also, I bought the game off the KSPStore, so I don't have access to the pre-release, which is why I haven't started updating this mod, or any of my other mods. :(

Edited by MrHappyFace
Link to comment
Share on other sites

28 minutes ago, MrHappyFace said:

@nightingale, I looked through your animations, and you didn't use any mixing transforms. Mixing transforms are a way to tell unity animation clips to only apply to certain bones in the skeleton, for example: If you added the left shoulder bone as a mixing transform, then the animation would only affect the left arm and shoulder. That would probably fix your issues, although mixing transforms wouldn't at all work for animations that affect the entire skeleton.

There is a way, with code, to make mixing transforms not apply to their children bones (shoulder -> arm -> elbow, etc.), which would allow you exclude specific bones, (such as the jetpack bone) but I didn't include it in the UI because programming with the old GUI system is quite tedious.

Also, I bought the game off the KSPStore, so I don't have access to the pre-release, which is why I haven't started updating this mod, or any of my other mods. :(

Although I now understand mixing transforms at a conceptual level, when I was initially doing the animations I didn't.  The bulk of my animations ended up having some rotations right down through the hips and feet, so I'm not sure if it would've been useful in the end (other than stuff like excluding the jetpack).  Anyway, wasn't a major issue for me to worry about it at the time - just wanted to let you know in case it was indeed something that needed fixing on your end.

Although I didn't try to get animator itself working, the API only needed that one change.  You'll have to add the new KSPUtil assembly reference and maybe change a handlful of references here and there, but otherwise I don't actually expect you'll have many issues.  Here's hoping!

Link to comment
Share on other sites

[irritating picture removed]

Sorry to be annoying, is there something I am doing wrong?  The menus wont appear.

edit:  no, I got it now, add one keyframe and they appear.  Sorry to be irritating.

 

Edited by Kokoro
because i am slow
Link to comment
Share on other sites

1 hour ago, Kokoro said:

[irritating picture removed]

Sorry to be annoying, is there something I am doing wrong?  The menus wont appear.

edit:  no, I got it now, add one keyframe and they appear.  Sorry to be irritating.

 

Asking a legitimate question is never annoying. The rest of us are here to help with those questions. What's annoying is when people post stuff like "1.1 update please" or "when will this mod be updated" a day or two after a KSP update. But a question about how something works... Ask away, that's what we actually enjoy helping with.

Link to comment
Share on other sites

  • 1 month later...

Hey all! Not sure I ever mentioned it, but I used this mod quite a bit to make custom poses in my comic. My favorite sequence so far involves not Kerbals, but their deadly enemies the Kerbulan Empire, shown here posing dramatically and beating the stuffing out of each other:

Spoiler

AbioHkr.png

I'm keeping a copy of 1.0.5 alive so I can continue to pose my Kerbals and Kerbulans until MrHappyFace has time to update. In the meantime if @nightingale or anyone else have hit upon a workaround I'd love to know about it. Cheers!

Link to comment
Share on other sites

9 hours ago, Kuzzter said:

Hey all! Not sure I ever mentioned it, but I used this mod quite a bit to make custom poses in my comic. My favorite sequence so far involves not Kerbals, but their deadly enemies the Kerbulan Empire, shown here posing dramatically and beating the stuffing out of each other:

  Reveal hidden contents

AbioHkr.png

I'm keeping a copy of 1.0.5 alive so I can continue to pose my Kerbals and Kerbulans until MrHappyFace has time to update. In the meantime if @nightingale or anyone else have hit upon a workaround I'd love to know about it. Cheers!

It was a one-line change to get the poses to work and be loaded in 1.1 (for Kerbal Sports), but I never actually tried to compile the full Kerbal Animation Suite in 1.1, so it may or may not be a simple change (this line, for anyone interested).  Unfortunately, I'm not in a position at the moment where I'm able to dig any deeper than that.

Link to comment
Share on other sites

  • 2 weeks later...
On 2016/5/18 at 11:23 AM, nightingale said:

It was a one-line change to get the poses to work and be loaded in 1.1 (for Kerbal Sports), but I never actually tried to compile the full Kerbal Animation Suite in 1.1, so it may or may not be a simple change (this line, for anyone interested).  Unfortunately, I'm not in a position at the moment where I'm able to dig any deeper than that.

I wish someone can make something on 1.1 continuation of this mod.

Link to comment
Share on other sites

  • 3 weeks later...
On 5/31/2016 at 4:56 AM, GSUI5051 said:

I wish someone can make something on 1.1 continuation of this mod.

From a semi-informed POV (I looked at the source) it looks like something changed in EVA animation that broke something and/or when KSP got ported to Unity 5.

I'm not going to lie; I'm just a notch above banging rocks together in terms of modding, but I'll take a whack at fixing something. Probably won't be able to fix it.

EDIT: Is the KerbalAnimationManager attribute new? Looks like it's new. I can't seem to find any documentation or mention of it anywhere. If it's new, that's the problem. Looks like the animation system for EVAs may have changed.

EDIT2: Turns out the KerbalAnimationManager attribute wasn't too useful in getting it to work. Also something to do with jumping... As far as I can tell, I patched the Animation Suite to use legacy animations. Someone will need to test it out more than the "open the GUI and stretch a bunch of body parts around" test I did. Send me a PM if you want to help test it or want the source or whatever.

Mucking around KerbalAnimationManager was basically a waste of time for patching. All it did was loop certain animations. It does suggest that this mod should switch from legacy to the current system. Not sure if the animation "layering" system is new or not.

Edited by robotguy4
Link to comment
Share on other sites

14 minutes ago, GSUI5051 said:

I can't play animation without opening the windows just like this. Do you know how to make this stuff? (The animation is a preset, but I can't make my kerbal wave arms while walking.)

Same - I'd love to know how to do this too. Like a arm/head animation while the walking animation is running and I have control over the direction of the kerbal.

 

EDIT:

On 4/1/2016 at 9:28 PM, MrHappyFace said:

@nightingale, I looked through your animations, and you didn't use any mixing transforms. Mixing transforms are a way to tell unity animation clips to only apply to certain bones in the skeleton, for example: If you added the left shoulder bone as a mixing transform, then the animation would only affect the left arm and shoulder. That would probably fix your issues, although mixing transforms wouldn't at all work for animations that affect the entire skeleton.

There is a way, with code, to make mixing transforms not apply to their children bones (shoulder -> arm -> elbow, etc.), which would allow you exclude specific bones, (such as the jetpack bone) but I didn't include it in the UI because programming with the old GUI system is quite tedious.

Also, I bought the game off the KSPStore, so I don't have access to the pre-release, which is why I haven't started updating this mod, or any of my other mods. :(

Hmmm so this is how you make animations that play on top of other animations like running/walking? I didn't know this was doable :confused: Any chance you could explain how?

Edited by Avera9eJoe
Link to comment
Share on other sites

7 minutes ago, Avera9eJoe said:

Same - I'd love to know how to do this too. Like a arm/head animation while the walking animation is running and I have control over the direction of the kerbal.

Press alpha1 to alpha9 (not on numpad!), tested on 1.0.5

--EDIT--

Mod+alpha1 to alpha9 also works

Edited by GSUI5051
Link to comment
Share on other sites

Done! That was way easier than expected.

Download: https://www.github.com/HappyFaceIndustries/KerbalAnimationSuite/releases/latest

Changelog:

  • Updated to KSP 1.1.3
  • Remade animation player window, allowing custom binding of animations to number keys
  • Reduced download size by 11kb by deleting those pesky thumbs.db files
  • Added other things to increase the size of the changelog

Here's a screenshot of the new animation player window:

vHf33xN.jpg

Link to comment
Share on other sites

22 minutes ago, MrHappyFace said:

Done! That was way easier than expected.

Download: https://www.github.com/HappyFaceIndustries/KerbalAnimationSuite/releases/latest

Changelog:

  • Updated to KSP 1.1.3
  • Remade animation player window, allowing custom binding of animations to number keys
  • Reduced download size by 11kb by deleting those pesky thumbs.db files
  • Added other things to increase the size of the changelog

Here's a screenshot of the new animation player window:

vHf33xN.jpg

Good God are you a wizard?! I haven't even had the time to install 1.1.3 yet and you've just updated the only animation mod in the history of KSP in a matter of a week... Sometimes one like button just isn't enough.

 

Thank you so much :)

Edited by Avera9eJoe
Link to comment
Share on other sites

11 hours ago, Avera9eJoe said:

Good God are you a wizard?! I haven't even had the time to install 1.1.3 yet and you've just updated the only animation mod in the history of KSP in a matter of a week... Sometimes one like button just isn't enough.

It's finally available on 1.1.3! I'll use it for cinematics in summer vacation.

Edited by GSUI5051
Link to comment
Share on other sites

4 hours ago, GSUI5051 said:

It's finally available on 1.1.3! I'll use it for cinematics in summer vacation.

Likewise :) - It's been about 6 months since my last serious sit down in KSP and it's about time I jumped back on the train.

Link to comment
Share on other sites

  • 2 weeks later...

It took me a while to get the hang of this again but I managed to set up some static poses after about two hours or so of work. I still used time warp and spamming the screenshot key for capturing the smiles because the mouth bones were way too complex to be worth the effort in this case. Thanks for the update @MrHappyFace!!


U3LnEKqm.png6yoyRcnm.pngdOEXWS6m.pngZ0EZW45m.png

Link to comment
Share on other sites

  • 2 weeks later...

I just wanted to let you know that I absolutely love this mod. My only small gripe is that there's no "reset" or "undo" button if we mess up the sliders' positions.

Thought it would be nice to share what I got out of an hour of work. :)  https://gfycat.com/PassionateGiantGalapagospenguin

Keep up the excellent work, @MrHappyFace

Edited by scootymcpuff
"gripe" seemed a bit mean without a modifier
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...