Vertex Animated FBX

Hey,

First of all, love what you’re doing with UE4. Definitely helps the ‘little guy’ get hold of some really nice functionality.

That being said, there’s something I’ve run into which is really cramping my style. One of the things Unity has going for it, which is pretty much vital to the project we’re currently producing, is the fact it can import FBX files with vertex animations, and play them back without any kind of rig in place.

UE4 doesn’t seem to handle this. You can bring in a file, but if there’s no rig, there’s no way to animate it - as far as I can tell.

Just to set the scene; I have a scene in Maya containing approximately 4500 individual objects. They’re all driven with a fairly complicated expression and particle-driven system in Maya. With Unity, we can bake all this dynamic information down to keyframes, and bring the keyframed geometry into the engine. With UDK, I can’t see a way to do that. The closest thing I can imagine is writing a script which places a joint at every object, and traces its movement through the scene, then rigging the geo its respective joints. Which is not really an option - mainly because we’d end up with a rig containing 4500+ bones.

If there’s a way to get non-rigged animations into UE4, I’d be eternally grateful for the knowledge (or the code) to do so.

Thanks!

Okay,

I’ve played around a bit with this problem, and have possibly found a working solution.

In previous versions of UE, I found it was not possible to simply parent a piece of geo to a bone and have it animate as you’d expect from Maya. You’d have to skin the object to the skeleton, which is a major pain if you need to make changes to geo later down the pipeline.

However, out of curiosity, I tried it in UE4, and simply parenting the geo to the target bone seems to be working as expected.

If anyone is interested, here’s a script that’ll take a bunch of keyframed geometry, build a skeleton for the entire hierarchy, and bake the animation keys from one to the other. It’d be super useful if you’re doing some fairly complicated rigid body sims in Maya, and want to bring them into UE without trying to rebuild the entire physics sim in UE. As for limitations, I can’t find any documentation anywhere that lists the limit of the number of bones an individual skeleton can have - so you may have to partition up your animation if you have a large number of individual objects (which I do, unfortunately).


import maya.cmds as cmds
import maya.mel as mel

def buildSkeleton():
	selection = cmds.ls(sl=True)
	cmds.select(clear=True)
	root_joint = cmds.joint(p=[0,0,0], name='flow_root')
	for tile in selection:
		cmds.select(clear=True)
		new_joint = cmds.joint(p=(cmds.xform(tile, t=True, ws=True, q=True)), name=(tile + '_ctrlJoint'))
		cmds.joint(p=(cmds.xform(tile, t=True, ws=True, q=True)))
		cmds.parent(new_joint, root_joint)
		cmds.parentConstraint(tile, new_joint)
		cmds.bakeResults(new_joint, simulation=True, t=(1,100), sampleBy=1)
		new_dupe = cmds.duplicate(tile)
		cmds.select(clear=True)
		cmds.parent(new_dupe, new_joint)		
		
buildSkeleton()

NB: This isn’t an optimised or fast script. If I get time in the future I’ll clean it up and make it run a bit faster. But then again, it was never *really *meant for public use, so…

As you say we do not currently have support for vertex animation on skeletal meshes. We do have support for blend shapes (aka morph targets) though, which you can use to animate a mesh without bones. We want to add full vertex anim support, and if you look in the code on GitHub you can probably see the beginnings of that system! The big problem we ran into was that FBX point cache only contained position information and not normals. We spoke to Autodesk and they said they will fix this in an upcoming version. We are also investigating alternative file formats (such as Alembic). The other big part of vertex animation is compression - it’s a LOT of data! We haven’t really started researching that yet.

Thanks for the reply.

That makes sense. Its a bit of a pain, but we can probably work around it for now.

Supporting Alembic would absolutely make my year…

I’ll second that!

Having baked vertex animation would make Unreal the perfect viz tool for me (and a lot of people). I will say that for me, file size isn’t an issue since I’d just be using something like an alembic file for cinematics.
I do a lot of my work in Max (thinking particles and cloth sims for soft body and tearing geometry) and there’s just no way to have bones drive that kind of animation (efficiently anyway).
Any official plans for this implementation?

I’d happily be a tester for someone :wink:

Wise.
Alembic format could allow integration of animated assets from other a wide variety of other software.

I agree on all of the above. Infact, I believe that should unreal support alembic, it would seriously have a huge impact on the 3rd party developed rendering solutions for ( in particular ) tv/series development and possibly even larger/more costly productions. At the price of which unreal is available versus large expensive rendering plugins such as Vray, Maxwell etc on a per license vs machine basis, I think a large portion of studios would jump on this immediately…

Any new on this? “Cryengine as a Service” is out and their support for Alembic is pretty smooth. I can do just about everything I need with conventional skinning methods, but it’d be nice to have some Realflow or TP sims with dynamic vert counts in Unreal! I’m holding off on renewing my UE4 subscription for now.

Alembic support with be really nice. Especially for visualization and animation projects.
It would be a really great way to streamline your work from programs as maya to unreal4 with the support of instances, geometry cache and maybe even particle cache.

Seriously! I’ve got a pretty slick pipeline between both Unreal and Cryengine.
I’d even be willing to pay a little extra for some alembic support!

PLEASE! :smiley:

Is there an update on this? UE is incredible and having worked with Alembic myself at Imageworks as a Technical Director I can tell you it’s super powerful and a very smart framework! Just about all major 3D softwares have alembic support and if UE can support it as well, it will open up the market to more then just games and games using it would benefit greatly!
This video (from 2011) at the 11 minute mark has a brief talk about alembic. For instance the massive transformer geometry didn’t require blendshapes(shape deformations) because they are only objects being transformed, same goes for iron man and environments, so you don’t make a point cache of a transformer every frame you only make a struct of the transformations of each object which is how alembic is smart.

Keep us updated please!

[video]http://media.fxguide.com/fxguidetv/fxguidetv-ep116.mp4[/video]

I would find alembic import extremely helpful for things like waterfalls and splashes.

So, what is happening with this? Alembic is the ticket. Any news?

Yes I am also curious about this… any timelines?

Where is the LIKE button on this entire topic?!

UE being free for film making is awesome, but pretty useless, until vertex caching from DCCs is possible. I can’t believe, that the only possibility so far, is to assign a bone or null to each and every vertex, use bone based rigs in general, needing to get across the whole rig, driving the mesh…painful process. Facial animation just by using mixamo mocap or other 3rd party plugs. Also, I want to mention, that cryengine does it (geom cache) and I read some UE using companies wrote their own import tools (but don’t make them public!) besides the high number of votes for alembic and vertex animation:

- YouTube (turn off sound :D)

What I find really strange, is that no one seems to be working on this top priority major issue :frowning:

Please UE FIX THIS, CAUSE IT’S POSSIBLE!

Most games don’t need it, which is why it’s not a pressing issue

Depends. Would open the possiblity to have more customization, even very interesting for small studios. If it wouldn’t be an issue, there wouldn’t be geom cache in Cryengine and Unity’s limited 3rd party importer. Just thinking about cutscenes/cinematics, it’s even a gap which separates small from big games.

Most things need to be dynamic in video games, which is why there’s more focus on doing the animation dynamically rather than using imported animation that can’t be changed.
I’m sure it’ll get added eventually, just have to be patient

No black magic just needs to be witten:

“Alembic Cache Playback – enables playback of Alembic files in UE4 so that they can import vertex cache animation such as water simulations or rigid motion animation to handle up to 10k fragments.”