Alvar007

Creating new facial animations

Recommended Posts

Unless you plan to remap all the animations to your new rig, or make entirely new custom replacement animations for said rig, you'll need to stick to the vanilla rig. But yes, it is certainly possible to create arbitrary rigs. The only limitation is what animations the game will recognise.

Share this post


Link to post
Share on other sites

I've been doing some more modding to practise different areas and I have added a new Force Power to the game. It is based in the Retribution ability Anakin has in Battlefront 2 from EA. The Power doesn't check for any saving throws at the moment so it's kind of OP right now. It has a radius of 18 units and I don't know how much Force points it should consume yet. Here's a demo:

As you can see, the Power has a custom animation, icon and sound. I have also modified the original choke animation to look closer to the one in Battlefront 2 when you are being affected by this Power. I also realised that we don't have a "multi" choke Power in the games since all three levels of choke are on one individual person, so this could cover that. But it has some inconveniences:

· For some reason, the game uses the loop animation for the saber throw as the default cast anim, so I couldn't just make a new one and play it in the impact script because it would get overridden by this one. So this new animation replaces the saber throw loop animation.
· Sometimes the enemies don't get affected if they are behind you or really far (but inside the Power radius).
· For the new choke animation to play correctly, I had to change it from looping to fireforget. And that not might be ideal with the original one since it's really short.
· If you move or kill the enemy you were targetting before the 9 seconds that the Power takes to cast, the animation of the player will get interrupted, just like with the vanilla Powers. Also you will not be able to attack again until the cast time expires.

I will release this if someone thinks it is still worth it even with all of these little problems I mentioned. I will also include the source script in case someone is curious and wants to take a look at it.

On another note, Ӄhrizby has finally contacted me and given me permission to use his Darth Nihilus animation fix. I have also managed to fix the icons so I have attached the two ports here just in case anyone wants them although I haven't been able to fix the character support problems so they don't have that. Type "giveitem darthnihilus_k1" without quotes for the Darth Nihilus robe item and "giveitem darthmalak_k2" for the Malak one.

Also, I don't know what happened to Darth Malak. It's still pending approval. I assume if I did something wrong the admins would have told me or something. I wanted to release these two ports as well, but I want to solve any problems there are with Malak first, so that it won't happen again with these two.

Anyway, hope you enjoy this.

Darth Nihilus K1 Port.rar Darth Malak K2 Port.rar

  • Like 8
  • Thanks 1
  • Haha 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

I love the custom animation you created for the protagonist!

I am not familiar with Battlefront2 but the effect of this new Force Power (very nice icon as well) seem a little odd to me... The enemies are... levitating and at the same time being chocked? Perhaps it would feel like it belongs more to the KotOR series if the enemy would instead be all caught into a whirlpool animation but I realize that was not your initial intention. 

Very good initiative though and, again, wonderful custom animation and icon!

Congratulations!

Share this post


Link to post
Share on other sites

I got the Power working in K1:

Spoiler

N6B4EjV.gif

However I can't seem to make it appear on the Force Power list. I have added a unique value to the "forcehostile" column in spells.2da. As I understand it that's what makes it have a new slot in the list. I also added the rest of the neccesary columns to fit my Power such as an "E" in "goodevil", a "1" in "hostilesetting", etc. If I make the "forcehostile" number the same as other Power and increase the "pips" number to have higher priority, the icon takes place in that Power slot, so it works. Anyone knows what's going on? Can't seem to figure it out. This applies to both games btw.

Also, I have uploaded a new Darth Malak version with the fixed icon. Here it is for anyone who missed it:

I have just submitted the two Nihilus and Malak ports too as files downloads and they are waiting for approval right now.

  • Like 4
  • Dark Side Points 1

Share this post


Link to post
Share on other sites

I'm sorry I can't help you with the technical problem you're having but I just wanted to say your new Force power really looks great. Perhaps our omnipresent angel of modding @DarthParametric will once again save the day.

Excellent job!

Share this post


Link to post
Share on other sites

I finally figured out why the Force Power wasn't showing in the list: turns out I was using "forcepriority=2" and you can't do that with a single Force Power. You gotta use 0. Then 1 if you have an upgrade for it and 2 for the last upgrade. So it's like the "pips" column but with 0,1,2 instead of 1,2,3 (dunno why they created two columns that do the same thing but whatever). Now I plan to implement it in both games using the "namespaces" function that TSLPatcher has, that way I can practice with that and release both versions in a single mod file.

Also, my friend @Salk told me about the awful male "flirt" animation and asked me to update it. Given how terrible it was, I didn't have any reference to work with but this is what I got:

Spoiler

sgEGcj9.gif

In the end the thing I explained about creating the facial animations in Blender didn't work, because when you bake the action the keyframes have a "bake action" property instead of an usual "rotation" or "location". And when exporting the plugin doesn't recognize it and throws an error. So I did the facial animation in KotorMax and it works like a charm as you can see. At first I couldn't animate at all because when trying to move the bones the whole head moved. It seems that 3ds Max has a default behaviour of moving the parent bones with the children so all the bone structure moves. I had to uncheck the bone tool option for each one, animate and then re-enable it. Although some parts of the head would appear deformed after doing that like if there was some scale going on. Luckily no scale keys were created since I uncheked them in the animation filters. There are still some sanity check errors like wrong keys that are netiher bezier or linear but I can get past that compiling the model and then copying the generated keys from the ASCII to the original.

I still created the body animation in Blender and then merged the keys from KotorMax, but I'm thinking maybe in the future I will do everything in Max if no errors occur.

  • Like 4

Share this post


Link to post
Share on other sites

Hello there!

First of all, thank you for tackling  the hard task of replacing the game's original male flirt animation. What I do like a lot in your new animation is the first half's facial expression and tilted head. I think you nailed it there (if you could make him wink once too at an early stage that would be top). Excellent job! 👌

The second half (from the moment he raises his arm and looks away) instead is technically great, as usual,  but it's harder for me to associate to any kind of flirting. The arm across the chest held in that position, if anything, reminds me more of some body gesture suggesting desired distance, which is the opposite of what we would want in that particular animation.

So my suggestion is this: I would keep the first half you created, add the winking, keep the face tilted in that position for a couple of seconds more, extending that wonderful sly smile you created and finally make a transition into the TALK_NORMAL animation, if possible.

And congratulations on finding a solution to your new and amazing FORCE POWER not showing in the list! That was indeed great news too!

Cheers! :cheers:

Share this post


Link to post
Share on other sites

@Alvar007 Great work man!!!

After seeing your new retribution force power, I ask myself if it is possible to create a new version of Force Storm similar to the version in Star Wars TOR. As a reference here a clip:

I guess the animation of the player as well as the lightning itself is the hard part, but since I have not don't animation or scripting I have no clue on how to do it. What do you think?

Keep up the great work!

 

Share this post


Link to post
Share on other sites

@Salk I actually planned to add the winking but I totally forgot. The second part with the arm was supposed to be him showing off his muscles but I guess I didn't quite catch that lol.

By transitioning to the talk animation then I assume you don't want it to be looping then? The default one when the animation stops is PAUSE1 and I don't think I can change that. So this is what it looks like:

@Crazy34 Thanks dude! Unfortunately I don't think it's possible for the lightning to come from above like that.

  • Like 2
  • Haha 1
  • Light Side Points 1

Share this post


Link to post
Share on other sites

It's so neat seeing brand new animations in the KotOR games. Thanks for all the work you've put into this 😄

  • Like 1

Share this post


Link to post
Share on other sites

@Alvar007 I really like the new improvement. Great work. On the force storm. Well I guess it can be done, even if I don't know exactly how. On this site is a mod called force zeal. Its a great forcepower on its own, maybe a little op. But the lightning coming from above is the best part in my view. Their is an uncompiled nss shipping with the files but I don't understand the scripting language. So maybe and expert like you can see how the lightning is done. Just to clarify I am not asking for you to do this, just want to know what someone with the expertise thinks if its possible.

By the way force zeal is feature in this video at around 6:10

 

Thank you and stay safe!

  • Like 1

Share this post


Link to post
Share on other sites

Hello again, @Alvar007!

Thanks for going the extra mile to tweak the Male flirt animation further!  In my opinion, and I don't know if that is really possible, the best would be to change the Flirt animation (even the current female one) into a FireAndForget animation. In fact, the Male one you just created would be perfect already if it finished after the winking and transition into the normal talk animation.

You said it is not possible though? The PAUSE1 doesn't seem to allow for a smooth transition unfortunately, from what I see above.

But again, great job with the first part. I think it's marvelously done.

Perhaps our resident guru and holy man @DarthParametriccan give you some input about the whole thing.

Cheers!

Share this post


Link to post
Share on other sites

OH! MY! GOD! This is great! One animation I wish could be adjusted, is the rate of the breathing animation. It's unnaturally fast.

Share this post


Link to post
Share on other sites

@Crazy34 Funnily enough, I looked through that video and even downloaded that Force Mod pack to check how some of them were done to see if I could fix my issue. But I didn't realise one of them did that effect. I see now how it's done, although it uses the drain beam effect but I assume you could use the lightning one as well.

10 hours ago, DarthParametric said:

Assuming the transtime value is non-zero it should automatically blend between anims I would have thought.

Can you elaborate a bit more on this? I assume you are referring to the transtime value in the anim block inside the ASCII. I have that to 1.0, in fact the anim blends well as seen in the video. The problem is that it blends to PAUSE1 by default. Is it possible to change this or is it hardcoded?

  • Like 1

Share this post


Link to post
Share on other sites

I'd try setting it to a lower value for starters. 0.25 is the usual value used in vanilla anims.

It should blend between whatever anims it is sandwiched between. A guy standing on the street is going to be idling use the pause anims, so that's what it has to blend from/to. Are you saying it doesn't blend into other anims when called during a conversation?

Share this post


Link to post
Share on other sites

@Alvar007Would it be possible to make to add to your FLIRT animation parts of the TALK_NORMAL animation and then make it loop? I have no idea how hard and if it is possible to do at all but that would be the ideal solution according to me. It would start with the tilted head and the winking for the MALE model to blend into TALK_NORMAL (which should constitute the longer part of the whole animation). The FEMALE animation would require instead keeping the original FLIRT animation combined with the TALK_NORMAL just like the MALE one above.

Again, I have no idea whether this is feasible and how much of an hassle it would be. My current workaround to the FLIRT animation for males was just to remove it from .dlg files and have it play via script instead for a short time. This way I managed to limit the ugliness of the loop. I'd love to test your current implementation of it to see how it would play out with that workaround of mine.

Thanks!

Share this post


Link to post
Share on other sites

I wasn't using it in a conversation, was just trying it in a spawn script. But now that I do, I have encoutered several issues. If I call the animation in the "current animations" slot inside the .dlg, the anim doesn't play at all. It works fine with other fireforget animations (such as victory) or the looping ones. I assume there is something wrong or hardcoded inside DLGEditor that prevents from playing an animation that was supposed to be looping and it is changed to fireforget in the .2da. So I have to call it via script, but the same issue happens, when it ends it transitions to the PAUSE1 one. The closest I got was adding a delay in the script and in the same node add the TALK_NORMAL animation in the "current animations" slot, so that it plays this one first during the delay and then blends nicely to the FLIRT one. But as you can see it goes back to the PAUSE1 once again when it ends, and I don't think that can be changed:

I can't do it the other way around because, as I said, the FLIRT call in the .dlg doesn't work for some reason.

@Salk I can do what you're saying but keep in mind that would loop everything, not just the TALK_NORMAL part.

Share this post


Link to post
Share on other sites

@Alvar007I do understand the looping would involve the new animation too but that would be fine if it can be done seamlessly. From what I can see above, there are a few problems:

1) The new animation should, if possible, shortened and played first. I don't know how long the TALK_NORMAL animation is but if it is, for instance, 9 seconds then the FLIRT animation should consist of 3 seconds of the new animation which then blends into the whole TALK_NORMAL animation. The final animation would be in that case 13 seconds long.

2) In my opinion the new animation should not have the body lean to one side but only apply to the head while at the same time maintaining the hands/arm gesturing we have in the TALK_NORMAL animation. That would help making the transition smooth and I would love to test it and provide feedback.

Cheers! :cheers:

Share this post


Link to post
Share on other sites
1 hour ago, DarthParametric said:

The vanilla flirt anim is used in multiple DLGs.

I know, but the vanilla one is set to loop. If I change it to fireforget it stops working.

48 minutes ago, Salk said:

In my opinion the new animation should not have the body lean to one side but only apply to the head while at the same time maintaining the hands/arm gesturing we have in the TALK_NORMAL animation.

So you only want the head movement from the FLIRT animation and then body movement from the TALK_NORMAL one? Be aware that the length is not the same so it wouldn't blend nicely. Maybe leave the body as it is and then start the normal body movement when the TALK_NORMAL animation starts?

Share this post


Link to post
Share on other sites
1 hour ago, Alvar007 said:

So you only want the head movement from the FLIRT animation and then body movement from the TALK_NORMAL one? Be aware that the length is not the same so it wouldn't blend nicely. Maybe leave the body as it is and then start the normal body movement when the TALK_NORMAL animation starts?

That sounds like a very good solution.

Do you think you could do that?

When you have something ready I'll be more than pleased to test it in-game.

Cheers! 🍪

Share this post


Link to post
Share on other sites

Ok I have merged succesfully between the two anims, I have tested it in game and it works fine:

And because it's a looping animation it works with the vanilla DLGs too. You can test it and tell me what you think.

Also guys after this I will be focusing on my machinimas, so I'll be busy with that.

custom flirt animation.zip

  • Like 1

Share this post


Link to post
Share on other sites

Fantastic!

If I may come with a couple of suggestions before you call this final:

1) In my opinion the time he stays with his neck tilted after winking should be reduced drastically. The new animation is more or less 7.5 seconds long and it would benefit being shortened to 4 seconds to make it smoother

2) I noticed he winks twice and if possible i'd remove the second instance

3) I also noticed the eyebrows seem to flutter at some point (0:18)  - perhaps that can also be removed?

Cheers!

PS By the way, I already have S_Male02.mdl and S_Male02.mdx in my override due to several enhancements/tweaks made in the past so once the FLIRT animation is final could I upload my current version here so that you can add to it so that I can preserve all content?

Edited by Salk
  • Like 1

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.