Guy Micciche

Guy Micciche

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Engine

Availability

Not Specified

Recent Forum Posts

Houdini Alembic to Maya group - how to keep pieces separate? 2023年1月19日19:49

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:
string v[] = split(s@shop_materialpath, "/");
s@path="case/"+v[-1]+"/"+v[-1];
Basically, this copies the string from my shop_materialpath attribute and formats it into a "path" attribute. Using this specific format for
s@path
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.

SCRIPTING: How To Return Parameter's Original Value 2023年1月10日18:45

I think this is right. Is it? Seems to work at the base level, but is $IV the correct answer or is there something else? Also, out of curiosity, what is $IV equivalent using python? Hoping somebody can confirm this is correct or if there is a standard way. Thanks!

HSCRIPT:
{
    if(ch("../null1/cy") == 1)
    {
        return 0;
    }
    else
    {
        return $IV;
    }
}

SCRIPTING: How To Return Parameter's Original Value 2023年1月10日17:57

My setup is very simple, I have a custom float parameter with a custom toggle. I want the user to be able to enter a value in the float parameter. But when the user hits the toggle button, I want the float parameter to be set to 0. That works. But when they uncheck the toggle, I want to the float value to return to the original value.

This is the code I am working with, I will give you python and hscript:

PYTHON:
if ch("../null1/cy") == 1:
    return 0
return ???ORIGINAL VALUE???

HSCRIPT
if(ch("../null1/cy") == 1, 0, ???ORIGINAL VALUE???)

How can I return the original value of the parameter?

Thank you