Jump to content

[SOLVED]Material Stylesheet Attribute Bug?


Atom

Recommended Posts

Hi All,

 

I have been playing around with stylesheets trying to colorize some agents based upon their changing attributes. As far as I can tell, this portion of Houdini H14 does not really work at all. I am assuming it is some kind of syntax error on my part but even the example code from the Help document does not seem to work.

{
    "styles" : [
        {
            "target" : { "attributes" : { "previousstate" : "stand"} },
            "overrides": {"materialParameters" :{"baseColor" : "1.0 0.0 0.0"}}   
        },
        {
            "target" : {"group" : "1-4"},
            "overrides": {"materialParameters" :{"baseColor" : "1.0 0.5 0.0"}}   
        },
        {
            "target" : {"group" : "5-8"},
            "overrides": {"materialParameters" :{"baseColor" : "1.0 1.0 0.0"}}   
        },
        {
            "target" : {"group" : "11-20"},
            "overrides": {"material" :{"name" : "`opfullpath("../shopnet1/green")`"}}   
        }
    ]
}

In my example I am trying to change the color of the agents who were previously standing to RED. As you can see in the attached image even though I have some agents with a previousstate of "stand" they are never colorized by Mantra. Even though other portions of the stylesheet overrides are working fine...? Yes, I have soloed that one override just to make sure other overrides were not clobbering my color change, but I get the same effect with only one override.

{
    "styles" : [
        {
            "target" : { "attributes" : { "previousstate" : "stand"} },
            "overrides": {"materialParameters" :{"baseColor" : "1.0 0.0 0.0"}}   
        }
    ]
}

I am attaching the scene if anyone has any time to look at it. I have included the bake so it should just open up and render.

post-12295-0-77650700-1443397080_thumb.j

stylesheet_attribute_bug.zip

Edited by Atom
Link to comment
Share on other sites

Thanks for the link I am going to investigate that but the SideFX docs clearly show an example referencing Crowd Simulation attributes directly.

.

.

.

This just in from SESI...


I'll also point out that in Houdini 15.0, the "attributes" targetting is no longer supported. It is equivalent to targeting a "group" of "@previousstate==stand" (which also works in Houdini 14.0 once you promote the attribute). And furthermore in Houdini 15.0, you can target based on "pointGroup" rather than "group", so you will be able to target:
    "pointGroup" : "@previousstate=stand"
_without_ requiring the attribute promote SOP.

Edited by Atom
  • Like 1
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...