Unreal skeletal mesh export/import/export

   8821   10   3
User Avatar
Member
14 posts
Joined: 4月 2012
Offline
Hey folks -

I'm trying to export a skeletal mesh from Unreal, bring it into Houdini, modify the mesh, export an FBX, and read it back into Unreal.

Not having much luck. Even importing a skeletal mesh and immediately exporting it again doesn't work. Why? Because -- among other things -- Houdini effectively changes the skeleton structure and pathnames.

Seems like a real basic functional test should be confirming an unmodified round-trip between platforms. No such luck.

Is there an established workflow for this? I've seen some videos, but they're not using real rigs -- just the UE mannequin.

Alternatively, is there a way to control FBX pathname generation? It includes the entire Houdini object hierarchy. So, if I have a skeleton called, "Foo", I get "Foo/root/..." That's incorrect -- the Foo shouldn't be on there. The root of the path should be original root bone name you imported. I understand where it's coming from in Houdini; but it's not workable. I'd need an object with no name for this to work.

Anyone done this successfully?

Thanks!
-anna
User Avatar
Member
3 posts
Joined: 11月 2018
Offline
Would love to get some eyes on this, as I'm in the same situation, just with Unity instead of Unreal
User Avatar
Member
2 posts
Joined: 1月 2019
Offline
This is the exact problem I am facing right now, hopefully somebody can find a solution
User Avatar
Member
134 posts
Joined: 12月 2006
Offline
its very simple, you export the animation from unreal including the preview mesh.
then you import the character in houdini using fbx character import.
then use rop fbx character output to export it back to unreal.


this should also work for unity
Edited by willh - 2022年11月7日 16:29:22

Attachments:
skeleton_round_trip.jpg (353.0 KB)

User Avatar
Member
3 posts
Joined: 11月 2018
Offline
Yes, this is how you export and import characters, but that's not the issue.

Not having much luck. Even importing a skeletal mesh and immediately exporting it again doesn't work. Why? Because -- among other things -- Houdini effectively changes the skeleton structure and pathnames.
Edited by gguillermix - 2022年12月15日 07:50:24
User Avatar
Member
69 posts
Joined: 4月 2019
Offline
I'm confused. I'm not seeing the bones getting renamed.

Round trip appears to be working fine when I try it.

Attachments:
Untitled-1.jpg (331.3 KB)

User Avatar
Member
2 posts
Joined: 1月 2021
Offline
Works for me: In houdini
i`ve set Root name: to my hips (in my case it was mixamorig:hips) at FBX Animation import node,
then i exported it with fbx_characteroutput node ,
After importing it unreal engine he gave me a massage FAILED TO MERGE BONES , then pressed YES ALL
UE5 asking to merge all skeletal meshes - press No
User Avatar
Member
4 posts
Joined: 4月 2019
Offline
Had to solve this problem recently, and while this is the first thing that comes up in Google I thought I would chime in on what got it working for me. Not sure if this is even the same issue everyone else is having but it might help someone.

Basically what I was trying to do was Export skeletal mesh from Unreal -> Import into Houdini to decimate -> Import back to unreal as a LOD for the original skeletal mesh. Except it wouldn't let me import into unreal as a LOD since the skeleton had changed.

What I found is that when using the Character FBX Import and Character FBX Export nodes, Houdini will strip out any and all bones where there are no vertices with a weight for bone. So if I have a root bone that doesn't have verts directly weighted to it, it'll get removed on export despite the fact that it's the parent for a lot of other valid bones lol. You can see what it's removing by looking at the Rig Tree inspector after importing your result back into Houdini.

Anyways... the hacky solution I found was just add a dummy weight to random vertices for every bone I know was going to be stripped out. Basically right before exporting the skeletal mesh from Houdini throw it through this network:
- Capture Attribute Unpack node on your mesh so you can edit the boneCapture attributes in vex
- Attribute Wrangle vex code where I look at the imported skeleton and find bones that have no weights in the mesh. Add a dummy weight for that bone to any random vertex with a weight of 0.0 so it doesn't actually influence it.
- Capture Attribute Pack the boneCapture stuff back into the right format

Then, when you export it through the FBX Character Output node it will hopefully maintain the skeleton. Another gotcha I found was that Houdini adds an extra root node in your animated pose which messes up the import back into Unreal because the root nodes won't match (and prevents you from importing it as a LOD). I wasn't dealing with animation so I just omitted the animation pose from my export but I think you might also have to manually fix all those paths right before exporting.

This was all in Houdini 18.5 not sure if any of this behavior has changed, at the very least I would like an option to not strip out "unused" bones in the FBX Character Output node lol.
User Avatar
Member
53 posts
Joined: 7月 2013
Offline
omg, trying to train unreal engine skeleton mesh with muscle and tissue sims made in houdini and the round trip FBX Unreal > FBX houdini > FBX Unreal - I get 2 extra vertices (points) added in unreal engine (5.4)
Whilst everything imports OK the ML deformer training data needs the vertices count to match up between the FBX and the ground truth alembic geoemtry cache of the muscle sim...

this is an impossible situation. changing some of the FBX import settings in unreal I get varying amounts of vertices each time (generate normals, compute normals, preserve smoothing groups etc), the only way it seems to work is re-export the FBX from unreal - use this for the pose deformed muscle sim, and DO NOT REIMPORT to use as training data otherwise I get 2 extra verts added. OUCH!
https://tekano.artstation.com/ [tekano.artstation.com]
User Avatar
Member
7871 posts
Joined: 7月 2005
Online
Log a bug with your hip and fbx files ... both Houdini and UE are moving targets.
User Avatar
Member
53 posts
Joined: 7月 2013
Offline
After much further digging its the UV's causing the problem, deleting all UV attributes then problem goes away. so definately its an issue with Unreal engine 5.4 inmport end of the equation. Its a funny old game to get increasing vertices (points) every iteration doing a round trip from houdini > unreal > Houdini > unreal again. different settings with smoothing groups and various import FBX options with creating or not normals and tangents gave varying vertex count results, but this is an Unreal problem. normally(ha get it?) its not an issue for just an exported skeleton mesh to work as is, but in this case I needed the skeleton mesh vertices count to match EXACTLY another exported alembic file from Houdini, to train the ML Deformer correctly

so the training worked in the end ONLY if I made the alembic file from a point deformed version of the skeleton mesh via Houdini > Unreal > Houdini. it doesnt work from the orig Houdini export as the vertices ID number is different also so the deltas were WAY out of whack.

Happy days
Edited by Rob Chapman - 2024年5月10日 16:05:07
https://tekano.artstation.com/ [tekano.artstation.com]
  • Quick Links