Question about Arnold operator expression (Set Parameter)

   4026   1   0
User Avatar
Member
2 posts
Joined: 11月 2021
Offline
Hello,

I am new to the SideFX community, I am not sure if anyone has asked the similar question before, but I could found it by use forum search. I am trying to use Arnold set parameter to define the object, I could not find the exactly example.
I tried type expression like the image I attached, it doesn't work. However, I type visibility = 0, this works, but this is not the result I wanted, I wish to use Arnold shape parameter. could anyone show me what is the correct way to do this? Thanks very much

Attachments:
Screenshot 2022-01-20 135211.png (32.5 KB)

User Avatar
Member
3 posts
Joined: 1月 2011
Offline
A whole year later I'm attempting to answer your questions, hopefully you found a good work-around for your problems.

The visibility in operators is a little tricky, the best resource I've found is here

https://arnoldsupport.com/2018/11/21/backdoor-setting-visibility/ [arnoldsupport.com]



I created an OTL to do the math for me. There's a line of python code to add up the different rays to the proper numbers. & then inside I set "visibility" to this calculated value.



Python code on the parm "calc"
total = 0
n= hou.node(".")
cam =n.parm("camera").eval()*1
shadow =n.parm("shadow").eval()*2
diff_trans=n.parm("diffuse_transmit").eval()*4
spec_trans=n.parm("specular_transmit").eval()*8
diff_refl=n.parm("diffuse_reflect").eval()*32
spec_refl=n.parm("specular_reflect").eval()*64
vol_scat=n.parm("volume").eval()*16
sss=n.parm("sss").eval()*128

total = cam + shadow + diff_trans + spec_trans + diff_refl + spec_refl + vol_scat+sss

if n.parm("skip").eval()==1:
    total = 0

return total

I hope this helps

Attachments:
vis_numbers.PNG (9.6 KB)
calc_otl.PNG (32.9 KB)
set_parm_inside.PNG (38.9 KB)

  • Quick Links