Hello
This may not be the story to discuss here,
but is there a way to use blender to set root uvs in the groom?
Or is there such a function in UE4 alone?
I spent all day doing this, but nothing progressed.
I found a tutorial like this,
Iâm trying to find the same. The Maya script is assigning UV data to each strand based on a given geometry (calculated by proximity) and then including that data as a custom attribute named groom_root_uv in the Alembic file. This attribute then can be retrieved in the material in UE. Probably a script needs to be made in Blender to achieve the same.
Iâve been trying to find something similar, but no luck. Commenting to bump the thread, and admiting that I donât know enough to script it myself. I founded this thread https://developer.blender.org/T83838
The issue is quite complex, and ultimately boils down to the blender alembic exporter needing to be more configurable to play nicely with other tools (see links above). This is because different tools use different custom geometry parameter names and formats.
Interestingly it looks like Alembic OCurves has native support for UV data - Blender does actually export this. Consequently it might be possible to uplift the UE5 groom importer with out-of-the-box root uv support from blender. Iâll have a look at this some time this week. See: alembic/OCurves.h at master ¡ alembic/alembic ¡ GitHub
Donât know if this helps⌠but after watching the tutorial on youtube about this (UE4 - Hair Color with Blender - Unreal Engine Groom Color 4.26 - YouTube), I asked this exact thing and the creator (Marvel Master, amazing ue5 tuts btw) said that recently, an addon to blender was created to export root uvs and groups in gumroad.
Hope this helps, cause if anyone manages to find this add-on, please link it!! I cannot find it anywhere
I made the blender addon; I expect itâs useful for you, I will maintain the addon until Blender has native alembic attribute export. Some patches are on revision.
I was having a play with your plugin yesterday - really appreciate the effort youâve put into it (and it has prompted me to properly learn blenderâs new curve entity / geometry node system - something I have been putting off ). It makes exporting the hair attribute data to UE5 extremely easy.
However I was running into an issue where the groom origin was incorrect once exported to UE5, and hence would fail to bind to the skeletal mesh asset. Looks like the blender surface meshâs origin is not being taken into account by the plugin?
The state of interoperability between blenderâs existing alembic exporter and unreal is not great: Iâm not hopeful of seeing meaningful progress anytime soon given the amount of work that is needed to rewrite pretty much all of the C++ custom attribute logic, and add new UI features.
I got it! Rly helpful. Thnk u very much!
Is there anyway to export color maps with the add-on as well? Iâm having a bit of trouble getting my Substance maps to match inside UE5, since I painted fur rather than hair, and the color need to match the UV coordinates. Is there a way the add-on can help with that?
A little ashamed to admit I have no idea how to work the fork blender file you posted. Guess Iâm just too n00b still for it.
Did you ever found a solution for the alembic root problem?
Sorry to hear you have an issue.
I want more information about the issue, to replicate on my side if possible and correct.
The curve has an origin but I take the origin of the surface and apply a difference to the locations.
The addon only exports geometry and attributes assigned to the data, you can have a color per vertex on the hair, and unreal can use it.
(On geometry nodes you can apply data from a texture on the geometry.)
Maybe I am confused but I understand you want to use a texture color on the length of the hair.
(This case is completely unique to the artist, doable but you need to understand the hair Material Attributes.)
If itâs a color from the UV, the addon doesnât have any problem if the hair has been assigned to that specific surface UV.
Having the same problem while trying to use the âRoot UVâ input on a hair attributes node on the hair material in unreal. Iâm honestly not sure if this is the correct setup, but I imagine it is. The idea is to drive the hair color from sampling the texture at the hair Root UV location.
When I import the alembic file into unreal it does say that the file âHas Root UVâ
But with the material setup from the first image, the hair color does not render as expected.
Itâs a result of a difference between origins in the FBX exporter, and your groom exporter. The FBX exporter uses the world co-ordinates, but the groom-exporter uses co-ordinates relative to the origin of your armature (i.e. your root bone).
If you setup your root bone correctly (i.e. starting on the world origin), this shouldnât be an issue.
@CoolSmek I also managed to reproduce this issue with the groom_root_uvs. The surface_coordinate_data looked fine in blender, and UE5 seemed to find them on import. But the UV data itself is either corrupted or zeroed within UE5.
The color attribute seems to come through fine though.
e.g.
This is where I baked the color attribute in blender (via geometry nodes) to achieve the same effect.
I found and fixed the issue, ironically my version of unreal 5.1 was refusing to render all the groom assets.
Was the name of a single variable, itâs solved now.
Probably was made on the last minor version, because was working before that.
Later I see a problem I donât remember exactly but Unreal and Blender have different UVs coordinates and made a custom parameter to activate an auto-correction on the coordinates on the export.
The fix will be on Gumroad today.
Pd: Thank you for the clear data captures, made my work easier.
The imported Groom Asset on Unreal has the same UV direction.
[My initial assumption was to solve the rotation, but the groom asset needs to have the exact UV of the mesh to apply a correct bind, for that doesnât need a âcorrectionâ]
Thank you for the update! That has solved the root uv issue, I can now swap base color textures on instanced materials to get different hair color patterns! Very awesome!!