Jump to content

Proof of concept for a animation mod


Recommended Posts

Here is some instructions how to create a animation mod in case someone happens to find them useful.

 

1) Use the paradox exporter plugin https://github.com/ross-g/io_pdx_mesh to import the mesh to your preferred editor

2) Create animation and export it with the plugin.

3) add your animation to the asset file of the model you are using for example "gfx/models/portraits/female_body/female_body.asset"

for each animation you need to add the lines 

animation ={id="some identifier for example body_modname_animation"    type = "URL to your animation for example female_body_modname_animation.anim"}

and

state = {name="for example modname_animation" animation = "the identifier from the previous line in this case body_modname_animation" time_offset = {0.0 5.0} next_state="next state of the animation if you want a multi stage animation I'm pretty sure that you would do it by writing the name of the state you want to move to in this field. alternatively if you set this to its own name modname_animation in this example to make it loop. "}

(alternatively you can override an existing animation though that will probably cause issues with multi stage animations.)

 

4)Create animations.txt file in "gfx/portraits/portrait_animation" (edit the name should be different from animations.text so you don't override the base games animation.txt file.)

each animation consists of head animation and body animation  here you define them. using the animation states from previous step. 

Define your animation for all variants dwarf, fat, man, woman, boy, girl. (You can use existing animations in place of animations you don't plan to use. but according to docs all variants must be defined. this can be done most easily by copying existing animation and replacing the variants you want to use. )

it will look something like this

mod_animation={

     male={

           default={ head =" lust_animation" torso= "modname_animation" }

.

.

.

}

   boy={default={head="idle" torso="idle"}}

   girl=boy

   female=male

}

 

5 Now you can use your animations in events with animation=mod_animation

 

Link to comment

Oh. There was a post about adding animations with no replies. So I assumed it wasn't common knowledge. Also Since its only model.asset files that need to get overwritten It should be fairly easy to create a script that automatically generates a merged asset files for all animation mods. If the games parser can't already do that.

Link to comment
On 9/21/2020 at 10:16 AM, Khadir said:

How adding animations works is known since some two weeks already. That's not the hard part (... as long as you know your way around Blender or Maya). The hard part is making multiple animation mods work together.

In which topic? I was searching for a method here and that information wasn't given anywhere, some even said it'ld take a long time before people come up with a method to add animations and that it would be hard. Bimbo certainly made a service here for lots of people who were looking for that information. Even if it was mentioned before, your reply is completely unnecessary.

Link to comment
31 minutes ago, borndigital said:

In which topic? I was searching for a method here and that information wasn't given anywhere, some even said it'ld take a long time before people come up with a method to add animations and that it would be hard. Bimbo certainly made a service here for lots of people who were looking for that information. Even if it was mentioned before, your reply is completely unnecessary.

on the CKIII wiki.

Link to comment
1 hour ago, doan77 said:

on the CKIII wiki.

But not here, it's just foolish to claim that it's "common knowledge". I bet many people didn't know until Bimbo posted this. Noone seems to help out when people ask for it and when someone do help, they start the BS about it being common knowledge, it really wasn't and it's good that it was shared HERE with adequate explanation.

Link to comment

I'm not sure how it works on maya but in blender you only have to do the following.

 

 

 

first install the plugin by following the instructions.

 

then

Import model.

1.png.e22fce36c814bbde848d71be2e3246d5.png

 

 

 

select pose mode.

2.png.53283aa36e595cb9972da99134c1d587.png

 

Change pose to the pose you want to begin your animation in by selecting a bone and rotating it. Rotating a bone moves all of its children. 

you can rotate bones by selecting the rotate tool. (The one on the left that is  highlighted with blue in the image.)

3.png.1804d6141bf114610773b1c8c406012b.png

 

Insert key frame either using the menu in pictures or by selecting all bones and pressing i

4.png.427c959a4acfb3e8f4c79f7b124c2ebf.png

 

5.png.1d58a46102f9ece7b3700be79bb3009f.png

 

then create a new pose and insert a new keyframe now you can playback the animation you made by using 'play animation' button in the timeline,

6.png.cae45f600391263bc6c7b7e032603dd9.png

now you have a animation you can export to the game using the save anim button in the paradox exporters menu which is in the same location as load mesh.

 

some important keyboard shortcuts x = delete, i = insert keyframe

Link to comment
  • 1 month later...

Detaching camera from the torso:

 

create gfx/portraits/cameras/portrait_cameras.txt

 

and change the look at lines to some constant values for example

camera_event_left

look_at={25 90 0}

 

camera_event_right

look_at={-25 90 0}

 

This allows the models to move independently from camera within the scene.

 

 

Link to comment
18 hours ago, luffyboy said:

i think before we even start animating, we would need a better skeleton and body mesh. ck3 body mesh is almost turd standard when you see what skyrim's meshes are like

While that would be nice. I'm not sure that anyone will take the task upon themselves without some sort of demand for animation mods.

Link to comment

I think that with the current skeleton, there could be some good animations still.

Do anyone know if some kind of retargeting from existing animations would be possible with this way? I have experience on Unreal Engine and Blender, but not too much on Blender animations.
If there would be a mod with some animations, that could open other modders to make their own.

Link to comment
2 hours ago, egregeg said:

I think that with the current skeleton, there could be some good animations still.

Do anyone know if some kind of retargeting from existing animations would be possible with this way? I have experience on Unreal Engine and Blender, but not too much on Blender animations.
If there would be a mod with some animations, that could open other modders to make their own.

From a quick search I found these.

https://blender.stackexchange.com/questions/26216/can-blender-be-used-to-re-target-animations-to-other-rigs

 

 https://github.com/igelbox/blender-retarget

 

https://connect.unity.com/p/retargeting-animations-with-blender-2-80

 

I don't have enough time right now to delve into them more deeply, but from a preliminary look it seems possible.

Link to comment
17 hours ago, Bimbobag said:

From a quick search I found these.

https://blender.stackexchange.com/questions/26216/can-blender-be-used-to-re-target-animations-to-other-rigs

 

 https://github.com/igelbox/blender-retarget

 

https://connect.unity.com/p/retargeting-animations-with-blender-2-80

 

I don't have enough time right now to delve into them more deeply, but from a preliminary look it seems possible.

If it's not too much asking, could you sent me an .fbx file (of the mesh) so I can test with it?

Link to comment
16 hours ago, Bimbobag said:

Which mesh?

A mesh that could work in CK3, the one you used should be fine.

What I want to try is to still use Unreal's retargeting system to apply some animations I have in Unreal to that CK3 mesh. If it works we could implement a lot of animations relatively easy.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use