Convert rigs/animations made in blender to files usable in Core Games.
core_anim_pipeline allows you to build a rig inside of blender, animate it, and export the rig and animation into files usable within the Manticore Games Core Game Engine.
core_anim_pipeline relies on these technologies:
Using core_anim_pipeline, at the moment, requires some manual setup. Below is the general process for converting your blender rig.
- Place jsonDumpRig.py into your scripting window inside of your blender project and run the script.
- Open the directory for core_anim_pipeline in a terminal and run the command: node rigify.js <rigName> <jsonFilePath>.
- Place jsonDumpAnim.py into your scripting window inside of your blender project and run the script.
- To get the animation data using the exported .json file, open a terminal to the location of core_anim_pipeline and run the command: node nonquat.js <animationName> <jsonFilePath>.
- Copy/Paste the exported lua script into your Core Games Project.
Note
At the moment, the pipeline works off of whichever action is viewed in the keyframe editing window
Important
When handeling your animations, it might seem counter-intuitive, but you'll want LESS keyframes. Having a large rig with new instructions every frame will cause core to behave poorly, so limit yourself on keyframes as much as possible. That being said, you may find yourself needing to force keyframes inbetween others if your rig rotates incorrectly. Core ultimately decides how to rotate the objects at runtime, and you may need to give it a nudge in the right direction if your animations are too vague.
- Lua Files created from the nonquat.js script are set up to expect a script with custom references to the body parts of your rig inside of core already configured. However, the exported script uses the bone names of the rig in blender to identify which bones need to move where. You will want to make sure these match, otherwise the references wont match and your animations will not work inside of Core.
- The exported lua files export a series of MoveTo()andRotateTo()methods. These are all housed within a function for accessibility, and returns true. Allowing the function toreturn trueadds the capability of state management within Core for these custom animations.