How can I export model with shapekeys?
I lost my blender files and now I wish to export meshes from my unity project. When I export FBX and import it to blender mesh is missing shapekeys even trough I can see blendshapes attached to a mesh in unity and they work just fine there. I am fairly new to unity and never done much exporting before. How can I export mesh with shapekeys attached to it? Is it FBX exporter bug or am I missing something?
Answer by Hardev · Feb 27, 2020 at 04:19 PM
I would like to know that as well. Currently trying to export my scene setup to Marmoset. I carefully tweaked multiple shape keys of multiple objects in my Unity scene to get variation to their static appearance/silhouette.
I thought creating an animation clip and keying the shape key values as a base pose might solve the problem. But I can't seem to be able to export an FBX file from Unity to another application with Shapekeys applied. At least not to Marmoset in my case.
I don't even want to export the shapekeys themselves, but just have the vertex positions of them stay in place as they are in my scene. But that doesn't seem to be possible as all my meshes vertex positions are reset on export. It seems every Shapekey is set to zero influence so that all my meshes look the same after export.
Interestingly and fortunatley, this doesn't happen with armature deformations I did to said objects in my scene. They export just fine as it seems.
EDIT: For me the shape keys stay intact in Blender, so that works for me. As a workaround now, I have to export all those meshes from Unity to Blender, copy the values of the various shapekeys from my scene to the appropriate keys of the meshes inside blender and then export the meshes again from there. Quite some extra steps that cost time. Would be nice if there'd be an option to "apply shape keys" on export or something. EDIT: Also I just realized that opposed to what I thought before, the deformations I've done to the armature bones in my scene are not properly exported as well if I am not mistaking. Even if I keyframe them. There are default values in position and rotation of every bone except the root. Selecting "Model(s)+Animation" in the FBX exporter doesn't seem to make a difference. All rotations and offsets I did to sub-bones in the scene view are seemingly discarded on export. So there seems to be no way to export those properties which is really restricting if you like to assemble a scene in Unity and then export it to realtime viewers for presentation. Think Im gonna need to try the SKetchfab exporter and see if it helps. Although I wanted to use Marmoset. Solution(partly): In hindsight, I should have probably deformed my bones in the scene while recording these deformations directly by keyframing them to single keys in animations, so the meshes would export as they are in the scene if you select "models(s) + animation". That way the meshs Armature deformations indeed get exported. But now the binding is all messed up when I import the FBX from Unity to Blender. I was able to fix this inside Blender by "clear parent inverse"-ing the armature. That made the mesh snap back to the position it is in also in the Unity scene. Still no applied shapekeys though, but the workaround described above should work.