Feature/groom export - #328
Conversation
Adds a groom_io package (mirroring dna_io) that reads grooms exported from Unreal and builds them as native Blender hair Curves attached to the head: - io.py: flat .cdgr binary codec (numpy) - discovery.py: read groom_manifest.json, pick highest-detail strands - curves_builder.py: arrays -> Curves, Unreal->Blender transform, bulk build, surface attach, radius/surface_uv/group_id/curve_type attributes - importer.py: GroomImporter.run() -> (valid, title, message, fix) Wires in the ImportGroom operator, a Groom Import sub-panel under Output, and groom_folder_path/groom_attach_to_surface settings on CharacterOutputProperties.
Headless UE5 commandlet that reads UGroomAsset strand geometry via FHairDescriptionGroups and writes the add-on's .cdgr + groom_manifest.json (plus optional hair-cards FBX). Mirrors the AlembicHairTranslator in reverse. Includes the .uplugin, module/Build.cs, and a README with project setup and the headless run command. Verified against NewMetaHumanCharacter (6 grooms).
test_groom_importer.py mirrors test_head_exporter: .cdgr round-trip, coordinate transform (parametrized), highest-detail discovery, curves build, and the GroomImporter + import_groom operator end-to-end. Commits a tiny deterministic eyelash fixture (Eyelashes_S_Sparse.cdgr + manifest) with its generator.
Adds docs/user-interface/groom-import.md (with a result screenshot) to the mkdocs nav and a release-notes bullet.
|
@TaggartMaher thanks for getting this conversation started. We are planning on releasing a free Unreal plugin on Fab that creates the APIs needed on the Unreal side. Also another free Blender addon to handle streamlining ingesting and exporting all the other non-DNA assets like grooms, clothes, etc. in a Unreal compatible way. Any learnings found here we can fold into that implementation. It will probably be another month before the repo is made public and we have the Fab plugin pushed. But any suggestions until then are welcome! |
|
Oh thats great to know. It sounds like a better approach would be for me to keep this implementation as a fork, I'll keep building this as I need it for myself in the meantime. Is there a better way I can communicate anything I've learned to your team, or is this draft PR acceptable? |
|
Yea for now I would keep using what is working for you (or if other would like to try as well). We will just keep this here as a point of reference. We will follow up with a comment here when we get closer to what I mentioned above. Thanks! |
Working on a groom importer.
I realized that unreal uses curves just like blender for the hair, but it has a weighed "comb" setup which defines hair direction.
By porting that to blender, using a commandlet we can get that data from unreal assets to be readable.
Then we just convert to blender hair and boom it works.
Important notes
Things I want to do before leaving draft state:
What I need help with
Results
This is a quick cycles render of the colorless hair that this current version was able to produce as a prototype. Pretty sick!
Update: Working on attaching hair properly and hair shaders
renders0001-0144.mp4