Skip to content

Instantly share code, notes, and snippets.

@jmpinit
Created March 24, 2024 16:43
Show Gist options
  • Save jmpinit/c42e1d66c76f2e07e446b0b7f19a01f8 to your computer and use it in GitHub Desktop.
Save jmpinit/c42e1d66c76f2e07e446b0b7f19a01f8 to your computer and use it in GitHub Desktop.
How to cleanly convert a URDF for a robot into a rigged FBX file (for visualization) using Blender (tested with version 3.6.5). The model can then be cleanly imported and animated in UE5, Three.js, etc.
  1. Import with the Phobos add-on
  2. Delete everything except the armatures and the visual meshes
  3. Edit the Blender file (upper right - Display Mode -> Blender File) and delete the Phobos bone visuals under Meshes
  4. Clear the parents (keep transformation) for the visual meshes
  5. Clear the armature parents
  6. Rename each bone to match the name of the parent armature so you can tell which is which after the next step
  7. Join all of the armatures
  8. In edit mode, reparent the bones in the correct hierarchy (keep offset)
  9. In object mode, parent the meshes to their corresponding bones. NOTE: Use “bone” parent not “bone relative”. If it causes an offset in the mesh then undo and repeat it again. This is probably a bug in Blender? But it works.
  10. In pose mode, move bones and confirm that the meshes move as expected.
  11. Export an FBX with the following settings
    1. Armature and mesh selected for object types
    2. Apply Unit checked
    3. Use Space Transform checked
    4. Apply Transform checked
    5. Add Leaf Bones unchecked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment