our magic asset workflow for animated models

402 views
Skip to first unread message

Chris Friesen

unread,
Sep 7, 2013, 3:42:21 AM9/7/13
to urh...@googlegroups.com
It has been quite a process getting animated characters working happily in blender -> game engine.  The blender community hasn't matured much past stills and shorts (hopefully this will change since we really like blender).  Our first large trial was the disappointment of using blender's rigify which has a mind bottling amount of bones.  Rigify its really good within the confines of blender but utterly useless for game export.  Being snobbish my wife and I we wanted to be able to leverage good animation controls on the models.  We have a blerg post detailing our process for baking animations from a fancy rig to a deformation rig.


So fancy rig -> deformation rig aside we have had general problems with every exporter in blender.  Blender can't even import its own fbx files it creates.  https://projects.blender.org/tracker/index.php?func=detail&aid=36676&group_id=9&atid=498 The urho plugin works really well except that there is an issue with the vertex wieghts (left arm mesh following right arm bones?) We have finally pinned down a workflow which is a tall order but it should carry predictable results.  The process involves cleaning the fbx from blender with the help of the autodesk fbx converter http://usa.autodesk.com/adsk/servlet/pc/item?id=10775855&siteID=123112  This doesn't work perfectly.  It seems that the mesh is rotated 90 degrees but the amature is fine.  So fiddle the knobs and crank the levers a bit before you export and voila!

Here is a blerg post detailing the exporting workflow


I am hoping that Marie and I are just Doing It Wrong (TM).  Even when we were using unity we had lots of issues.  I feel pity on a young whippersnapper if they have to go through this.

I am wondering if the open asset importer has a bug with its fbx import.  It may be worth an update from the latest https://github.com/assimp/assimp

Thanks,
Chris

Alex Fuller

unread,
Sep 7, 2013, 11:19:12 PM9/7/13
to urh...@googlegroups.com
Looks scary. :( As much as I like Blender, I think I'll stick to Maya for rigged assets for now. I know all too well of the dramas back in the <=2.49b days of dealing with the older Collada importer/exporter but I was hoping that was a solved issue with FBX or DAE. Is there any workflow tutorials for Blender-to-Unity that use FBX, which might shed some light on skipping potential pitfalls or seeing if maybe Assimp/AssetImporter could the problem in those cases? Actually have you tried the Collada exporter in Blender to see if it's better?

For my own project, I used Collada out of Maya using the FBX_DAE exporter (this was before Urho merged the FBX branch of Assimp) and had lots of dramas until I sanitised the rig so that it only had baked keys and no 'higher-level' rig what so ever. If I was making a bigger project I'd make a python tool to automate this to an intermediate scene file just to remove any potential problems for the export process, I guess similar to how you approached it.

-Alex

Chris Friesen

unread,
Sep 8, 2013, 3:16:22 AM9/8/13
to urh...@googlegroups.com
Unity's blender integration was always in peril.  It had problems detecting where blender was located and broke on minor patch revisions.  I last used unity like 8 months ago and all the blender integration is, is a little shim to open up blender and convert a the scene to fbx and copies the mats/textures.  Many people just skip blender integration and dump fbx.  I quit using unity right around blender 2.66 which i believe was the version that finally implemented collada.  And like anything involving unity presently you get A LOT of noise from the masses.  There are lots of people using blender + unity but I havn't been able to glean much knowledge.  Everyone who is good assumes you know stuff already and their useful comments are just side remarks, while the noobs flail about.  They need a paid users forum something fierce.

We did have better luck with fbx in unity then urho which leads me to suspect the open asset importer.  Right now i get a busted header error with fbx which is a known bug with blender.  When i tried Collada it didn't work but I will try i again using the cli as it is more verbose.  I thought I have read that Loomi uses collada and it works for him.  The official fbx sdk might have a lot more code fudging things that aren't perfect which could be our case.  It only takes one stupid thing for these exports not to work well.  I would only assume that unity has licence to the official fbx sdk.  Our rigs have gotten more complicated as we find better ways to handle shoulders/neck/arms etc.  We still have lots of room to fix those areas.  We will certainly do a blog post detailing the exact low poly topology to get the shoulders to animate well.  My wife downloaded the trial of maya, opened up a model, exported it as an fbx and it worked in urho the first go.  Suposedly there is google summer of code that did some work on exporters but that code hasn't landed yet.  Fall is always slow for blender merging all of the summer work.

Raster Ron

unread,
Sep 10, 2013, 5:00:01 AM9/10/13
to urh...@googlegroups.com
Hey Chris,

Blender nut here.. I have been looking for this type of resource since I started with the engine. will definitely try this one!

Kudos and thanks for sharing.

Chris Friesen

unread,
Sep 10, 2013, 1:39:20 PM9/10/13
to urh...@googlegroups.com
I would encourage you to try the simpler methods first since I can be doing it wrong :D  but if you have problems i really hope you can find our info useful.

Raster Ron

unread,
Sep 12, 2013, 10:42:32 PM9/12/13
to urh...@googlegroups.com

Ok, will do. thanks again.

Mike

unread,
Dec 19, 2013, 2:43:31 AM12/19/13
to urh...@googlegroups.com
Many thanks for sharing your workflow Chris.

Currently I find it to be the only one that is both accurate and versatile, supporting multiple meshes and advanced rigs, and outputing one ani file per action. It never failed once.

For Blender export I use the "strict XNA options" and for fbx conversion I use the linux 2011 converter from Autodesk, so I can confirm that your workflow is crossplatform and that we are not constrained by a particular fbx sdk version.

erike...@gmail.com

unread,
Dec 19, 2013, 5:55:48 AM12/19/13
to urh...@googlegroups.com
I've found fragMotion's .x exporter to work quite well so far. The program also supports multiple animation actions that output one .ani per action when using the .x exporter. Although the animations inside the program are shown flipped when compared to urho3d.

Here's a list of all the supported import/export formats:

Mike

unread,
Dec 22, 2013, 1:59:32 AM12/22/13
to urh...@googlegroups.com
Slightly off topic, does anyone has a robust workflow for exporting shapekeys from Blender ?

Chris Friesen

unread,
Dec 22, 2013, 3:43:38 PM12/22/13
to urh...@googlegroups.com
I thought the semi official urho blender plugin supported it.

Source\Extras\BlenderExporter\io_mesh_urho

I havn't tried using the shapekeys with the plugin though.

Alex Fuller

unread,
Dec 22, 2013, 6:00:57 PM12/22/13
to urh...@googlegroups.com
Something interesting I found the other day, yet another format spec to use vs Collada/FBX:

It looks simple enough, wonder if this one can get it right... :)

Mike

unread,
Dec 23, 2013, 7:05:53 AM12/23/13
to urh...@googlegroups.com
Chris Friesen wrote:
I thought the semi official urho blender plugin supported it.
I havn't tried using the shapekeys with the plugin though.

 Unfortunately I didn't get it to work with this plugin, but according to the dedicated thread some people did, so maybe I'm missing something...

Paweł Mogiła

unread,
Dec 23, 2013, 3:57:00 PM12/23/13
to urh...@googlegroups.com
Hi Mike,
keyshapes works and you can easily export them to urho3d using blender standard collada exporter then importing that collada file from urho3d editor or asset importer. To see effects you need to attach imported mdl model to animatedModel. Then you are able to control how the object look like by calling SetMorphWeight(something like that) on this animated model

Mike

unread,
Dec 23, 2013, 4:53:51 PM12/23/13
to urh...@googlegroups.com
Thanks Pawel,

That is exactly what I did, but it didn't work (GetNumMorphs returns nil).
I've attached a blend file. When exporting to collada, I only check 'Include Shapekeys'.

ShapeKeys.blend

Paweł Mogiła

unread,
Dec 23, 2013, 8:12:07 PM12/23/13
to urh...@googlegroups.com
That's very weird, i remember I got working keyshapes some time ago when testing exporters. But now I tried to export with collada, blenderurho exporter and even ogre exporter and non of these work and I also always get numMorphs as 0. But I do recall playing with morphs in urho, so something changed, or I don't remember how I've got it working. I also lost these old exported models so I can't test if the old ones still work :(
Reply all
Reply to author
Forward
0 new messages