Search - User list
Full Version: Question about Arnold operator expression (Set Parameter)
Root » 3rd Party » Question about Arnold operator expression (Set Parameter)
lolocandy
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

cdeorsay
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB