probiner Posted December 28, 2017 Share Posted December 28, 2017 (edited) Scene file attached with a example case(Normal Displacement)where the problem is presented in 3 columns: left: Just HDA with single input value driving all points. center: Attempt to use a random value attribute @foo to drive each point. Failing. right: HDA exploded with @foo driving each point. Working as intended. I inputing @foo and `point(0, "foo", @ptnum)` in the HDA parameter but it didn't work. So what's the best way to set up HDA parameters to also be driven by a per point attribute? Thanks should look like this with the random value point attribute. AttribDriveParameter.hiplc Edited December 29, 2017 by probiner Quote Link to comment Share on other sites More sharing options...
probiner Posted December 29, 2017 Author Share Posted December 29, 2017 Fixed scene file. Typed "Embeded" instead of "Embedded" in the HDA path >_> Quote Link to comment Share on other sites More sharing options...
probiner Posted January 8, 2018 Author Share Posted January 8, 2018 (edited) I got some answers at sideFX forums and here I explain my questioning a bit more. Basically: Is it possible to drive a single SOP float parameter with a geometry attribute? So far seems like the one way to go about it is to have an extra sting parameter to name the attribute... Cheers Edited January 8, 2018 by probiner Quote Link to comment Share on other sites More sharing options...
probiner Posted January 19, 2018 Author Share Posted January 19, 2018 (edited) Ok, here's the how I went about it to avoid burdening the UI. In a wrangle inside the Asset I check if the attribute exists with the same name as the parameter in the UI, and if not I create it with the UI value: float attrib = ch(“attrib”) ; // UI value variable from a spare input in the wrangle SOP. if(! hasprimattrib(0, “hda_attrib”)) f@hda_attrib = attrib ; // If the attribute doesn't exist, it's created and the UI value assigned to it. or if I just need the variable: float attrib = ch("attrib") ; if( hasprimattrib(0, "hda_attrib")) attrib = prim(0, "hda_attrib", @primnum ) ; Might not be very pretty to create/rename/copy attributes before the HDA, but since they share the UI parameter name it's straight forward enough, while allowing neat extra control. Cheers Edited January 22, 2018 by probiner 1 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.