Jump to content

How to update bone names on existing animations and use the skeleton generator


Recommended Posts

Since our game has a strange way of recognizing skeletons that can be a very time consuming to process. This is why in some cases we have to prefix our skeletons with the object's name. For instance the armature from a boar should be named "Boar_Armature". This will avoid problems in the future. Same for the bones e.g. "Base" would become "Boar_Base" the only things you wouldn't want to rename would be prop points. You don't have to rename every bone, the root is enough, but it's better to start on a good foot.

Step 1 : Bone Renaming

We will use the following blend file -> boar-10.blend

Let's assume you want to rename the root bone that's also called "BoarArmature" to "Boar_Base" in every animation you have in the blend file you'll get this:

image.png

Note: The following only applies to every other animations, not the current one. The current one will update just fine. So make sure to update bone names with the animation using the most of them. Also, if you need to remove bones do it now. It will save you time.

  • Blender won't know anymore to what bone you want to rig to what. So they will appear underlined in red.
  • imageproxy.php?img=&key=4309c155facf0c1fTo Fix this you'll have to double click on each of the lines for each of the bones, and replace the occurrences of "BoarArmature" to "Boar_Base"

Important: Bone names are case sensitive.

  • You'll have to repeat the renaming for every action in the scene. This can be time consuming
  • You will now be able to reexport your model correctly, add new bones.

Step 2 : Skeleton generation

  • Now that you have fixed your mesh in blender you need to get it ready for the game.
  • For that you'll need to update the skeleton file.
  • To do this you still have the tedious option of doing it manually or you can use my script.

 

  • To use this script you'll need to install python
  • Export the model you want to generate the skeleton for as DAE.
  • Put it in the input folder
  • Then open a command line and run python skeleton_generator.py
  • Voilà !  You now have a XML file ready for the game that you can put in:
binaries/data/mods/{yourmod}/art/skeletons/
  • Don't forget to delete the old skeleton file.
     
Link to comment
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.

 Share

×
×
  • Create New...