Resource icon

Misc Blender ksanim/knh exporter 0.4

Login or Register an account to download this content
Stereo submitted a new resource:

Blender ksanim/knh exporter - direct Blender to AC format export

Compatibility with Blender 2.80 and 2.81, same functionality as before otherwise.

The main issue I know of is you can't use it on root level nodes, only objects with parents.

For exporting driver animations using the driver file I created, or just general-purpose ksanim exporting when you don't want to do it by exporting an animated fbx.

Read more about this resource...
 
hello, sorry for my ignorance, I can ask you how and where it is installed and what it is used for ...
i use blender and i have problems with animations, when i export everything is wrong
 
hello, sorry for my ignorance, I can ask you how and where it is installed and what it is used for ...
i use blender and i have problems with animations, when i export everything is wrong
it is installed the same way every Blender plugin is, put the zip file somewhere, in Blender 2.81 go into "Preferences...", Add-ons tab, then "Install". Choose the zip file and install.

Then in the viewport select all the Empties with keyframe data you want to export, choose ksanim as export option (it's bottom spot for me), select Use: "Selected Objects", choose fitting filename, voila.
5.jpg


4.jpg

(working in CM viewer. Car is ofc set up to use a ksanim for the rear wing)
 
The 3 boxes "reverse animation, fix driver: object, export driver_base_pos.knh" in the right menu what are they for?

In 2.80 it works, I have already tried, but in 2.79 it does not install and gives an error (I am more familiar with 2.79).

But once exported also with your plugin I continue to have a result that is not good, the counters, with content manager, when I open them disappear and I don't understand what I'm doing wrong, in animation the blender works all right.

curiosity, do you have the possibility to make a small animation video at the counter, export and export settings? it's something that i would really like to learn to complete my self and progress in my learning ..
 
correction translation:

The 3 boxes "reverse animation, fix driver: object, export driver_base_pos.knh" in the right menu what are they for?

In 2.80 it works, I have already tried, but in 2.79 it does not install and gives an error (I am more familiar with 2.79).

But once exported also with your plugin I keep having a result that is not good, the doors, with content manager, when I open them they disappear and I don't understand what I'm doing wrong, in blender the animation works all right.

curiosity, do you have the possibility to make a small animation video of the door, export and export settings? it's something that i would really like to learn to complete my self and progress in my learning ..
 
The 3 boxes "reverse animation, fix driver: object, export driver_base_pos.knh" in the right menu what are they for?
Those are all related to exporting driver animations (steer and shift)

https://www.assettocorsa.net/forum/index.php?threads/bone-animation-rig-blender.34594/ There's more detail in that regard, and a version of the plugin that works in blender 2.79, on this page, but in summary:
Reverse animation - just exports frames in the reverse order in case that's useful instead of moving every keyframe around
Fix driver: object - Blender doesn't like the character ':' to be in object names and replaces it with _, the AC driver object names all contain "DRIVER:" so "DRIVER_" becomes "DRIVER:". Without correcting this it's impossible to make driver animations in blender.
export driver_base_pos.knh - exports the current frame into a knh file, this sets the default pose of the driver's skeleton (it's the name of a file in the car folder)

One major problem with the method I use is it doesn't work on root level objects, to animate something like a door you want
DOOR_R
+: DOOR_R_anim
| +: door_mesh
With the 2nd one animated.
 
Hello Stereo, thanks for your work on this addon. :)
I have an issue exporting the driver_base_pose_knh
When you say "Go to frame 0 and export driver_base_pos with the entire armature selected."
Does this configuration seems viable to you ? Have I selected the good objects ? Should I be in pose mode ?
screen.PNG

You didn't specify what "boxes" should be checked in the exporter. Some are obvious but, should I export the bones ? The Objects ? Should I put the whole DRIVER_DRIVER in an empty because of the root items error ?
Currently, if I try to export the armature without a empty parent node, i get this error :

error.png


OR

If I children it to an empty, and the exported file is 0 octet.
I've managed to export the .knh ONCE (I tried maybe 30 times!) and the position wasn't what I expected, the driver was totally centered in the car, but had the bones relatively in the right places. (Still in the middle though)

I've also tried moving the driver pos using CM without success.

sniart.PNG


zoub.PNG


I also tried using the driver_base_pos from Kunos' car, and tweaking with CM and nothing really worked.
It spawned the driver in the floor of the car. Weird bugs on weird bugs.

TL;DR : Could you explain a bit more in detail what to select, in what mode, during the exporting process, Stereo ? (Specially the driver_base_pos.knh) That would make a world of change, I've been on this issue for four hours and going :p
 
It's possible the Matrix Matrix bug is from Blender 2.80 changes, don't think I fully tested the export options cause I assumed blender would keep giving errors until the code was right. I'll have to open one of my files to figure out the other questions.
 
  • Like
Reactions: x0t
What would you recommend the community to do until then ? (Except using 3DSMax, obviously, we're not savages!)
 
For some reason I am not able to install the plugin :-(

I went through these steps:
Edit/Preferences/Add-ons

I made sure that Official + Community + Testing are all active and all filters are removed to display all available plugins.

I then installed the plugin (I installed both scripts one after the other - is this correct?)
Blender confirmed the successfull installation.

Now I cannot find the plugins at all within Blender :-(
They are not listed among the other Add-ons and they are not visible in the export dialogue.


Where did I made a mistake?
 
Nah you just need to load one file, it'll only have the most recently loaded available as far as I know.

(you can't have 'enabled addons only' while finding it) it should just show up as a community plugin, needs to be selected.
wqntxwS.jpg
 
It is not there - I really cannot see it after installing :-(
Blender also doesn't throw a error message but confirms successful installation.

The message after installing reads something like "Modules installed, ..."
When browsing addons after this (even killing Blender and restarting it, loading files, etc) they still don't show up :-(


[EDIT]: Duh, ...

I just realize that the downloaded file must not be unpacked but directly pointed to from Blender (I unzipped it before and the installation process fails without an error message).

The plugin is now visible (and enabled) ;-)

Thanks for the help ;-)
 
Last edited:
THIS IS AWESOOOME !!!

It just works!
Thank you @Stereo - it is now actually amazingly easy to create the animation in blender, select all related objects, export with your plugin,throw the ksanim file into the animation folder and ... IT JUST WORKS!!!

This is sooooo nice ;-)
 
I'm attempting to use this in Blender 2.91, It installed just fine and no errors came up when exporting but I can't quite get my animation to export correctly.

What I'm trying to do is get flip up headlights working, something I have seen done countless times. I've got all parts of the headlights mesh in their own respective empties which are in turn in one primary empty so:

HEADLIGHTS​
HEADLIGHTS_ANIM​
HEADLIGHTS_1​
GLASS​
HEADLIGHTS_2​
LEDS​
HEADLIGHTS_3​
LEDS_HOUSING​
HEADLIGHTS_4​
SCREWS​
HEADLIGHTS_5​
HOUSING​
HEADLIGHTS_6​
TOP​
Then I select all that and export (In this case as lights.ksanim into the animations dir), after that I preview the car in CM Showroom, tick lights and.. the headlights vanish entirely.

I made sure to export the car FBX so that the changes made to the parenting of the headlights mesh and such are in it and in turn exported the KN5 but no dice.

Same thing happens if I just parent all the meshes to the HEADLIGHTS empty and animate that.

I've only had minor success exporting the headlights as FBX and baking the animation, this seems to net me headlights stuck in the up position and the animation only effects part of the mesh moving it higher.

At this point I can only assume its just a version issue and try it with 2.81.
EDIT: Same result with 2.81.
EDIT2: I can now confirm that the plugin works in Blender 2.91, the issue was that I followed the layout in a screenshot above without seeing the rest of the hierarchy. It took finding the door example above to figure it out. I put all my headlight meshes in an empty then parented that empty to another empty to give me a hierarchy like this:
HEADLIGHTS​
HEADLIGHTS_ANIM​
GLASS​
LEDS​
LEDS_HOUSING​
SCREWS​
HOUSING​
TOP​


Id recommend adding an example like this to the Overview.
 
Last edited:
  • Like
Reactions: x0t
0000.png

Hi, I try to help you in this way, then maybe Stereo will help you to make the exporter he created work .. I, like you, couldn't export the working animations and I don't understand why.
Use blender and in FBX export select the exact photo settings.
Important, select "bake animation" but uncheck the 4 boxes under the bake animation menu. so you will see that everything works.
 
Back
Top