Use area measure data to drive procedural noise frequency

   2290   3   1
User Avatar
Member
2 posts
Joined: Aug. 2015
Offline
I've created a measure SOP to calculate the area of primitives in a polygonal model. I then connected two attribute promote nodes, one to get the minimum area and another for the maximum by changing the class from primitive to detail and then choosing maximum or minimum for the promotion method. What I want to do it somehow extract this data, possibly normalize it to a range of 0 to 1 and then use the data in shop level to drive the frequency of a noise pattern. Any ideas or thoughts?

The whole point of this is to drive the frequency of the texture based on topology denseness.
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Just off the top of my head… You could access the detail attribute at the parameters by using the detail() [sidefx.com] expression. As for the node path, you typically want to combine it with opinput() [sidefx.com] to refer to the input connection. For example:
detail(“../” + opinput(“.”, 0), “my_attribute”, 0)
Andrew / アンドリュー
User Avatar
Member
333 posts
Joined: Oct. 2012
Offline
if you wanna do it in vop just use a getAttribute set to detail and first input. and you can then normalize the value, add noise and manipulate the data further.
User Avatar
Member
2 posts
Joined: Aug. 2015
Offline
Thanks for the replies! I ended up using the bind node to import the primitive area data into SHOP level (I wish I knew about it before)
  • Quick Links