assigning materials to abc primitives

   13444   6   2
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
Hello Sidefx,

I have an asset that works well as a geo object in houdini, with several material assignments based on groups. I also have a name attribute.

What is the best way to transfer this to a setup using alembic primitives? What is the preferred way to assign materials?

I exported to an abc including all the attributes and groups. However if I load the geometry as alembic delayed load primitives, it does not seem to respect the material assignments per group. I also tried @name=“*blah*” with no success.

Any help would be appreciated.

Cheers,
Koen
User Avatar
スタッフ
2593 posts
Joined: 7月 2005
Offline
koen
Hello Sidefx,

I have an asset that works well as a geo object in houdini, with several material assignments based on groups. I also have a name attribute.

What is the best way to transfer this to a setup using alembic primitives? What is the preferred way to assign materials?

I exported to an abc including all the attributes and groups. However if I load the geometry as alembic delayed load primitives, it does not seem to respect the material assignments per group. I also tried @name=“*blah*” with no success.

Any help would be appreciated.

Cheers,
Koen

Mantra/SOHO know how to bind materials to Houdini primitives. So, the easiest work-flow would be to use Alembic delayed load primitives and assign the materials to them as Houdini attributes.

If the shader strings are embedded in the Alembic file as user data, you could use the parameter on the procedural to bind the Alembic data to a mantra properly – but then, you have to have manage the shader definition & strings yourself.

The source for the Alembic procedural is shipped in $HH/public/Alembic. In theory, you could probably make some modifications there, but then you'd have to merge changes…
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
Hello Mark,

thanks for the reply.

Mantra/SOHO know how to bind materials to Houdini primitives. So, the easiest work-flow would be to use Alembic delayed load primitives and assign the materials to them as Houdini attributes.

I guess my question is, if I store the full asset in one alembic file, and I have groups and a name attribute, how would this work? I tried a material node on the abc primitive, but since there is only 1 primitive, I cant easily assign different materials. If I switch to loading the abc as houdini geo it all works fine.

I have attached a file that illustrates this. If you switch abc/load to “use houdini geometry” it renders the way I want, but with “Alembic Delayed Load Primitives” the material assignments fail.

Thanks,
Koen

Attachments:
abc.zip (73.1 KB)

User Avatar
スタッフ
2593 posts
Joined: 7月 2005
Offline
koen
Hello Mark,

thanks for the reply.

Mantra/SOHO know how to bind materials to Houdini primitives. So, the easiest work-flow would be to use Alembic delayed load primitives and assign the materials to them as Houdini attributes.

I guess my question is, if I store the full asset in one alembic file, and I have groups and a name attribute, how would this work? I tried a material node on the abc primitive, but since there is only 1 primitive, I cant easily assign different materials. If I switch to loading the abc as houdini geo it all works fine.

I have attached a file that illustrates this. If you switch abc/load to “use houdini geometry” it renders the way I want, but with “Alembic Delayed Load Primitives” the material assignments fail.

Thanks,
Koen

Currently, there's no support to assign materials to Alembic face sets (the rough equivalent of houdini groups). The only way to do this would be to break the single Alembic priimitive into separate Alembic primitives. You can probably do this using the “name” attribute (there's an option on the output driver).

You can then use the Alembic Group SOP to put Alembic primitives into their groups for assignment – or use groups created in the Alembic SOP.
User Avatar
Member
789 posts
Joined: 4月 2020
Offline
Thanks for the explanation Mark.

I am really loving the alembic primitives, and I think it will fit great into many pipelines. It is a much easier and more logical workflow then the bgeo delayed load.

However, being able to assign and manipulate materials based on an attribute would really help. Could I file an RFE for this?

Cheers,
Koen
User Avatar
Member
178 posts
Joined: 1月 2013
Offline
Hi Koen,
I haven't had time to test yet but Mark pointed me to the _alembic_hom_extensions Python module, which if I understood correctly should let you access primitive attributes in an Alembic file. You could use some expressions on an attribcreate SOP to set the values you want this way, for the time being.

Cheers,
Jon
User Avatar
Member
106 posts
Joined: 6月 2011
Offline
Hey guys

I have been doing some testing with alembic primitives. I exported a sphere which has some groups with different material assignments for each group using the ROP Alembic output and reimported them into Houdini. SOHO binds the materials perfectly. But when I manually open the alembic file using pyAlembic and add the attribute, SOHO doesn't binds the materials to alembic primitives if it contains groups. Checked both abc's but couldn't find anything different. How exactly SOHO binds the materials for Groups ? Any help much appreciated.

Thanks
-J
  • Quick Links