Complex Precomputed Cloth Animation for Cinematics Use (MODO)

Greetings,

I am creating a complex cloth simulation in MODO - essentially a large, heavy sail that flails in the wind before being torn off.

At present I am at a loss for the best way of getting this object into Unreal so that I can use it in a cinematic via Sequencer.

This object does not need to physically interact with anything, and it isn’t attached to any characters that require it to be real-time (i.e. Apex). The simulation would be computed with all of the static objects ahead of time.

I have seen a few posts lamenting the lack of vertex animation capabilities, which was my first thought at an approach. Digging into the Elemental demo, I see that the banners Epic used have some 250 bones in them and are brought in as a skeletal mesh. Are they using some kind of Maya script to set those up after the simulation is done? If so, I am somewhat concerned about the number of bones required to do something like this because my object is far more dynamic than a flag/banner.

This video sheds some light on how a lot of the precomputed ruble for the Elemental demo was done using skeletal meshes:

https://www.youtube.com/watch?v=iQ6HFdP8_C4

I was hoping the community/developers might have some input on how to import my cloth sim into the engine.

Thanks,
-RC

Hey Roman,

I actually did something similar to this with a destructible mesh that was using a baked out physics simulation from Max and then brought over to UE4 as an animation. I’ve not tried this with Cloth specifically yet, but the process I outline here should be similar if you want to give it a shot and let me know.

When I did the physics simulation in Max everything was baked to the timeline and then exported with the FBX. When I brought it into UE4 it created the bones needed. Again, I’m not 100% sure on the cloth simulation that was done for Elemental, but the destrution was handled in this manner so there was no need to skin, weight, or bone anything before hand, which is very handy!

If you want to give this a shot and let me know if it works out that would be great. If you’re still having issue I can see if I can put something together as a test on my end for the process early next week.

Thanks very much ,

To start, I have been able to hand-key a teapot rotating 360 degrees over 120 frames in Modo 902 and successfully export it as a skeletal mesh into Unreal. It plays without much problem, there is a warning about keyframe curves that might not work when I export, but it didn’t cause any problems with the animation playing in Unreal. Importing into the Editor I also get a “! Could not find the bind pose. It will use time 0 as bind pose.” warning, but again the animation plays fine. I can actually just drag the animation sequence object (teapot_anim) into the scene and it will autoplay without any Blueprint setup when I drop into game mode. (Also a smoothing group error but that seems to be a known issue with Modo, shouldn’t affect the animation)

Next I finished a cloth simulation in Modo 902* that was also 120 frames, baked it down into individual keyframes, then exported as before. I get the same warning on import and the same set of files as I did with the teapot- a skeletal mesh, an animation, and a skeleton. However, this time the animation file will not play in the scene, nor will it play when I open the animation file directly. I’ve tried wiring up BPs to it as well but no luck. I’m wondering if the sort of ‘vertex animation nature’ of the sequence is causing problems.

I’m going to try making a rigid body simulation next, in the same manner as your tutorial and see if I have any success there.

One other note, my copy of Modo 902 sp3 uses export version ‘FBX 2013’ though I know we should be using 2014 according to the docs. I haven’t seen any updated exporter for Modo available yet however.

Thanks again,
-RC

*Episode 08 Cloth Simulation - YouTube

Rigid body simulation skeletal mesh is good to go:

These are actually 2 SMs working together- one for the ball and one for box wall. One of the FBX options for the Modo exporter is ‘Export selection with hierarchy’ which allowed me to import the box wall correctly after I built is using a tutorial.* I also ran into a problem where the box wall SM would stop playing early and vanish but found it was because I hadn’t told the importer to create a physics asset for it.

*Physics Simulation In Modo - 3D VFX Tutorial - YouTube

Here you can see the skeleton that was generated for the box wall in action in Unreal:

4274c4f9e5baa73c42459deeec20ba3d824248a1.jpeg

Still unable to get the cloth simulation SM to play at all though, about to run some more tests.

Thanks,
-RC

Below are some tests I ran to see about getting soft body (for cloth) baked simulations out of Modo and into UE4 as skeletal meshes. Still unsuccessful.

The first image was my original test and quite dense. I thought that I had exceeded some kind of vertex or bone count after using the FBX importer in the Editor so I tried something very simple, which you see in the second image. On the off chance that the problem might have to do with the single-sided planar nature of the mesh, I tried a soft body cube, which is image 3. All of these images are taken from Modo.

Below are the FBX import settings that seem to work for the rigid body skeletal meshes. I’m not sure if there might be something in here causing problems for the soft body bakes.

Thanks,
-RC

Hi,

I have been on a similar mission to get complex cloth sims for cinematic sequences and other into Unreal (in my case Characters), but to my knowledge so far this is not possible… yet, unless a custom plugin or an official one such as Alembic support comes in soon, we hope!

There is a big difference when you are speaking of rigid body objects such as rubble and falling bodies vs something deform able with complex folds like cloth. Since Rigid bodies are technically easily exported by putting bones in every piece through an automated script process and exporting that through FBX as Moving objects like you see in the sample files, but cloth is a different matter entirely, currently unreal has trouble supporting flexible workflow when it comes to vertex animation exports and imports or point caches etc. Since FBX does not support vertex animation or Caches files. Which is why an alembic support is high on demand in the road map for exactly this purpose. There are a few scripts out there for max from Epic but through our tests they are limited and not intuitive for serious production work and complicated objects. The workaround (if the cloth geometry is low res enough) is that you can try rigging it with multiple bones and have those bones be driven by the vertex cloth sim of the application for that object (I use Max) and then export the bones with the mesh as normal skinned object, it will work well for many scenarios but you wont get complex cloth folds and other details depending on the level of resolution and detail you are going for, plus the higher more complex you need the folds on the cloth to be the more bones you will need to drive their deformations.

Other than that you will have to either wait like most of us for the alembic to come out (here’s hoping for version 4.13) or invest in a software developer to create a custom alembic support for you in Unreal.

Thanks ,

I guess we’ll have to wait then until there is a proper vertex animation import solution. I downloaded Nvidia’s FleX (NVIDIA FleX | NVIDIA Developer) toy demo which also looks promising for a number of things, cloth included. It is part of a suite of tools called GameWorks, you may be familiar with it since we have been seeking a similar solution. I don’t know anything about implementing custom UE4 branches though and have no software engineers on hand to help with such things.

Thanks,
-RC

Hi RC

Yes Nvidia Flex looks promising (especially the water sims), but it is still not fully implemented or supported, plus it may have other performance issues even though I haven’t tested it myself yet, but I have read good amount about it. I prefer to have more control over things like cloth and rigid dynamics, which is why a prebaked more directed approach for such simulations is our prefered method. I have been using Apex cloth with Max and unreal for a while on characters and it looks promising so far, but I prefer to rig most of the cloth in max in a good way plus fake the movements through hand animation and use Apex on the more loose ends to sell the effect rather than rely on it entirely, since even a good Apex setup has the tendency to go crazy in complex movements or fast movements with the realtime cloth sim having difficulty to notice collisions and other factors, and the last you ant to see is stuttering cloth on a character or moving object.

It’s almost always risk vs visual gain choices before implementation.