I've got a fracture sim in houdini that's all set up and I'm trying to export it to an Alembic sequence to bring in to Maya.
This all works well except for one thing, the Alembic file, once imported into Maya is one single object.
I tried following the video - https://vimeo.com/92866922 [vimeo.com]
And messed around with the suggestions here - https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&p=175018&sid=f1f97f13881eb72110f08c9ebc4866a8 [sidefx.com]
But nothing seems to work. When I do use the name attribute I do get individual pieces, but they're all empty in Maya.
Any help would be much appreciated.
Houdini Alembic to Maya group - how to keep pieces separate?
12382 12 3- NakedChicken
- Member
- 29 posts
- Joined: 2月 2015
- Offline
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
You should probably post a file…I use this method all the time and it works. One thing that I have noticed is that the nameSop should be the last sop before the Alembic rop and it also needs to be clicked on. Meaning that even though the alembic rop is the last in the chain, the namesop should be next up and clicked blue so that it is active.
Also check your name attribute in the spreadsheet and make sure that it is being propagated.
Also check your name attribute in the spreadsheet and make sure that it is being propagated.
- NakedChicken
- Member
- 29 posts
- Joined: 2月 2015
- Offline
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
You were almost there…I just unpacked and changed the alembic file format to hdf5. I think Maya 2016 supports ogawa now. make sure you have display shapes on in the outliner. I included a Maya file.
As a side note - If you do not have a “piece” attribute but have partitioned groups or really any groupings, i.e- mygroup01, etc - then you can:
1. use nameSop
2. set it to name by group with * being in the group prefix
3. put in one groups name in the group field
4. put the extact same name in the name field
This will map your groups to name attribute that you can export and have in Maya
As a side note - If you do not have a “piece” attribute but have partitioned groups or really any groupings, i.e- mygroup01, etc - then you can:
1. use nameSop
2. set it to name by group with * being in the group prefix
3. put in one groups name in the group field
4. put the extact same name in the name field
This will map your groups to name attribute that you can export and have in Maya
- NakedChicken
- Member
- 29 posts
- Joined: 2月 2015
- Offline
So that actually gave me the same results.
Let me expand on my issue.
I'm able to bring in the alembic with all the shapes like in the example you sent me (unpack not necessary for that). I also wrote a script that extracts the shapes to individual objects in Maya. My problem is that I then need to back that animation down to a keyframe animations. The problem is that the objects brought in by alembic bake down with no motion (because as far as transforms go, there is no motion).
The video I posted above shows the objects coming in as individual objects in Maya with transforms and all. I actually managed to do this the first time I was following along with the video, but I have not been able to replicate it. I'm not sure what magic button I hit the first time (and I followed the video exactly every time), but I can't reproduce those results.
So I guess my real request is a way to get Houdini simulations to a Maya keyframe animation. Is Alembic a viable method for that?
Let me expand on my issue.
I'm able to bring in the alembic with all the shapes like in the example you sent me (unpack not necessary for that). I also wrote a script that extracts the shapes to individual objects in Maya. My problem is that I then need to back that animation down to a keyframe animations. The problem is that the objects brought in by alembic bake down with no motion (because as far as transforms go, there is no motion).
The video I posted above shows the objects coming in as individual objects in Maya with transforms and all. I actually managed to do this the first time I was following along with the video, but I have not been able to replicate it. I'm not sure what magic button I hit the first time (and I followed the video exactly every time), but I can't reproduce those results.
So I guess my real request is a way to get Houdini simulations to a Maya keyframe animation. Is Alembic a viable method for that?
- sl0throp
- Member
- 258 posts
- Joined:
- Offline
Ahhh, I mis-understood , I could not understand why this wasn't working but now do…
I just watched the video and tried to use his script. One thing that I noticed is that he is typing in $F into the file name and that gives you groups, as well. It appears in Maya that his geo is imported just as in yours, under a shape node but when I run the script, it is unsuccessful.
I would also like to get this working so I will spend some time with it….
I just watched the video and tried to use his script. One thing that I noticed is that he is typing in $F into the file name and that gives you groups, as well. It appears in Maya that his geo is imported just as in yours, under a shape node but when I run the script, it is unsuccessful.
I would also like to get this working so I will spend some time with it….
- NakedChicken
- Member
- 29 posts
- Joined: 2月 2015
- Offline
Huzzah, I'm not insane! Well… anyway
It's something to do with my version of Houdini. When I followed the video I was using Houdini 14.0.258. I recently updated to 14.0.361. Just for the heck of it I loaded up my old version and it all works perfectly!
Not sure why that is, but at least I found a solution.
It's something to do with my version of Houdini. When I followed the video I was using Houdini 14.0.258. I recently updated to 14.0.361. Just for the heck of it I loaded up my old version and it all works perfectly!
Not sure why that is, but at least I found a solution.
- Demno
- Member
- 7 posts
- Joined: 2月 2013
- Offline
- Guy Micciche
- Member
- 4 posts
- Joined: 12月 2014
- Offline
For me, I was exporting an OBJ file out of Maya which had materials. I bring it into Houdini and using a File node and it's able to read all my objects. Downstream, I wanted to export to Alembic file so I can import it back into Maya and re-texture/shade it. But it was coming in as 1 object.
What I did that got it working:
Create an Attribute Wrangle and make Run Over "Primitives".
Here is my VEXpression:
Basically, this copies the string from my shop_materialpath attribute and formats it into a "path" attribute. Using this specific format for which is PARENT_GROUP / OBJ_GROUP / OBJ_GROUP might look like "mat/GlassSG/GlassSG" will make sure when you import your Alembic file, it will come in as separate objects.
In your ROP Alembic Output node, enable "Build Hierarchy From Attribute" and for Path Attribute type "path".
Export.
Imported into Maya.
Works.
Another way is creating a Name node, class "Primitive" enable "Name from Group", Group Mask is "*" Group should be any 1 group name, in my case "Body" and for Name, use the same as Group use "Body". This will add a "name" attribute and the value will be the group name, it will rename accordingly for all groups even though you used one name. Then you can use Attribute Wrangle to create a "path" attribute, or use "name" attribute in the ROP Alembic Output node.
What I did that got it working:
Create an Attribute Wrangle and make Run Over "Primitives".
Here is my VEXpression:
string v[] = split(s@shop_materialpath, "/"); s@path="case/"+v[-1]+"/"+v[-1];
s@path
In your ROP Alembic Output node, enable "Build Hierarchy From Attribute" and for Path Attribute type "path".
Export.
Imported into Maya.
Works.
Another way is creating a Name node, class "Primitive" enable "Name from Group", Group Mask is "*" Group should be any 1 group name, in my case "Body" and for Name, use the same as Group use "Body". This will add a "name" attribute and the value will be the group name, it will rename accordingly for all groups even though you used one name. Then you can use Attribute Wrangle to create a "path" attribute, or use "name" attribute in the ROP Alembic Output node.
Edited by Guy Micciche - 2023年1月19日 19:53:05
- derrick
- スタッフ
- 332 posts
- Joined: 7月 2005
- Offline
Guy Micciche
What I did that got it working:
Create an Attribute Wrangle and make Run Over "Primitives".
Alembic archives have a structure similar to a filesystem. This structure is meaningful to many tools that process Alembic archives. Here are some good guidelines when using the Alembic ROP:
1) Explicitly tell the Alembic ROP where to place everything in the Alembic archive via "path" attribute. This should be a primitive string attribute.
2) Make sure each Alembic Shape node has a unique parent (for example, use paths for your shapes like "/piece0/piece0Shape", "/piece1/piece1Shape", "/piece2/piece2Shape"... instead of "/pieces/piece0", "/pieces/piece1", "/pieces/piece2").
3) Change the "Packed Transform" parameter to "Merge With Parent Transform" to avoid complication with packed primitives that will force the Alembic ROP to rename your nodes.
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
derrickI'd prefer if those complications were eased
3) Change the "Packed Transform" parameter to "Merge With Parent Transform" to avoid complication with packed primitives that will force the Alembic ROP to rename your nodes.
since we want to keep only transforms and preferably instancing
it's not ideal that Houdini appends Packed and Instance suffixes to object paths even if they are already unique per packed primitive
if multiple packed primitives have the same path, then it makes sense that it would be made unique but it would be nice if it respected if they are already unique
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- derrick
- スタッフ
- 332 posts
- Joined: 7月 2005
- Offline
tamte
I'd prefer if those complications were eased
since we want to keep only transforms and preferably instancing
The current default is "Deform Geometry". This pretty much prevents the use of instancing.
"Merge With Parent Transform" sounds like the behaviour you are actually asking for. Its unfortunately confusing name probably hides the fact it is the mode you really want. Ideally, this should be made the default and the Alembic ROP should behave better when using "Merge With Parent Transform" without a "path" attribute.
- tamte
- Member
- 8833 posts
- Joined: 7月 2007
- Offline
derrickthat's not exactly desirable, since that prevents exporting multiple transforms, we usually have thousands of packed primitives with individual transforms at sop level that need to be preserved
"Merge With Parent Transform" sounds like the behaviour you are actually asking for. Its unfortunately confusing name probably hides the fact it is the mode you really want. Ideally, this should be made the default and the Alembic ROP should behave better when using "Merge With Parent Transform" without a "path" attribute.
by complications I meant the automatic unnecessary name changing which breaks our naming conventions and round tripping of assets that just needed to be transformed or instanced in Houdini
I've just submitted an RFE#126566, outlining the issues with the naming with example file
Edited by tamte - 2023年1月21日 02:01:22
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links