Exporting Character Rig To Unreal 4.8 as FBX

   8311   16   5
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
Hello,

I am attempting to export my character as an fbx to be used in UE4. My character has a rig with Kinematics and controllers on him. When I export it makes all of my controls into joints/bones in UE4 and similarly when I import it into Houdini. Is it only possible to export animations on bones only and not be able to use controls to animate?

Attachments:
characterTest_rigged.hip (1.4 MB)

User Avatar
Member
2528 posts
Joined: June 2008
Offline
I think that is the nature of the FBX file format. No FK is allowed. I think the original goal was to simply provide a transport for baked rig animation. Preserving the RIG setup is not what FBX does.
Edited by - Oct. 26, 2015 21:58:54
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
Okay, then is there some where that shows how to bake the animation of a character in Houdini. Cause that is the end goal, I want to import the mesh and have animations applied to it in UE4. The problem is that it only captures the controls animation and not its influence on the bound skin.
User Avatar
Member
2528 posts
Joined: June 2008
Offline
There is some information here on baking the animation.
http://forums.odforce.net/topic/20483-baking-expressions-to-keys-for-export/?hl=%2Bbake+%2Banimation [forums.odforce.net]
Using Houdini Indie 20.0
Ubuntu 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
1192 posts
Joined: July 2005
Offline
Justin Bloomer
Okay, then is there some where that shows how to bake the animation of a character in Houdini. Cause that is the end goal, I want to import the mesh and have animations applied to it in UE4. The problem is that it only captures the controls animation and not its influence on the bound skin.
It does export bound skin, but you do need to bake the rotation into individual bones to have the animation as well.

You can do that by setting the export flag on the InverseKin CHOP, then using the new bake channels/CHOPs functionality in the H15 Animation Editor.

There is a RFE (ID=70986) for the FBX exporter to do this automatically.

The major showstopper for the Houdini->UE4 via FBX pipeline is the fact that Houdini doesn't support at all the export of blendshapes in the FBX, so if you have anything using that (facial animation for example), there is no way to bring it into UE4 from Houdini.
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
Hello digitallysane,

Would I have to bake all the channels for each InverseKin? Or do you have a little tutorial on how to do this?
Edited by - Nov. 2, 2015 17:28:10
User Avatar
Member
1192 posts
Joined: July 2005
Offline
Justin Bloomer
Hello digitallysane,

Would I have to bake all the channels for each InverseKin?
Each bone should have the rotations baked.

But normally the bones themselves read their rotations from the InverseKin (see the Kinematic Solver parameter on each bone) on each frame.

So on the InverseKin CHOP, un-check “Single Frame” on Channel tab and then set the Export flag on the node (all this makes sense if your kinematic chain is animated).

Back to your bones, you'll see that they now have Rotations exported from CHOPs.

In the Animation Editor, make sure that View>Draw CHOP Exports is checked.
Select all segments in the Channel Editor then Edit>Bake Keyframes…
Check everything and at the bottom choose Bake, Disable… or whatever is useful for you.
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
Okay so I have been testing just exporting a bone rig with animations on the bones. The fbx works when I test in Maya, it shows the bones animating and the mesh deforms correctly, but when I bring it into UE4 only the joints are animating and the mesh is not deforming. Any ideas as to why this would happen?
User Avatar
Staff
2491 posts
Joined: Sept. 2007
Offline
Just a quick FYI - there's a UE4 forum here too.
Chris McSpurren
Senior Quality Assurance Specialist
SideFX
User Avatar
Member
614 posts
Joined: Aug. 2008
Offline
but for Houdini engine, I think the FBX export is a more general issue, than just for unreal, since its for exporting to any other 3d program.
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
That is the main reason why I started the thread here, since the workflow from Houdini to UE4 is not defined when it comes to making a character for a game engine. But i have also started a thread in the UE4 threads but not much help there.
User Avatar
Member
13 posts
Joined: Nov. 2014
Offline
digitallysane
Justin Bloomer
So on the InverseKin CHOP, un-check “Single Frame” on Channel tab and then set the Export flag on the node (all this makes sense if your kinematic chain is animated).

Back to your bones, you'll see that they now have Rotations exported from CHOPs.

In the Animation Editor, make sure that View>Draw CHOP Exports is checked.
Select all segments in the Channel Editor then Edit>Bake Keyframes…
Check everything and at the bottom choose Bake, Disable… or whatever is useful for you.

Alright so I did this, but on my bones they do not show the rotations exported from the CHOP network. Do I need to assign it to the bone's rotation somehow?
User Avatar
Member
1192 posts
Joined: July 2005
Offline
What you need to do is read some docs regarding CHOPs, exporting, channel naming etc.

With a default chain (Bones tool set to InverseKin), what I described works out of the box. It's hard to guess what's happening on your side.

Attachments:
Clipboard Image.jpg (179.9 KB)

Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
460 posts
Joined: July 2005
Offline
digitallysane
Justin Bloomer
Hello digitallysane,

Would I have to bake all the channels for each InverseKin?
Each bone should have the rotations baked.

But normally the bones themselves read their rotations from the InverseKin (see the Kinematic Solver parameter on each bone) on each frame.

So on the InverseKin CHOP, un-check “Single Frame” on Channel tab and then set the Export flag on the node (all this makes sense if your kinematic chain is animated).

Back to your bones, you'll see that they now have Rotations exported from CHOPs.

In the Animation Editor, make sure that View>Draw CHOP Exports is checked.
Select all segments in the Channel Editor then Edit>Bake Keyframes…
Check everything and at the bottom choose Bake, Disable… or whatever is useful for you.

Thanks Dragos
I was just doing this and that helped
now I need to automate this maybe write a script to do it

Have you done anything like that ?


thanks again
varomix - Founder | Educator @ Mix Training
Technical Artist @ Meta Reality Labs
User Avatar
Member
1192 posts
Joined: July 2005
Offline
I do have a WIP script, which can be improved upon. I'm not a Python guy by any means.

This should go in the script tab of a new shelf tool.

def dsgBakeBones():
geometry = dsgRootUserInput()
range = hou.playbar.playbackRange()
rangeStart = range
rangeEnd = range
if geometry == (None):
return
dsgBakeRoot(geometry,rangeStart,rangeEnd)
dsgBakeBoneRot(geometry,rangeStart,rangeEnd)

def dsgRootUserInput():
import toolutils

# Get the active sceneViewer
sViewer = toolutils.sceneViewer()

# Ask user to select geometry
geometry = sViewer.selectObjects('Select root null. press enter to confirm', allow_multisel=False, allowed_types'null',), allow_drag=False)

# Check that the selection wasn't empty

return geometry

def dsgBakeBoneRot(geometry,rangeStart,rangeEnd):
for child in geometry.outputs():
for rot in child.parmTuple('r'):
rot.keyframesRefit(1,0.1,1,1,1,1,0.1,1,rangeStart,rangeEnd,hou.parmBakeChop.KeepExportFlag)
child.parm('length').keyframesRefit(1,0.1,1,1,1,1,0.1,1,rangeStart,rangeEnd,hou.parmBakeChop.KeepExportFlag)
dsgBakeBoneRot(child,rangeStart,rangeEnd)

def dsgBakeRoot(geometry,rangeStart,rangeEnd):
for trans in geometry.parmTuple('t'):
trans.keyframesRefit(1,0.1,1,1,1,1,0.1,1,rangeStart,rangeEnd,hou.parmBakeChop.KeepExportFlag)
for rt in geometry.parmTuple('r'):
rt.keyframesRefit(1,0.1,1,1,1,1,0.1,1,rangeStart,rangeEnd,hou.parmBakeChop.KeepExportFlag)
for sc in geometry.parmTuple('s'):
sc.keyframesRefit(1,0.1,1,1,1,1,0.1,1,rangeStart,rangeEnd,hou.parmBakeChop.KeepExportFlag)

dsgBakeBones()
Dragos Stefan
producer + director @ www.dsg.ro
www.dragosstefan.ro
User Avatar
Member
464 posts
Joined: Aug. 2014
Offline
Hey guys.
I know this is an old thread, but I've done some experiments that involved exporting FBX files without and with baked keys from InverseKIN CHOP. The file size remains the same and I haven't noticed any differences after importing both FBX files into Unity.
Does Houdini bake exported CHOPs data into keyframes now, when it exports the scene into a Filmbox file (15.5)?

I had animation problems when I referenced the channels with “chop” expression. But with exported data it seems to be fine.
Edited by ajz3d - Oct. 22, 2016 20:09:22
  • Quick Links