Download

[Tutorial] Pre-made physics simulation in UE4

Hello guys,

I prepared a video tutorial where I show how to make animation based on a MassFX physics simulation and import it into Unreal Engine 4. You can use it later for your game or cinematic (like in Elemental demo for example). Like I mentioned in tutorial, I’m currently working on a MAXscript that speeds up the whole process . It should be ready soon.

Anyway hope you like it:

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

EDIT:
QuickBone Tool ver.1.0 is ready

Download the script: http://www.michalorzelek.com/blog/?p=673

You can find more tutorials here: http://www.michalorzelek.com/blog/

Cheers,
Michal

That looks really cool!

Hi Michal,

Nice tutorial! I found a similar one the other day for using a Destruction mesh for animated destruction of a bridge using MassFX. This is something that I want to use and test more thoroughly. Thanks for the tutorial and I’ll definitely give this a shot soon! :slight_smile:

Tim

Hello Tim,
Yes, there are lots of MassFX or destruction tutorials over the net, but couldn’t find anything related to the Unreal Engine or any other game engine. Anyway, hope to see your bridge test soon :slight_smile:

Michal

I’m not sure if this still works - but I found that objects with keyed animation, stored under a root bone automatically animate correctly in UE - at least when exported from Maya as FBX and imported into UE as a skeletal mesh.

Unfortunately I’m not familiar with Maya, so I don’t know (Is there anyone who uses Maya and can prove it?). In 3ds Max you have to use “Skin” modifier to use bones in Skeletal meshes. And when you use Skin you are not able to link bones with objects. It’s because you would create dependency loop (which is logical). Anyway, if it works as you described, you just skip some of the stops. I’m gonna check this. Thanks.

Yeah, I don’t know Max…

But basically, if there’s keyframes on the geometry (so its been baked out from the simulation, and is scrubbable independant of any sim), all I had to do was parent all the geo under a single root bone, and it just worked. You just have to make sure ‘animation’ and ‘bake animation’ are enabled in the FBX exporter window.

I wonder if you could use this approach, but blend in physics simulation.

Use PhAT to put sphere collision shapes on each rock or whatnot, then use the existing physics blend nodes in the animation blueprint, perhaps.

Maybe a dumb qustion, but can this be used with “regular” destructibels?
If i have a object that i want to get destroyed when a player hits it.

Can i have small chunks fall of and have the simulation play when the support depth is reached/ broken?

I don’t quite understand. You want to use baked simulation from 3ds Max and PhAT together?

Actually, it’s not a dumb question. Using Destructible Mesh and physics in UE4 is a different approach. It’s more, let’s say, dynamic. In approach I showed in tutorial, you have more control over animation. You can break your object manually, you can adjust you animation after it’s baked and so on. Sometimes (like in cinematic) it’s important to have everything planned the way you want.

And answering your question… Yes you can. Simulation can be done either in 3ds max or Unreal Engine. The difference is what are you going to trigger in blueprint.

@QuickBrownFox: thanks :slight_smile:

Nice tutorial!
I just wanted to ask if you had tried simply using the import Rigid animation option in UE4? I’ve used it successfully for simulating things like trains and traffic simulated outside UE4.
Here’s how to do it:

  1. Create a dummy in MAX, name it something if you’d like
  2. Select all your animated objects and link them to the dummy
  3. Select the objects and the parent dummy and Export Selected
  4. Set your export settings to bake the animation, etc just as you would for a skeletal animation and save your fbx
  5. import the FBX into UE4
  6. In the import options, select Skeletal Mesh, and in the advanced options, select Rigid Animation and import!

This should make a skeleton, etc and the animation assets for you. No need to use a skin modifier, etc!

I haven’t tried this with dynamics simulated objects, but I don’t see any reason it shouldn’t work.

Hello Tom,
I haven’t used that “Import Rigid Mesh” option before, but I followed your instructions and it works :slight_smile: However UE4 gives you warnings about asset type so you need to set the Skeletal Mesh / Animation type manually (which is not a big deal I think).

Anyway this workaround works fine with simulated objects. You basically skip the skinning step. You still need to align dummy objects to pivot points of animated objects. I think I should collect positive and negative aspect of both solutions and adjust my script.

Thanks for your feedback!

Yep - I think it would work too.

I’m not sure if you’d need a bone for each object - probably. In any case though, you’d basically set it up like a character’s ragdoll PhAT, collision volume for each body, animation blueprint that blends in physics to the animation. Since it’s a skeletal mesh it should technically work. Again though it might need a bone for each object that is going to update via physics, and the settings for bone updates set.

I haven’t needed to align dummy objects, etc. I’ve simply linked the objects to a single root node and it works. It uses each object’s name as the bone name and the pivot point as the bone’s location.

Ok thank you for clerefying.
:slight_smile: