Saturday, April 28, 2012

How to Make Animated Peeps #2 ~ MakeHuman

Screen capture of the MakeHuman program

The goal of these tutorials is to help you create a 3D character, add a motion to it and get it playing in your browser ASAP. In this second tutorial I cover creating a 3D model using a FOSS application.


Character Building Applications

Creating and rigging a character in an program like Blender can take days. It's much faster to use a helper app designed to create characters for you. Apps that do this include:

Mixamo

Poser
http://en.wikipedia.org/wiki/Poser

Autodesk MotionBuilder
http://en.wikipedia.org/wiki/Autodesk_MotionBuilder

The are all proprietary solutions that you must pay for. The free open source alternative that I have used is MakeHuman - 'an open source tool for making 3D characters':

http://www.makehuman.org/ << see the features page
http://en.wikipedia.org/wiki/MakeHuman

Installing MakeHuman

Even though MakeHuman has been under development since 1999, it still calls itself 'alpha'. With good reason as it's under very active development.

The downloads page is here
http://www.makehuman.org/download

Note that you can download either a stable build or a nightly build. 

You will note the frequent commits here:
http://code.google.com/p/makehuman/source/list
versus the more stable builds:
http://code.google.com/p/makehuman/downloads/list

Because of the active development, in writing this tutorial I used the nightly builds.

You should also be careful about matching the MakeHuman version with the appropriate Blender version. Mismatching versions with cause the export-import process to fail.

Learning MakeHuman

A full tutorial on MakeHuman is beyond the scope of this tutorial and actually counter productive to the goal of helping you to creating your first animated character in a few minutes. I will just cover the buttons you need to push in order to create a 'minimum viable character'.

If you are interested in learning much more there is on-line documentation and a responsive forum, furthermore an amusing resource is the book written by Thomas Larsson - bio here
http://www.makehuman.org/about

His book is a work in which he describes the process of producing and making a full demo movie in just two weeks:
http://makehuman.blogspot.com/2010/11/making-short-movie-with-makehuman-and.html

I skimmed through it - and found a lot of useful tips. Especially page 77 on what to do in Blender so you don't have to spend hours on tewaking:
Load, retarget, simplify. This button performs the combined tasks of loading a BVH file, retargeting to the MHX rig, and simplifying the F-curves. It leaves no trace of the BVH skeleton or its action. Normally this is the button that I use most."
If you are a Blender Python fan then you may have also come across another book by Thomas:

Introduction to Python scripting for Blender 2.5+ available at:
http://wiki.blender.org/index.php/Dev:2.5/Py/Scripts/Cookbook/Code_snippets

Thomas Larsson is a user-friendly ninja.

What You Need To Do: Create a Character in MakeHuman

Download, install and run MakeHuman. Once it's up and running and you have had a look around, follow these steps:

Second Row of tabs > click 'Random' tab
Left menu > click 'Create new'
- Do this several times to observe general range of characters MakeHuman creates

Top row > click 'Library' tab
Second row > click 'Skins' tab
- Choose a skin.

Second Row > click 'Macro' tab
Left menu > 'Gender' slider > slide all the way to right or left
- Note that the amount of gender is probably the over-arching changer of appearance

Top row > click 'Library' tab
Second row > click 'Proxies' tab
Click image with fewest vertices (most likely candidate: rokimaru)
- This allows you to export a model with a much reduce polygon count

Top row > click 'Files' tab
Second row > click 'Export' tab
Left menu > click 'Format' > click 'Blender exchange (mhx)'
Left menu > click 'Options source' > click 'Use gui options'
Left menu > click 'Options'
Left menu > check: version [highest version number available]
Left menu > check: 'Separate folder'
Left menu > un-check: all other options
Left menu > select: 'Use mhxrig'

Choose a file name for your character
Click 'Export'.

Bingo! You have created a character.

Notes

Ignore exporting the body bits - Three.js is happiest working on a single mesh.
Ignore exporting the clothes - later on you will paint the clothes on the texture map
Ignore top row > 'Posing' - it does nothing exportable for now.

Exporting the Data

Files are exported to the MakeHuman/Exports folder in your standard documents folder.
Textures are exported to the textures folder as TIFF files

Three are two files: texture.tif and texture_ref.tif. You only need texture.tix for Three.js.

You will need to convert the TIFF file to a JPEG file so it can be read by Three.js. If you wish your human to have clothes, you can paint these onto the texture. Both of these operations are explained in tutorial #5 of this series.

Upcoming

In the next tutorial I will show you how to source canned motion capture movements for the model you have created in MakeHuman.


Next: How to Make Animated Peeps #3 ~ MoCap & BVhacker:
http://www.jaanga.com/2012/04/how-to-make-animated-peeps-3-mocap.html



1 comment: