Stylesheets and HDA's

   2010   3   1
User Avatar
Member
221 posts
Joined: July 2005
Offline
I have a large complicated HDA that has more HDA objects inside it. Currently, I have it set up such that each object gets primitive groups created for each unique shop_materialpath attribute. Then I use some object merges into a subnet next to the object with a new object for each unique material. Then I assign a material to each of these objects so I can assign materials to the packed primitives.

This is the workflow I've been using for a few years.

I have a few questions along these paths.

1) If I use stylesheets to assign the materials to the primitive groups within the packed primitives, how can I save that stylesheet to the HDA so that whenever I add one of these to a new .hip file, I will automatically have the same stylesheet loaded?

2) As a corollary to question 1, how can I have the stylesheet set up such that if I edit it once, all the other HDA's that use it in all the other .hip files will get the changes I make?

3) If I have the stylesheet override materials that were assigned using a Material SOP, is there anyway to see the result in the viewport, or do I have to render it to see the overrides?

4) Is there a way to target all the primitive groups named “gold” (for instance) in all the different objects below an HDA subnet? Or do I need to target each object's primitive groups separately?

Thanks in advance for the help,
Dave
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
I am also interested in hearing people's HDA workflows with stylesheets. It seems to me that as they are currently designed, while they are super useful for setting materials on packed disk prims and such, they just don't fit into the HDA paradigm.

Hopefully someone can prove me wrong though.
User Avatar
Staff
1448 posts
Joined: July 2005
Offline
You can save the style sheet in ‘material_stylesheet’ detail attribute, and it will apply to all the prims in that detail (and their packed contents).

For packed prims, you can save it in ‘material_stylesheet’ primitive attribute, and it will apply to that primitive and all primitives contained in that packed prim (including nested packing).

You may be also able to utilize the ‘shop_materialstylesheet’ parameter on object nodes to save the stylesheet there.
User Avatar
Member
183 posts
Joined: Dec. 2011
Offline
I thought the documentation said that applying stylesheets as a primitive attribute would lead to slow renders. Or does that only apply to unpacked geo since the attribute would be replicated for every single prim?

Also, while I know of the material sop's “save as stylesheet” option, this doesn't seem to work for packed disk primitives. Am I wrong about this? Are there any good tools for editing geometry level stylesheets? Like a way to set target depth?

Another issue I ran into with the material sop method is that it seems to force absolute shop paths, even if you set them to be relative. Is this a bug?

Also as a side note, setting the stylesheet on the “shop_materialstylesheet” only works if you keep the geo inside of that node. Any external referencing and the sheet will no longer be able to effect it.

So far it seems for HDA's, storing it on the geometry is the most robust way (fewer ways for a user to misuse it and complain that it's broken), however the provided methods for creating,editing, or merging geometry sheets are both sparse and buggy.
Edited by NFX - Feb. 27, 2018 13:19:32
  • Quick Links