I’m very new to Unity and only somewhat less new to Blender so I’m investing some time in familiarising myself with the workflow needed to get skinned, animated models into Unity.
I’ve succeeded in importing a non-animated, non-skinned model, and attached a MeshCollider and got interactivity working. The node hierarchy of the import was easy enough to understand; I created an interactive prefab and all worked hunky dory. See attached “monkeytest.blend”.
I’ve just built a new blender file “ExpressiveMonkey.blend” (also attached) to test a couple of basic animations for import. It has:
-One simple mesh of a monkey head.
-Two simple animations on the head mesh, one where the whole head nods (root bone), and one where the eyes (child of head/root bone) move from side to side. They are 2 separate Blender Actions – I’ve read this is now a working feature in the FBX Exporter. I haven’t tried to crossfade them, though presumably that ought to work if both animations work individually, which they do.
-A material, including it’s single texture. This skins the head and eyes, which are one mesh.
The problem in this case I don’t understand what it is I am looking at in terms of the imported hierarchy, or how I’m meant to instantiate it (or pieces of it) in order to make my own prefab. Do I instantiate from the root of the whole complex asset? I’m not sure that it is meant to be that messy inside. Try importing the file ExpressiveMonkey.blend to see what I mean.
When I instantiate the import as-is in the game world, I get this:
ExpressiveMonkey (transform with Animation component)
->Armature (transform)
–>ExpressiveMonkey (transform, otherwise empty)
–>Head (transform, Skinned Mesh Renderer)
—>Eyes (transform)
(…Perhaps someone can show me, using similar notation, what their animated import hierarchies usually look like, so I know if this is totally whacked out or not.)
One thing that caught my eye here was there is no Mesh Filter, so I can’t see how it would render, unless the Skinned Mesh Renderer created on import handles this aspect? Also there is a lot of separation into discrete nodes – only not where I want it. For example, “Head” in my hierarchy is actually a bone (and thus nothing more than a transform in Unity). However, it has combined the bone with the underlying mesh in this node(?), since that’s the node with the Skinned Mesh Renderer on it… :?
There is a substantial difference in how data is structured on import, between the first and second .blend files I’ve attached. And the second one’s got me confused as can be. Much of this may boil down to my ignorance of how things should be set up in Blender, so sorry if any of this sounds stupid.
Essentially, I want to know how to get things organised neatly so that I can work easily with assets, using script, once they arrive in Unity.
260515–9360–$myimports_207.zip (124 KB)