Import mesh with empty transforms?

I’m using Blender to import static meshes into UE4. What I would like to be able to do is to ‘annotate’ my model with various locations - like here is where a character can sit, here is a button to press - that kind of thing. I can parent an ‘empty’ to my main mesh in Blender (which is just a transform without mesh data) but that doesn’t come through the FBX import. What I want to know is how other people solve this kind of issue? Is there a file format that will import this kind of data?

Thanks!

You can modify the export script so that empties are interpreted.
usually they are used to contain and start LODs

You could change it to also include sockets.

However, what you are trying to do is handled in game by various IK systems, and only skeletal meshes support sockets.

So if you are exporting static meshes. no, there is no way to “annotate” things like that.
In fact, for buttons you should probably exclude the actual button and use a standard button BP which you custom place on top of the static object to provide the point-in-space parameters for the IK to adjust/interact.

Chairs are a whole different matter. Ik use adjusts the pelvis to the seating point. Which can vary in height across all chairs.
this means the legs need to go up, since moving pelvis shifts everything.
again, if you made your own IK system and understand how it works this stuff becomes trivial.

So, take that case of the seating point on a chair. Is there any way I could indicate where that is by placing an empty in Blender, or does that kind of thing have to happen in UE4?

Needs to happen in unreal.
Add a socket to your pelvis bone. Run a line trace starting from the socket location to -1000 z (one meter)
the hit result will give you the exact distance to the chair.

Push the value to the animBP and use it in a transform modify bone for Pelvis as is.

Invert the value (-) and apply with transform modify bone to foot_l / foot_r

Not sure if the rest of the bonechain (shin and thigh) will shift up by itself without a legIK node in there. Give that a try first. If it does not:

Change foot_r and foot_l to ik_foot_l and ik_foot_r and setup a leg ik node as the last before final pose in ABP.

As a result, any time you sit your character will automatically land perfectly on the surface.

This doesn’t deal with aligning.

To align you need to either set up the chair as a skeletal mesh, and give it a root that is where the character root has to be for sitting to happen.
OR
you need to export the static mesh with an offset pivot point so you can align to the pivot the same way.

Or, you just set a set of parameters on the chair that tell the character where he has to be before interacting.
Usually you use this last one. Within chair BP you add an arrow, and use the arrow to place the root of the character / move the arrow to taste.