I made a breakdown! =)
So as I said earlier here the basic idea of the effect is to create motion with particles and then drive with it some meshes with bone dynamics.
So here is a steps. You can open images in a new tab to see a full size.
Step 1. Mesh creation
Mesh is a quad with geometry noise applied beforehand in Blender.
Mesh is skinned on a simple bone chain. I used default auto weighting in Blender.
Also mesh pivot is the same as the root bone position. That way when we drive actor position we move bone chain visually correct.
Then lets assign a material. I just took a photos of my clothes on the floor and cut it out in Photoshop.
Material is super simple:
Step 2. Particle system creation
Here is the same effect but only with particles:
About system setup. This is a Niagara Particle System with only one emitter.
Standard particle initialization. They are created in a circle (sphere with zero Z scale).
Circle motion is done with the Vortex Force module. It does literally that. Attracts particles to a point and spins them around a specified axis. Origin Pull Amount parameter controls how strong particles will be pulled toward vortex origin. Vortex Force controls spinning force. In combination with Origin Pull Amount and Vortex Force we can control the size and speed of the vortex. So I drive these values with curves to get desired motion. At the end of the effect I just drop Vortex Force to the 0 and with the rest of the impulse and gravity particles fall down.
Gravity module is enabled in the end to pull particles to the bottom.
There is a tricky part in how moving particles forward was made. At first I was changing Vortex Origin Point in the Vortex Force module. But it was too slow in motion because of inertia and forces. It was hard to control. So I choose a less smooth but more precise method.
Every frame I offset a simulation position by a curve controlled value. But to not ruin the simulation and mess with the velocities I need to simulate at the origin first and offset then.
So I created a variable CachedPosition and store in it particle position right after the physics solver. Then I offset the particle position by the needed amount. And in the next frame I restore the particle position from CachedPosition to continue the simulation without offset. And then offset it again.
The order of the operations/modules is important.
Variable has to be initialized somewhere. Usually on spawn:
Restore particle position without offset before simulation:
Cache Particle Position after the physics solver.
Offset the simulation by curve:
Step 3. Attach mesh to particles
So next lets attach our mesh to particles.
I made an Actor for the individual cloth. It consists of a single skeletal mesh component.
Then in the main effect actor I spawn these cloth actors to match particle count (around 15). I store these acors in array for later access.
In every tick I gather particles position and velocity and transform cloth actors accordingly. There are special methods for getting emitter properties in blueprints.
Now we can get something like this:
Now we need to set up a cloth skeletal mesh animation blueprint.
Set up is very simple:
What is important here:
Chain Bone Axis is set to Y - along the bone chain.
Invert Chain Bone Axis for a correct behaviour.
And Limit Stretch to disable stretching which was not very good looking at VFX speeds.
So we can get something like that:
Don’t forget to assign created animation blueprint to a skeletal mesh component in cloth actor.
And parameter Simulate Physics should be turned On.
Now effect looks like that:
In cloth actor add a simple code to assign random material instances from an array. Also I added a timeline to control cloth scale at the start and end.
Camera Shakes and victim offset.
Victim is controlled via a simple timeline and transform change. Camera Shake uses a built in Unreal system for that.
And this is it! Thank you everyone for the great challenge! =)
Feel free to ask anything =)