MetaMorph – Blender Shapekeys for Unity Game Engine

(from Blendernation...)
 


Foolish Frost is working on a toolkit which allows mesh animations in the Unity game engine being created with Blender’s shapekeys.

Foolish Frost writes:

I’ve been working with Unity since the first day it was released for windows, and have always been interested in how it works with Blender.
The ease of taking an animated character from Blender into unity and just having it work without a ton of tweaking amazed me.


…But shapekeys, the mesh morph system for Blender, didn’t work.


I came to the conclusion the current methods did not work for importing shapes, for the following reasons:
  • Importing the shapes generally took reimporting the mesh for every shape, and hoping the mesh data all read the same in regards to the number and order of verts. (They never did)
  • They tended to be slow, updating the whole mesh every frame, dropping frame rates on complex meshes regardless of what was morphed.
  • Most didn’t have any API built in to easilly get started using it, and were no more than concept proofs.
After a month of examining the possible options, I came to the conclusion I couldn’t find anything that would work in a production environment.
I’m not saying that none of them worked, Just that they did not seem to be solutions I would have paid for and used. That got me thinking about what I WOULD pay for in a tool
  • It would need to use a standard file format for storing morph shapes that can easilly be applied to a mesh regardless of how the importer organized it.
  • It would need to be fast, and only do as much work as needed to change the morphing areas of hte mesh.
  • It would need to be able to stick the UV seams of the mesh back together after all morphs are applied to the mesh. (to stop tearing from float errors on xyz position)
  • It would need to be able to export/import full animation made up of possibly dozens of shapekeys, and play them back perfectly in synch with bone animation.
  • A full API for other coders to make use of it without having to rewrite the MetaMorph script.
Based on that laundry list of features, I started coding MetaMorph. It includes a Diff Map exporter for Blender, The MetaMorph code in UnityScript for Unity, and all needed files to test it out. The project contains the full scene, but the only file you need for your own projects is MetaMorph.py.
 

Charon MoonyMetaMorph is a Unity3d and Blender3d toolkit that allows mesh animation in Unity games using Blender shapekeys. It includes an export script for Blender that converts shapekeys into Diff maps and saves the animation data as text files. The MetaMorph script for Unity can read the Diff maps and animation data in order to play back the morph animations in real time.
 

Project Link:
http://rezzable.com/blogs/foolish-frost/presenting-metamorph-toolkit-blender-and-unity


SOURCE

No comments: