Jump to content

Material Stylesheets and groups


Recommended Posts

I have a character that I want to use in a crowd setup.

 

This should be simple, but how do I apply different materials (head, shirt and trousers) to the coresponding name groups (or name attributes) that I created before the agent bake process, with style sheets in houdini 15?

 

I could not find much in the docs about this.

 

Any help would be welcome.

Edited by Werner
Link to comment
Share on other sites

You can try using the new pointGroup and primitiveGroup to filter what you override.

 

You can bind an attribute to a value in a material. In this code all members of the group will have their principled shader diffuse texture map replaced by the attribute value element_name.

 

 

// Houdini 15 style for stylesheets.
{
    "styles":
    [
        {
            "target" : {"primitiveGroup" : "*"},
            "overrides" : {
                "materialParameters":{"diff_colorTexture":{"script":{"binding":"element_name"}}}
            }
        }
    ]
}

 

Or if you want to target agents who were previously standing.

// Houdini 15 style for stylesheets.
{
    "styles":
    [
        {
            "target" : {"pointGroup" : "@previousstate=stand"},
            "overrides" : {
                "materialParameters":{"diff_colorTexture":{"script":{"binding":"element_name"}}}
            }
        }
    ]
}
Link to comment
Share on other sites

Thanks, but I really just want to get the materials (as is) back on the rendered agents. Reading the docs, I had the idea that stylesheets in H15 was easy, but doing this simple thing

seems to be harder than what I anticipated.

Normally I just force all SHOPs in the Mantra node to get the multiple materials to render on the agent, but that does not seem to work on this model. Not sure what I am missing here. I can't seem to find how to asign the materials back onto the different groups with name attributes in the stylesheets.

Link to comment
Share on other sites

Glad you got it working.

 

I would like to see a more comprehensive video tutorial on this topic as well.

 

It seems like as soon as I think I understand the material stylesheet, I try something new and it does not work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...