hcs Posted July 8, 2013 Share Posted July 8, 2013 Hey guys, I'm new to using digital assets and would like to create one with an embedded image file to use in the shader but have not been able to figure out how to do so. I have seen people mention using opdef, and the documentation suggested it, but I am not clear on exactly how the syntax works. If someone could please give me a pointer to somewhere with a detailed description of how to reference embedded textures, that would be great. Particularly, when the documentation discusses the section, what does that mean? In case it matters I am trying to embed a .png file. Thanks Quote Link to comment Share on other sites More sharing options...
anim Posted July 9, 2013 Share Posted July 9, 2013 let's assume you have created the asset already and you are in Edit Operator Type Properties go to Extra Files tab on bottom left pick file you want to embed and fill in section name (this will be the section you are asking about and you will use this name to access the file) then just click Add File to embed it then to access it just use opdef:/Network_type/asset_name?section[/CODE]so if your asset is Sop type and you gave it a name my_hda and you've embedded image.png but named the section e.g. my_image then it will be[size=4][CODE]opdef:/Sop/my_hda?my_image[/CODE][/size][size=4]or you can as well use relative path to some instance of the asset instead of it's type[/size][size=4]so if you are using it directly on some parm on your asset then you can just enter[/size][size=4][CODE]opdef:.?my_image[/CODE][/size][size=4]or if its on some node one level below(inside) your asset then[/size][size=4][CODE]opdef:..?my_image[/CODE][/size][size=4]etc[/size] 2 Quote Link to comment Share on other sites More sharing options...
barad_dur Posted July 10, 2013 Share Posted July 10, 2013 (edited) Thomas, Does the above mean that, when all is said and done, this digital asset will forever contain the image file and the digital asset can be passed around without ever having to manage a seperate texture file? What else can you embed into a DA in this manner? Could you include a point cloud file for example? Is there something I could not permanantly embed into the DA? Thank you. Edited July 10, 2013 by barad_dur Quote Link to comment Share on other sites More sharing options...
old school Posted July 10, 2013 Share Posted July 10, 2013 Thomas, Does the above mean that, when all is said and done, this digital asset will forever contain the image file and the digital asset can be passed around without ever having to manage a seperate texture file? Yes. Unless you open up the asset and remove the section file. What else can you embed into a DA in this manner? Could you include a point cloud file for example? Is there something I could not permanantly embed into the DA? Any file on your file system can be embedded in to your HDA. Yes you can embed a point cloud as either a .bgeo for SOPs or a .pc file for tiled lookups for shading/rendering. Texture maps, text files, parameter dialogs, any hscript cmd files that you wish to carry along with the asset executed with call-back scripts (the way it was done before the internal python module was added), svg icon or bitmap for your asset icon, etc. 2 Quote Link to comment Share on other sites More sharing options...
hcs Posted July 16, 2013 Author Share Posted July 16, 2013 Thanks for the clear explanations anim and old school. Makes more sense now. That'll make sharing HDAs a lot easier. Quote Link to comment Share on other sites More sharing options...
barad_dur Posted July 16, 2013 Share Posted July 16, 2013 Awesome! Thank you Jeff. I'd been wondering about this for a very long time. I'll start playing around with this and see what I can break. 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.