Juraj Posted January 29, 2017 Share Posted January 29, 2017 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 Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 29, 2017 Author Share Posted January 29, 2017 Also material stylesheets could work, but I am not sure how to include them inside the digital asset. I can create and set up inside Data Tree pane, but how do I convert it to a SOP node? Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 29, 2017 Author Share Posted January 29, 2017 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. Quote Link to comment Share on other sites More sharing options...
Jason Posted January 29, 2017 Share Posted January 29, 2017 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. Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 30, 2017 Author Share Posted January 30, 2017 Hi, thanks much ! It works when set as detail attribute. Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 30, 2017 Author Share Posted January 30, 2017 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. Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 30, 2017 Author Share Posted January 30, 2017 Again here , I found a way, but it is not very intuitive. I believe there is something easier? Please tell me so 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.