Export to Alembic with 'selection sets' / material groups

   12432   7   0
User Avatar
Member
9 posts
Joined: Feb. 2016
Offline
I might have answered this question if I knew the terminology. But I'm a month into learning, so I'm not sure of the language. What I'm asking breaks down in to three questions:

1) What does Houdini call polygon groups used for texturing, which in Cinema 4D we call ‘polygon selection sets’? Yes, I've actually looked around for this.

2) The intent of this, in my case, is to export a model from Houdini to render in Cinema 4D, with parts of the model able to be textured differently. I've searched, maybe not well enough. Can I preserve groups using any export methods (obj / fbx / alembic)?

3) Now here's the toughie. In the attached file I've copied some boxes onto a sphere, and then I've meshed it with VDBs. Is it possible to determine which areas the cubes are influencing, so that I can apply different materials to those places? And then export those?

I'm trying for a 3-fer on my very first question post, haha! Thanks in advance.

Attachments:
VDB_Group_Question.hiplc.zip (9.2 KB)

User Avatar
Member
8555 posts
Joined: July 2007
Offline
1), 2) just create primitive groups in houdini, they will be exported as Face Sets into alembic, which C4D will read as Polygon Selection Tags

3) polygonal selection of “cube” regions on VDB converted to polygons may look very ugly since there is no clear distinction between sphere and cubes. But if you want that you can for example Group Transfer polygonal group from sphere object and tweak the distance to get the desired region.
However you may rather want to create smooth mask for those regions and use that to blend materials together. You can use Attribute Transfer or Ray SOP + Smooth SOP for that, or Wrangle

here is an example with both, hard group and soft mask method using Wrangles

(you can as well color your sphere and boxes, prior to converting to VDB, then convert Cd as well and use Attribute From Volume to transfer it back to meshed VDB, but you will not have much control over the result)

Attachments:
VDB_Group_Question_fix.hiplc (88.8 KB)

Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Thanks Tomas.
Is there any specific reason why you pass in both “prim” and “uv” even though they are set to zero?

float dist = xyzdist( 1, @P, pid, puv );

Cheers
Bonsak
http://www.racecar.no [www.racecar.no]
User Avatar
Member
9 posts
Joined: Feb. 2016
Offline
Thanks Tomas, you sent me down the right path. I used attribute transfer.

Ugly is okay! I've tested the Alembic output, and in Cinema 4D I can convert the face sets into vertex maps and smooth them there.
User Avatar
Member
8555 posts
Joined: July 2007
Offline
bonsak
Thanks Tomas.
Is there any specific reason why you pass in both “prim” and “uv” even though they are set to zero?
yes, xyzdist() fills them with primitive id an uv values which can be used later to sample geometry at that location, but in this case only dist was required so they are not used later. In other words they are return variables, so their value before xyzdist() is not important
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Ok! That's good to know. Thanks.

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
342 posts
Joined: Feb. 2017
Offline
I'm running into an issue where (seemingly randomly) my prim groups that i am bringing from c4d as selection sets are not exporting when I export to alembic. actually, one of them will export but the rest just disappear at that point. I've tried opening them in houdini as well as in cinema but they dont show up in either package.

this does work for me sometimes though. and its seemingly random. seems like a bug to me, i have no idea how to guarantee they will export and its driving me insane.
http://www.christophers.website
User Avatar
Member
5 posts
Joined: March 2022
Offline
ChristopherRutledge
I'm running into an issue where (seemingly randomly) my prim groups that i am bringing from c4d as selection sets are not exporting when I export to alembic. actually, one of them will export but the rest just disappear at that point. I've tried opening them in houdini as well as in cinema but they dont show up in either package.

this does work for me sometimes though. and its seemingly random. seems like a bug to me, i have no idea how to guarantee they will export and it's driving me insane.

I am having the same issue, did you find a workaround?
  • Quick Links