makehuman_blender_ogrexml_toolchain.adoc 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. = MakeHuman Blender OgreXML toolchain for creating and importing animated human characters
  2. :author:
  3. :revnumber:
  4. :revdate: 2016/03/17 20:48
  5. :relfileprefix: ../../
  6. :imagesdir: ../..
  7. :experimental:
  8. ifdef::env-github,env-browser[:outfilesuffix: .adoc]
  9. This guide describes how to use MakeHuman Blender OgreXML toolchain.
  10. == Tools
  11. The latest versions at time of writing are:
  12. * MakeHuman: 1.0.2
  13. * Blender: 2.72
  14. * OgreXML exporter for Blender: 0.6.0
  15. The tools can be downloaded from the following URLs:
  16. * MakeHuman: link:http://www.makehuman.org/[http://www.makehuman.org/]
  17. * Blender: [link:http://www.blender.org/[http://www.blender.org/]
  18. * OgreXML exporter for Blender: <<jme3/external/blender/blender_ogre_compatibility#,Working Blender and OgreXML Versions>>
  19. == Seed Project
  20. Public domain seed project with some preset characters and animations:
  21. * JME3 Open Asset Pack: link:https://github.com/bubblecloud/jme3-open-asset-pack[https://github.com/bubblecloud/jme3-open-asset-pack]
  22. == Preparation
  23. . Install MakeHuman and Blender.
  24. . Install MakeHuman Blender importer from MakeHuman installation to Blender scripts folder and enable the script from Blender `menu:File[User Preferences>Addons]`.
  25. . Install OgreXML exporter to Blender scripts folder and enable the script from Blender `menu:File[User Preferences>Addons]`.
  26. . Clone the seed project or create your own project.
  27. . Locate or create character model folder (src/main/resources/character/human/female)
  28. == Creating Character Model with MakeHuman
  29. . Create character model with MakeHuman. (link:http://www.makehuman.org/documentation[http://www.makehuman.org/documentation])
  30. ** NOTE: If you want to use JME3 Open Asset Pack animations without tweaking then use either male.mhm or female.mhm as preset and do not change the body proportions.
  31. . Choose basic skeleton from Pose/Animate tab if you are not already using either of the presets.
  32. . Export to blender exchange format from `menu:Files[Export]` tab.
  33. ** Choose `menu:Mesh Format[Blender exchange]` +
  34. [%interactive]
  35. *** [x] Options
  36. *** [x] Feet on Ground
  37. *** [x] Scale Units
  38. *** [x] Meter
  39. == Animating Character Model with Blender
  40. . Import the character model in blender exchange format (MHX) to Blender or open preset blender file female.blend.
  41. . If you use your own character you can append animations from male.blend or female.blend preset files with Blender `menu:File[Append]` function. Animations are in the animation folder.
  42. . Tune the character model / materials and animate the character. (link:https://www.blender.org/support/tutorials/[https://www.blender.org/support/tutorials/])
  43. == Exporting Character Model from Blender to Ogre XML
  44. . Make sure that your scene objects in Blender do not have any spaces or special characters in their names. Rename them if they do.
  45. . Arrange all your animations in single NLA track after each other without overlaps or touching in the timeline.
  46. . Unlink any animations linked directly to your character armature or mesh.
  47. . Export using `menu:Blender[File>Export Ogre3D]` (scene and mesh) and tick the following options: +
  48. [%interactive]
  49. ** [x] copy shader programs
  50. ** [x] Export Scen
  51. ** [x] Export Meshes
  52. ** [x] Export Meshes (overwrite)
  53. ** [x] Armature Animation
  54. ** [x] Optimize Arrays
  55. ** [x] Export Materials
  56. ** [x] Tangents
  57. ** [x] Reorganize Buffers
  58. ** [x] Optimize Animations
  59. == Importing Ogre XML to JME3
  60. You can load the ogre XML with asset manager or import them to SDK and hence convert them to JME3 asset format.
  61. You can test the animations by making your own version of AnimationPreviewer:
  62. link:https://github.com/bubblecloud/jme3-open-asset-pack/blob/master/src/main/java/com/jme3/asset/AnimationPreview.java[https://github.com/bubblecloud/jme3-open-asset-pack/blob/master/src/main/java/com/jme3/asset/AnimationPreview.java]