Adding uv data to alembic on export

Hi,

I’ve been asked to build a script that replicates the behavior of this maya script:

The goal is to add the root_uv data as a custom property to an alembic file so that it can be read by the UE Groom plugin.

The maya script actually does a bunch of extra work that is probably unnecessary in Blender. The Maya script manually looks up the UV value based on the curve position and a nearby mesh. In blender, I’ve noticed, the strands already have a root_uv property that’s used by eevee, cycles and (apparently) AMD Prorender to texture hair. I’m hoping it will be reasonably easy to iterate through the strands and copy the root_uv.

Here’s the weird bit:
The Maya script seems to be using a property type of ‘vectorArray’ (ie: [(x,y),…] ). But according to blender’s docs, all nested array structures need to be flattened. The UE docs on groom specify that the datatype for the root uv are to be “float32/64[2]” which looks like shorthand for a len(2) array per value.

Does anyone here know of a way to create these sorts of data types in blender and serializing them into alembic files on export?

Thanks!

2 Likes

Hi,

Just an FYI. I did a bunch more research and also corresponded with Sybren, who is the I/O Pipeline lead at Blender Studio.

TL/DR:

  1. You can not currently create these types in blender and export them using the existing Alembic Exporter
  2. Custom Attributes in Alembic export is part of a broad series of goals that are being worked on by Kevin Dietrich. This also includes work on USD.

A great place to keep tabs on this stuff is the Alembic-tagged task list on developer.blender.org

https://developer.blender.org/tag/alembic/

My own development project is stalled until Blender’s Alembic system becomes more feature complete. Since there is a lot more interest in USD for interoperability at the moment, the timeline for getting features like this done is uncertain.

1 Like

Don’t know if this helps… but after watching a 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, who is amazing at hair) said that recently, an addon to blender was created to export root uvs and groups in gumroad.
Hope this helps, cause if you do manage to find this add-on, please link it!! I cannot find it anywhere :frowning:

I think this is the addon what you are looking for.

2 Likes

dude… I cannot tell you how much you just save my butt!!!
have not tried it, but I’m reserving the whole day today to learn how this works and MAKING IT WORK!
thnk u so much!!! :slight_smile:

2 Likes

Yeah… no idea how to export maps with this. It doesn’t do the same as what Maya/Xgen do.
Really don’t want to have to buy Maya just for this.
If anyone ever finds a solution, pls link! :slight_smile:

Just wanted to mention that using the Groom Exporter Blender add-on (Version 0.1.3) made by turbocheke successfully exports alembic files that contain root_uv data readable by UE5.1.

1 Like

Yeah, but is missing another good soul to show how to create the set up to make it export the UV map/or textures. Come on guys, please record a video showing this steps!

So how do we install the library? Just pointing to the folder and pressing “install dependencies” it doesnt seem to find anything and return with this message:

No support for Blender Particle Hair System