Hi,
How can I automate material assignments based on primitive userProperties in the incoming alembic or usd stages?
I need to do something like this:
Assigning the "skin" material to all primitives that have (userProperties:mat == "skin")
Is this currently possible in Solaris? I couldn't find a node to use to loop over the primitives and access their properties in stage.
Solaris: Material Assign with CVEX and prim userProperties
1606 4 1- Belal
- Member
- 15 posts
- Joined: March 2014
- Offline
- tamte
- Member
- 8647 posts
- Joined: July 2007
- Offline
I believe Assign Material LOP can o this
you can use it to assign any material based on any VEXpression
and also override parameters further
or you can keep it simple and just specify a pattern based on desired property if all you need to do is assign only a handful of materials
you can use it to assign any material based on any VEXpression
and also override parameters further
or you can keep it simple and just specify a pattern based on desired property if all you need to do is assign only a handful of materials
Edited by tamte - Oct. 3, 2021 14:53:13
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Belal
- Member
- 15 posts
- Joined: March 2014
- Offline
- tamte
- Member
- 8647 posts
- Joined: July 2007
- Offline
you can access both in VEX either in the VEXpression of Assign Material
or in any of the Primitive Pattern parameters
both will allow you to do what you mention in the first post
regardless, here is a file showing both options
or in any of the Primitive Pattern parameters
both will allow you to do what you mention in the first post
Belalbut I may be missing your point if that's not what you want
Assigning the "skin" material to all primitives that have (userProperties:mat == "skin")
regardless, here is a file showing both options
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- Belal
- Member
- 15 posts
- Joined: March 2014
- Offline
Thanks Tamte for sharing...
What I meant is the option of assigning the material based on pattern using 'mat' usd properties (in usd this is userProperties:mat).
the file you shared works awesome as long as the property 'mat' is there since you created it houdini, but it doesn't when mat is on a usd primvitive because houdini didn't import it! it could be that there is something we have to do to tell Houdini that we want to import the userProperties.
There two issues actually:
1. Houdini didn't import the userProperties:* found in the usd (even when requested this in the Import data fields of SOP import)
2. Houdini imported the primvars only (where in this case, s@mat == "skin" didn't work because the 'mat' primvar will be in form of array of string not string (in the usd, mat is not "skin"), trying something like s@mat == "skin" didn't work either
What I meant is the option of assigning the material based on pattern using 'mat' usd properties (in usd this is userProperties:mat).
the file you shared works awesome as long as the property 'mat' is there since you created it houdini, but it doesn't when mat is on a usd primvitive because houdini didn't import it! it could be that there is something we have to do to tell Houdini that we want to import the userProperties.
There two issues actually:
1. Houdini didn't import the userProperties:* found in the usd (even when requested this in the Import data fields of SOP import)
2. Houdini imported the primvars only (where in this case, s@mat == "skin" didn't work because the 'mat' primvar will be in form of array of string not string (in the usd, mat is not "skin"), trying something like s@mat == "skin" didn't work either
Edited by Belal - Oct. 6, 2021 04:18:21
-
- Quick Links