ChrisCousins

ChrisCousins

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Material variations in a crowd using primvars Nov. 19, 2021, 4:19 a.m.

Just in case anyone comes up against the same problem, it was a mismatch in attribute type of the switcher attribute - (I think) integer vs float. Fixed now :-)

Material variations in a crowd using primvars Nov. 18, 2021, 6:24 p.m.

Made some progress, the issue seems fixed but the reason is elusive. Putting a remap node after the PrimVarReader makes the materials work like they're supposed to. Even if the remap doesn't change the range at all - even if the node is disabled - it kicks the variation_2 variable into action and we have different hats:

I'll dig into this as it feels weird - see if I can get a simplified scene to show the same problem.
Cheers -C

Material variations in a crowd using primvars Nov. 18, 2021, 4:09 p.m.

Hi - one of those situations where I thought I had it... but I don't. Hopefully someone can help.
I'm building a crowd in Solaris, materials all built in MaterialX, and I'm using an integer attribute in SOPS (@variation) with a switch node to choose between five different inputs, and materials assigned via collections. All good. Then I thought, wouldn't it be good if they also had different hats, but with a different distribution. So I make a second integer attribute (@variation_2) with a different seed and use that for the hat material. Same setup.
Weirdly though, although the hat material does change, it is always the same for each main material:



The green jumper gets the red hat, the grey top gets the green hat etc.

The values are different for each guy in the scene, but the hats stay the same per variation whatever seed I use. Stranger, I can type gibberish into the mtlxUsdPrimvarReader node and it makes no difference. Only the main material variation is used.



So - am I doing it wrong? Feels like a bug but I bet it's user error. Maybe there's a better way - it's just the diffuse input that's changing for each material, perhaps there's a better workflow for this that I'm missing.

This is how my materials are setup: