Jump to content

Packed disk primitive, relative material assignment


Recommended Posts

Hello,
I am trying to assign a material to packed disk primitive. This was already asked here many times but still I am not sure about my current situation :)
I have geometry with two groups, I want to assign two materials based on those groups. However geometry is quite heavy so it makes sense to load it as packed disk primitive so that viewport is fast and ifd small.

This geo is part of a digital asset, digital asset contains shop network with those shaders. So I need a way to assign material using relative path. I tried it but unfortunately it doesn't seem to work. With absolute path it works as expected. I also do not want to unpack the geo inside asset, because then I would loose packed disk prim advantages.

One solution would be to save it with absolute path and put shaders always inside /shop/... But if I could make relative material path assignment working, it would make my scenes cleaner as everything related to the asset is included inside the digital asset.

 

Thanks,
Juraj

Link to comment
Share on other sites

So I managed to export stylesheet as json and copy it inside OBJ node in shop_materialstylesheet parameter and it works.

But I would like to set it inside a sop, for example with a wrangle. If I copy the same json inside a wrangle into material_stylesheet primtive attribute, it does not work.

Link to comment
Share on other sites

There may be a formatting error or perhaps a misspelled attribute name or type or something; make sure it's a primitive or detail attribute.   If you experiment getting the Material SOP to create you stylesheet attributes (there is a toggle on that SOP), examine it's being formatted, classed, etc there, and mimic it.

Link to comment
Share on other sites

Hi, I have a feeling like I am overcomplicating things :)
I got this material stylesheets working, but it does not solve my problem -  shader paths are absolute again, so it will not work with the digital asset,  because asset's name and location will be changing in every shot.

I am sure that there must be a simple solution for that. I would like to keep my shaders inside digital asset to have everything organised.

Link to comment
Share on other sites

Again here :) ,
I found a way,  but it is not very intuitive. I believe there is something easier? Please tell me so :D

For more complex assignments it can be pain to manage this kind of workflow.

 

Basically I divide sheet into three parts and I replace hard-coded shader paths with the relative ones.

 

sheet2.jpg

sheet1.jpg

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...