I’m struggling with a little (that starts to run on my nervers and… then is growing XD) problem.
Learning both Blender and UE4, I wish to train to build and manage a simple body with clothes, animations and shape keys.
How to export animations using shape keys and meshes using shape keys (I have both cases) to UE4? UE4 seems unable to recognize shape keys animations, whatever the parameters I’m using for export from Blender and import to UE4.
The FBX file works propeperly, at least as it seems, since I can get the shape keys data and animation when importing in an empty blender instance.
A shape key is nothing but a curve.
by default, the exporter does not pack custom curves.
You can try using a custom curve and my addon to export an animation file with the custom curve, but depending on the amout of morphs this can be rather complex.
You also need to set up something that reads the curve value and applies it to the morph within the animation BP or the character BP.
I would suggest you create a custom interface function, so you can call it from a variety of objects.
As far as the code, you can literally call set morph target on the mesh, but you have to pull the curve out of the from a reference to the animation blueprint. This requires 1 cast. At begin play, and storing the reference.
Mesh > get anim instance > cast to animation BP > promote to variable.
this way should preserve fast path and avoid code inside the animbp.
alternatively, you could dirty up the animation bp with a ton of Set Morph Target nodes. But the Get Curve Value to Set Morph may actually disable fast path - of that even matters to you.
so working on the character end with reusable code in a component may be preferable.
The weird thing is I can get all the info if I load my FBX file in a new empty Blender project.
From what I see, it rather looks UE4 doesn’t translate all FBX datas (or more exactly refuses to consider shape keys without bones : no bones = staticmesh VS bones=character). The weird thing is UE 4 process 3DSmax morph target but not Blender ones. The UE4 doc mentions FBX to import morph target, so…
The thing is UE add a “fbximport” when FBX are from Blender when Orwen morph target is recognized as an animation. But without bones UE4 don’t recognize Blender animations… kinda strange. FBX is supposed to be standard…
But, anayway, I will try some add-ons to see if I unlock something.
In blender, The module for exporting an fbx is written by the same person that wrote the import module so onviously they understand each other.
this doesn’t mean the data is packed correctly as per autodesk specifications, which is what my plugin had to change to get curves working.
The morph export fine. Just not within animations.
What I find strange is to see people making tutorials and managing to import shape keys to UE4 without addons.
The are still things to verify, I will check that further.
To be honest, I don’t feel comfortable at all with the idea to make a custom function. C, Java and OOP are kinda far and I don’t know C++ plus the need to familiarize with UE engine… gosh… XD
[EDIT]
More I think about it, there’s something that can lead to a missunderstanding. What I wish with shape keys is to add some kind of deformation range (I can manipulate in UE4) rather than an animation.
Import needs to be from the content browser and not from file… -_- Two windows, with two different behaviors except… they end by importing the same object in the same directory but with two interpretations of the fbx (even if we use the same options ôO)…
A picture will be enough (I should have select the right tab rather than to let on scene by default in the file import fbx screen):
I guess it’s not a bug, rather they have different purpose of use. The file option is probably more to be used between existing levels.
Fbx scene includes other things like lights and camera /what not.
if you are coming in from autodesk directly it should import whatever you have in the scene.
I suppose this is mostly of use to architects and the like who have no need for:
performance, 2) asset naming, 3) materials, etc.
Either way, neither import should get your animation to track morph targets right off the bat. Or at the very least it did not or had some limitation i needed to bypass when I set up my character.
I have some doubt about what you imagine I try to import. I’m discovering and just doing tests. It is not really different from the pinocchio example Epic provides as demonstration…