Salk

Drink animation

Recommended Posts

Yes, it's one of the ANIMLOOP anims, only usable with placeable sitters, unless you make a stunt anim or do the name hijack trick (i.e. put a copy on the model renamed to dance or some other scriptable anim).

Edit:

animloop01 = sitting still, hands on knees/thighs.

animloop02 = sitting with drink in left hand, takes two sips.

animloop03 = sitting holding cards, plays a single card.

You should be able to see them in action in most cantinas. The Taris Upper City one has at least both animloop02 and 03, although I'm not sure about 01.

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the info, DP.

I fear I'd need animloop2 but standing and that is not unfortunately available.

Merry Xmas to you and thanks for a wonderful year of KotOR modding!

Share this post


Link to post
Share on other sites

Ooo, a drink animation *grin* please tell me DarthParametric, that you or Salk have big plans that involve a hot cocoa mod, or some sort of holiday/life day mod in the works 😄 😄 😄

Share this post


Link to post
Share on other sites
15 hours ago, Salk said:

I fear I'd need animloop2 but standing and that is not unfortunately available

Animations are blendable. I don't know if this is universal, or requires some hardcoded element, but you could test it.

You'd need to create it as a new animation (going the name hack route is the easiest way to do it) and then you just set the animroot to the base of where you want to affect the model. In your case, you'd set the animroot to torso_g (or maybe torsoUpr_g). Then the legs should inherit the animation from the idle animation - i.e. be standing.

Of course there would be an issue with the right arm posed to be resting on the right leg, but one problem at a time.

Edit: So I played around with it a bit, since I was already hacking animations for one of my own projects. I took the animloop2 anim and removed the keys for the pelvis/legs and the position keys for the rootdummy. I replaced the keys for the right arm/hand/fingers with keys from the pause1 anim (with a doubling of keys required, since that anim is half the length). That gets you in the ballpark, although he still has a drinking problem, now apparently even further exacerbated.

I'll have a look at the TSL drinking anim, as I think they fixed that up. I know they properly aligned the glass, which is not the case in K1 (which doesn't actually use a glass, but if you add one it's positioned poorly and the fingers clip through it).

  • Like 3

Share this post


Link to post
Share on other sites

OK, here's a revised version using elements from the adjusted TSL animation, along with TSL's glass-in-hand prop to go with it. There are still some glass positioning/clipping issues, and it obviously gets nowhere near the mouth/face, but I have tried - and failed - to resolve that in the past, so fixing it would be up to someone else. Perhaps someone like @Alvar007 could take a look at it.

At the moment I have injected it into S_Male01 (the highest level supermodel) as the weld animation, since humans don't have that anim but it is scriptable (ANIMATION_LOOPING_WELD).

  • Like 3

Share this post


Link to post
Share on other sites
46 minutes ago, DarthParametric said:

OK, here's a revised version using elements from the adjusted TSL animation, along with TSL's glass-in-hand prop to go with it. There are still some glass positioning/clipping issues, and it obviously gets nowhere near the mouth/face, but I have tried - and failed - to resolve that in the past, so fixing it would be up to someone else. Perhaps someone like @Alvar007 could take a look at it.

At the moment I have injected it into S_Male01 (the highest level supermodel) as the weld animation, since humans don't have that anim but it is scriptable (ANIMATION_LOOPING_WELD).

At the moment, what I am seeing now looks somewhat decent. Perhaps the key issues are what I am not seeing, would love to see this played out in a Taris Cantina with the NPCs all performing this animation (But if you aren't going through with it you might as well not even bother).

  • Like 1

Share this post


Link to post
Share on other sites

Ok so I took a look at this since I was already playing with IK constraints to see if I could create an animation with them but unfortunately it doesn't work. I don't know if I messed up something in the proccess but it doesn't recognize any movements, even though the trimesh rig is clearly animated and the keyframes are there.

So I just created the animation manually:

rdhspQn.gif

I also used the TSL drink prop and the empty hand from the same game, so that I could have the drink in the left hand. Let me know if you want it.

  • Like 4

Share this post


Link to post
Share on other sites

Nice work. I'd probably pad the length a bit to space out the swills a bit.

@Alvar007 I exported the one I was working on as an FBX if that helps you look at it in Blender or wherever. Although that version I tried to merge in the pelvis/leg movement from one of the idle anims, which resulted in some foot sliding.

 

K1_Standing_Drinker_Stunt_Model_Edit.7z

  • Like 3

Share this post


Link to post
Share on other sites

Oooo, could I get that too @DarthParametric as a Christmas Present? I've been a naughty little Sith this year! *Bows to the Sith Lord and grins* slaughtering jedi is hard work but so very delightful! ;) *would looove to have that for tsl* 😈

Share this post


Link to post
Share on other sites

Very good job there,  Alvar07!

Once it is complete I can finally make the Viglo and Duan restoration look the way it was always supposed to be.

Cheers! :cheers:

Share this post


Link to post
Share on other sites

Following DP's suggestion, I tried to extend the time between shots so that it could look more natural. Unfortunately there seems to be a keyframe limit in the model format, as KotORBlender just won't export giving me a "tuple index out of range" error. So I had to shorten the animation in order for it to work.

I previously had him looking at the sides for a few more seconds instead of just a pause idle moment between the swills but oh well, I guess this will have to do:

Cpz6DPt.gif

Anyway, here's the file. The animation uses the weld slot because, as DP said, it is not used by humanoids. So it's a looping animation. I also included the TSL props so that it can work properly.

drinking_anim.rar

  • Like 3

Share this post


Link to post
Share on other sites
35 minutes ago, Alvar007 said:

KotORBlender just won't export giving me a "tuple index out of range" error

I'd expect that to be a Blender issue rather than a model one. There are plenty of longer anims in stunt models. There are existing supermodel anims longer than your anim's 11 seconds (I think one of the Pause anims is like 16 secs long). If you can export a longer version as an FBX I can convert it in Max and see how it goes.

  • Light Side Points 1

Share this post


Link to post
Share on other sites

I exported it as FBX but it just exports the weld animation and not the rest, as KotORBlender works with each animation in its own scene. Hope that's not an issue.

Also if you could explain how to go from FBX to MDL with Max for future anims that would be great.

drink_animation_weld_v2.fbx

Share this post


Link to post
Share on other sites

Nice to see more progress made on this.

And even nicer would be to have this animation added to JC's Cloaked Jedi Robes supermodel because choosing one over the other is extremely painful.

Share this post


Link to post
Share on other sites

After removing the position keys for the mouth (f_rmc_g/f_lmc_g/f_Rlm_g/f_Llm_g/f_um_g)

@Salk: Here are the supermodels, vanilla and @JCarter426's TSL robes versions (via the modder's resource). Both include two copies of the animation. The first is named WELD so that it can be scripted for creatures using ANIMATION_LOOPING_WELD, and the second is named ANIMLOOP04 so it can be scripted for placeables (i.e. how existing cantina patrons are done) using ANIMATION_PLACEABLE_ANIMLOOP04. Obviously the TSL robes-compatible version will not have any support for the added TSL bones, since they don't exist in the K1 rig it was created for.

@Alvar007: For future KOTOR work you will want to look at changing your scale/unit settings in Blender (and/or Maya if you are also using that). I had to scale up the model by 1,000%, which is kind of a headache when dealing with animated meshes. KOTORMax does not like exporting transformed objects.

Regarding exporting FBXs from Max, select the trimeshes, go to Animation -> Bone Tools and enable the Bone On checkbox. They should then be converted to regular bones in the FBX.

Edit: Wait, you wanted to go the other way, from FBX back to MDL. As I said above, scaling added some extra wrinkles, but the basic procedure is to create a new OdysseyBase (since the original will be converted to a null/dummy), link everything to that, set the animation name, frame numbers, etc. in its Animation panel, export. Then you can just copy and paste the anim block from the ASCII to a copy of the original model.

K1_Standing_Drinker_Stunt_Model_Edit_Alvar007_Version.7z

  • Like 2
  • Thanks 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

The glass is available in the prior downloads both Alvar007 and I provided. Take your pick. You'll need to equip a null weapon in the right hand, since the glass needs to be equipped in the left hand. I'd make sure that they also have the Proficiency All feat.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

It'd have to be above S_Female02 and S_Female03 in order to be able to override any of the animations. But it should be doable.

And yeah, other mods would still need to sort out compatibility with each other. But I can at least make it more difficult to break the base resource.

Share this post


Link to post
Share on other sites

I gave the TSL Robe Variant a try but it works only partly.

The drinking arm doesn't move at all and neither does the head or the mouth.

This is what I get: 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.