INDX INDEX_SECTION¢Ia¦Vop/occlusion_2_¢Ia¦ occlusion_2_ Occlusion 2(oplib:/Vop/occlusion_2_?Vop/occlusion_2_VOP_occlusion_2_Vop surface lightIa¦INDX DialogScriptƒIa¦ CreateScriptƒIa¦TypePropertiesOptions”ģIa¦HelpAIa¦ Tools.shelf ĪuIa¦ExtraFileOptionsCIa¦# Dialog script for occlusion_2_ automatically generated 01/04/09 15:44:22 { name occlusion_2_ script occlusion_2_ label "Occlusion 2" code { "float $cover;" "vector $missed_direction;" "vector $myP = $isconnected_P ? $P : P;" "vector $myN = $isconnected_N ? normalize($N) : normalize(frontface(N, I));" "occlusion($cover, $missed_direction, $myP, $myN, \"bias\", $bias," " \"maxdist\", $maxdist, \"samples\", $samples," " \"scope\", $scope, \"categories\", $categories);" "$coverage = $cover;" "$bentNormal = $missed_direction;" "$occlusion = 1-$cover;" } input vector P Position input vector N "Surface Normal" input float bias Bias input float maxdist "Maximum Ray Distance" input int samples "Number Of Samples" input string scope "Object Scope" input string categories "Object Selection" output float coverage Coverage output vector bentNormal "Bent Normal" output float occlusion Occlusion signature "Default Inputs" default { } help { "" } parm { name "bias" label "Bias" type float default { "0.0001" } range { 0 0.01 } export none } parm { name "maxdist" label "Maximum Ray Distance" type float default { "-1" } range { 0 1 } export none } parm { name "samples" label "Number Of Samples" type integer default { "256" } range { 1 512 } export none } parm { name "scope" label "Object Scope" type oplist default { "*" } range { 0 1 } export none parmtag { "oprelative" "." } } parm { name "categories" label "Object Selection" type string default { "*" } range { 0 1 } export none } } # Automatically generated script: Sunday January 04, 15:44 \set noalias = 1 # # Creation script for occlusion_2_ operator # if ( "$arg1" == "" ) then echo This script is intended as a creation script exit endif # Node $arg1 (Vop/occlusion_2_) opexprlanguage -s hscript $arg1 ParmsFromVfl := 0; PrefixDroppedParmName := 1; UseDSParms := 1; ForbidOutsideParms := 1; LockContents := 1; SaveSpareParms := 0; CheckExternal := 1; GzipContents := 1; MakeDefault := 1; PrefixDroppedParmLabel := 1; UnlockOnCreate := 0; = Occlusion 2 VEX Node = #type: node #context: vop #internal: Occlusion 2 #icon: vop/occlusion """ The Occlusion 2 VOP is used to access the second occlusion VEX function (the first being in VOP form already in Houdini gives occluded irradiance). Instead of computing color information from ambient occlusion, this form computes the coverage (the percentage of occlusion) and the average direction of empty space. The average direction can be used to look up the color in a pre-blurred environment map. TIP: Use the occlusion output to get the result of 1-coverage. @parameters == Parameters == Parameters for Occlusion 2 VOP. Other parameters include the Bias (bias), which gives control over self-intersections, and Number Of Samples (samples), which specifies the amount of samples should be sent out to filter rays. If the position (P) and normal vector (N) are not connected, the global variables by the same names will be used instead. If the maximum ray distance (maxdist) is not connected, the rays will be allowed to travel to infinity. The Object Scope parameter is a list of object names to occlude, and the Object Selection parameter is a list of categories to occlude. @inputs See above and [http://localhost:48626/vex/contexts/shading_contexts#rayopts optional parameters] @related - [Node:vop/occlusion] VOP VOP $HDA_TABLE/$HDA_NAME Digital Assets