Physics asset issues; unable to add / remove bodies without breaking everything

I’ve been fighting with this for a long time and am unable to find a solution. I am new to using the physics asset tool and new to working with skeletal meshes in the engine. I have attempted to follow Epic’s tutorials but to no avail. I am working with blender (2.78) to create my meshes and skeleton rigs. In my opinion, the rigging, be it primitive, is solid. I am able to bring the skeletal mesh into the engine with no problems. I am also able to manipulate the skeleton from inside of Unreal, and the mesh deforms as it should with no issues. Animations also seem to work fine with me skeletal mesh.

The problem comes in when making a physics asset of the mesh. To make one, I right click the skeletal mesh in the content browser and create a physics asset, assigning default values for the asset tool to work with in generating the asset itself. To simplify what I am experiencing with my character model, I created a “noodle” model to test the asset tool and see if I was doing anything wrong or if something was wrong with my (more complex) character rigging.

Below is a view of the noodle asset inside of the physics asset editor. The mesh has a simple skeleton that consists of six bones that run in a straight line through the mesh, like a spine. Below is a screenshot of what the automatically generated physics asset looks like.

Upon hitting simulate, it flops around like a noodle; as expected.

If I delete one of the collision bodies (in this case, from bone_005), then the physics still simulate as they should, minus the joint bending between bones 004 and 005. I run into problems when I do this with my character model. The result I get upon hitting the simulate button will be described later.

Back to the noodle model, if I go to add a collision body back to that bone by right clicking the bone name in the hierarchy > new body > and I leave the default values for generating a new sphyl, then everything appears to look as is does in the first image of this post. This, however, creates the problem my character model is having when I try to remove or add a body to any bone. Upon hitting simulate and expecting the noodle or character to flop on the ground, I need to take a lot of screenshots very quickly to show you how they explode like this:

Looking at my models as they fly away into the nothing, I can describe what is happening to the new bodies that I’m adding, or adjacent bodies to the one(s) that I remove; the bone(s) seem to shoot out a fixed distance away from the rest of the mesh. If I simulate only bone_005 on the noodle mesh, then you can see how this looks. After launching away from the mesh and remaining at a fixed distance from the mesh, the bone does not move in any way except for rotating on its joint. As I tested with my character model, the bone is impossible to move closer to where it should be and will manipulate the rest of the skeleton as if it were attached the way it should be.

I’ve tried seemingly everything; that “trick” of exporting the mesh with a scale modifier of 10 and importing it with a scale modifier of 0.1, I have applied scale and rotations to the mesh and armature from in blender, I’ve tried removing morph targets from the character model, turning all self-collision off on the physics asset, exporting with/without leaf bones, exporting with/without deform bones only… I have no idea what the problem is…

Any help will be greatly appreciated.

Update:

I’ve just recently downloaded Maya, since that seems to be the modeling and animation pipeline that Epic uses, to see if I could create a working physics asset from a skeletal mesh. Some people are saying it’s a problem with Blender and how it handles exporting armatures. (Although those issues should have been fixed from the older versions of Blender, and I even updated to a more recent build; 2.78c.) After learning the basics of Maya for the past day, I recreated my physics noodle asset in Maya and exported it to UE4.

Again, I get the same results; Model imports fine, bones deform the mesh fine, automatically generating a physics asset works fine, but as soon as I manipulate the bodies in the physics asset by adding or removing them, the model continues to stretch out when I hit simulate. Therefore, it doesn’t seem to be a problem with Blender exporting armatures.

Only other thing I have left to try, it seems, is to make a blank project and see if I can properly create physics assets there. I’ll be running that in the same version as the project I am having problems with, and will report back.

Nope; same thing. Anyone? Any ideas as to what causes this?

Okay… wow… this solution is convoluted. The few days this has been up, it doesn’t seem like a lot of people have shown interest in this issue, or perhaps they haven’t had this issue. Regardless, I am going to post my work around. Get your pens and note paper ready…

So, the issue here lies with the bones of the armature “being too small,” and PhAT isn’t able to correctly work with them. In addition to that, there seem to be issues with Blender adding an additional bone called “Armature” to the skeletal rig when it is exported (or whatever you happen to call your armature.) A passing remark in my research into this problem dictates that “Armature” is not a good name to use for your skeletons. Apparently, this will cause problems in some programs. I changed the name of my armature to something other than “Armature” before I exported my model.

This next step may not be important, but may also serve a purpose, as trying everything I’ve described in this post in the most recent version of Blender works. This step removes the “Armature Bone” from being exported with the FBX file.
Grabbing at anything I could try, I found an old forum post from two years ago: The trials and tribulations of Blender & Skeletal Meshes - Animation - Unreal Engine Forums . Post number 12 is the one you’d like to view. Downloading those files, and an older version of Blender, 2.77, I replaced the files in io_scene_fbx with the ones provided.

Although I had my scene set up correctly and everything was proportional to meters, I needed to use the “0.01 world scale trick.” Under the scene tab in Blender, make sure your unit length is set to metric, and the unit scale is set to 0.01. You can then press “N” to open up the additional toolbar in Blender and change your far clipping plane to something like 50m. If you have a model created already, select the armature and press “S”, then type in “100”. Doing this will rescale the model to match the unit scale. Make sure you select your armature and press “Ctrl + A” and apply the scale and rotation to the armature. Also, do this for the mesh itself.

The only export option that I changed in Blender is an option under “Armatures” called “Armature FBXNode Type.” I changed this value from “Null” to “Root”.

I now have a floppy pile of polygons whose physics asset I can modify to my heart’s content.

1 Like