Skip to content

Add Unreal groom and material handoff adapters#195

Draft
nsdoanfosan wants to merge 23 commits into
poly-hammer:mainfrom
nsdoanfosan:agent/update-send2ue-handoff-20260713
Draft

Add Unreal groom and material handoff adapters#195
nsdoanfosan wants to merge 23 commits into
poly-hammer:mainfrom
nsdoanfosan:agent/update-send2ue-handoff-20260713

Conversation

@nsdoanfosan

Copy link
Copy Markdown

What changed

  • Added shared Unreal groom adapter support across Send to Unreal export and ingest paths.
  • Expanded Unreal material setup and post-import material pipeline handling.
  • Added focused regression tests for the material setup and extension integration.

Why

The Send to Unreal handoff needed a consistent adapter layer for groom assets and safer material setup behavior across export and post-import stages.

Impact

Blender-to-Unreal groom and material transfers now use the same handoff logic, with targeted automated coverage for the updated pipeline.

Validation

  • python -m pytest -q tests/test_ue_material_setup.py tests/test_send2ue_material_pipeline_extension.py
  • 37 tests and 11 subtests passed.

424 and others added 23 commits May 27, 2026 20:59
- send2ue_material_pipeline.py: post_import hook that triggers the Unreal-side
  material setup (ue_material_setup.process_mesh) over RPC. Pipeline dir resolves
  from UE_BLENDER_PIPELINE_DIR env var, defaulting to ~/Documents/UE_Blender_Pipeline.
- select_all_children: only select children present in the active view layer.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
On file load, setup_project sets scene.send2ue.unreal_mesh_folder_path from the
.blend file path so it mirrors the on-disk folder structure: the Forestportfolio
anchor maps to /Game/Meshes (e.g. ...\Forestportfolio\00_common\prop -> /Game/Meshes/00_common/prop/).
Files outside the anchor are left untouched.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Extract path derivation into sync_unreal_mesh_folder_path() and also register it on
  save_post, so a Save-As into a new folder updates the path (load_post alone missed saves).
- Case-insensitive anchor match with a path-boundary check (avoids false matches).
- Guard files sitting directly in the anchor folder (no subfolder) so the file name is
  not turned into a folder.
- Wrap the assignment in try/except so a failure never breaks send2ue project setup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Setting unreal_mesh_folder_path runs send2ue's update callback, which calls
is_connected() and UnrealRemoteCalls.directory_exists() over RPC - adding a
per-save delay. Now the sync only assigns when the value actually changes and
disables window_manager.send2ue.path_validation during the assignment (the same
approach set_active_template uses), so saves no longer trigger an Unreal round-trip.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…toggle

- armature_modifier_fix: meshes parented to an exported armature but missing an
  armature modifier now get a temporary single-bone binding during export, so the
  fbx carries valid skin weights instead of crashing Unreal's importer. Undone in
  post_operation, so the user's scene is left untouched. Only acts when a modifier
  is actually missing (unlike the always-on Hair Tool conversion).
- hair_tool_export: convert live Hair Tool curve systems to temporary export-only
  meshes with head-bone skinning and FACE smoothing; filter prepared sources out
  of groom export.
- skip_animation_export: one toggle to skip all animation export and stop the
  skeletal-mesh fbx from baking the rig's NLA strips.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The PARK send2ue customizations participate in the Blender -> Painter -> Unreal
pipeline; point to substance-tools/docs/pipeline_contract.md (and
pipeline_contract.json) as the source of truth for the Export collection,
naming, and Unreal path conventions.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add payload UV helpers so the RFAOS hair attributes ride dedicated UV
maps for Nanite meshes, simplify the Hair Tool color bake fallbacks in
the groom adapter, and ensure hair master material instances keep
skeletal mesh usage in the Unreal material setup.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@JoshQuake

Copy link
Copy Markdown
Collaborator

Thank you so much for this huge contribution! When you are ready, please update PR to go poly-hammer:send2ue-groom-and-material so that test can be ran.

If you are interested, I'm also looking for more maintainers that can help me out as I just cant find the time to update for blender 5+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants