Alvar007

Creating new facial animations

Recommended Posts

Hello there, I'm kind of new here with this being my first post but I have had this account for some years now and I also did some modding to this game back in summer 2015.

Now I have been messing around with the new tools and I was interested in KotorBlender to create new animations since that's the program I recently learned for modding Jedi Academy as well and I am quite comfortable with it now. So my intention was to create new facial animations but I wasn't sure of the capabilities this plugin offered. I was quite glad when I found out that it has been recently updated and it fully supports animations as well as other models properties.

But when I imported a head I was quite surprised to see that the bones in this game are not really bones like Jedi Academy for example but objects that act like such. Thus, I couldn't attach them to the mesh to see how it deformed when trying to create an animation. So I tried creating a temporary bone rig in blender that you could use and attach each bone to each object so that when you move a bone the object also moves. This may seem like it's working on paper but I had so much trouble with transforms that I almost gave up. They are a real pain in the ass.

First I tried animating the bones and the objects apparently move with them but in reality they are not changing their transforms. So I tried to copy and paste them from the bones and it seemed to work in the program but in game the face was a total mess. This was because the objects were taking the absolute transforms of the bones that were in a different position that the objects are. What appears to be working in the program has nothing to do with the game and viceversa. So I just parented them and even though the objects would jump to a weird location their transforms would remain untouched as you can see in a test animation I made here:

Spoiler

5Pspq1y.gif

So now how do I transfer the bone movements to the objects? I tried a thing in blender called Delta transforms. This are like offset transforms that only take into consideration the relative location and rotation of an object. This was very useful in a parent/child scenario like this because now I had the original objects location/rotation + the relative transforms of the bones. Unfortunately when I tried it in game it did nothing, probably because the plugin only reads the absolute transforms, the delta transforms are stored in a different field. So I couldn't use this approach. Can the KotorBlender plugin be updated to support delta transforms? It would be really useful and nobody would have to do what I'm about to say for it to work.

I needed to somehow transfer those delta transforms to the absolute transforms so that the plugin could read them. There is a function in blender called "all transforms to deltas" that transfers all the absolute transforms to the delta fields and left the absolute ones to zero which is exactly the opposite of what I need. I need to transfer this absolute+relative transforms that I have in the delta fields to the absolute fields. Luckily I found a script that did exactly this but I had to this for every single keyframe which is extremely exhausting and time-consuming. If someone here knows how to code on python can you do a script that does this automatically? It wouldn't be that bad then.

So after thousands headaches I finally got it to work in-game:

Spoiler

PDwfUt5.gif

You can also see that the model has those wrongly shaded faces around the jaw. Anybody knows how to fix that? I saw other people having the same issue but I'm not sure how to fix it. I decompiled and compiled the model with MDLOps 1.0.0 since MDLEdit was giving a lot of problems.

The point of all these is that you can make a facial animation with a dummy mesh so you can see how it looks without having to load it every single time in game. But I don't know if this is a worth approach with all these problems, if you solve one of those two though then it really is at least for me.

I just wanted to share this knowledge to people who may be interested in this or don't know the extension of this plugin. Now I just need to learn animated cameras for the machinima I'm trying to make, does anyone have any tips/tools/tutorials that I could use? Would be really appreciated. Sorry for the long post.

And thanks for keeping this community alive!
 

  • Like 4

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.