Skip to content

TextureOcclusion

TextureOcclusion#

(Occlusion)

Go to User page.

Description#

Computes occlusion shading

Public Attributes#

Type Name Visual Hint Description
double[3] color VISUAL_HINT_COLOR Set the color.
long occlusion_mode VISUAL_HINT_DEFAULT Set the type of occlusion.
long normal_mode VISUAL_HINT_DEFAULT Set the normal to use to compute the occlusion.
double[3] occlusion_color VISUAL_HINT_COLOR Set the color of the occlusion.
double occlusion_gain VISUAL_HINT_PERCENTAGE Set the gain of the occlusion.
reference (Group) occluders VISUAL_HINT_GROUP Define which geometries are occluders. By default it uses the 3D layer geometries.
double radius VISUAL_HINT_DISTANCE Set the radius of the occlusion.
double angle VISUAL_HINT_ANGLE Set the opening angle of the hemisphere used at each fragment.
bool evaluate_transparency VISUAL_HINT_DEFAULT Enable the computation of the shading for occluding objects. If occluding objects are transparent, this affects the color of the occlusion.
long sample_count VISUAL_HINT_SAMPLE_PER_PIXEL Set the sample count used for the sampling. A high value gives a better result but increases the computation time.
long bias_mode VISUAL_HINT_DEFAULT Specify if the value of the bias is absolute or if it is relative to the slope on the geometry.
long space_mode VISUAL_HINT_DEFAULT Set the space to use when applying a bias.
double[3] bias VISUAL_HINT_DISTANCE Apply a bias on the normal.
double slope_threshold VISUAL_HINT_ANGLE Set the minimum angle that a surface must have in order to be considered as a slope. This value corresponds to the angle between the bias direction and the normal of the surface.
bool merge_objects VISUAL_HINT_DEFAULT When activated, rays ignore the surface of two objects that are in contact.
double merge_threshold VISUAL_HINT_DISTANCE Maximum distance under which the objects are merged.
curve normal_falloff VISUAL_HINT_DEFAULT Controls the intensity of the occlusion according to the dot product between the normal of the shaded fragment and the normal on the occluder.
curve distance_falloff VISUAL_HINT_DEFAULT Controls the intensity of the occlusion according to the distance.

Inherited Public Attributes#

Type Name Visual Hint Description
bool pass_through VISUAL_HINT_DEFAULT If checked, the current texture is not evaluated and the value of the attribute selected in Pass Through Attribute is directly forwarded.
string master_input VISUAL_HINT_TAG Name of the attribute that will be used as output if Pass Through is enabled.
bool invert VISUAL_HINT_DEFAULT If checked, the texture is inverted.
double opacity VISUAL_HINT_PERCENTAGE Set the opacity of the texture.

CID#

class "TextureOcclusion" "Texture" {
    #version 0.91
    icon "../icons/object_icons/texture_occlusion.iconrc"
    category "/Texture/Raytrace"
    doc "Computes occlusion shading"
    attribute_group "input" {
        color "color" {
            doc "Set the color."
            texturable yes
            animatable yes
            value 1 1 1
        }
    }
    attribute_group "occlusion" {
        long "occlusion_mode" {
            doc "Set the type of occlusion."
            preset "Off" "0"
            preset "Ambient" "1"
            preset "Inner" "2"
            preset "Ambient & Inner" "3"
            value 1
        }
        long "normal_mode" {
            doc "Set the normal to use to compute the occlusion."
            preset "Geometry" "0"
            preset "Shading" "1"
            value 0
        }
        color "occlusion_color" {
            doc "Set the color of the occlusion."
            texturable yes
            animatable yes
            value 0.0 0.0 0.0
        }
        percentage "occlusion_gain" {
            doc "Set the gain of the occlusion."
            texturable yes
            animatable yes
            numeric_range yes 0.0 1
            ui_range yes 0.0 1
            value 1
        }
        group "occluders" {
            doc "Define which geometries are occluders. By default it uses the 3D layer geometries."
            filter "SceneObject"
            null_label "Use Layer 3D"
            input "motion" "geometry"
            value ""
        }
        distance "radius" {
            doc "Set the radius of the occlusion."
            texturable yes
            animatable yes
            numeric_range yes 0.0 1000000000
            ui_range yes 0.0 10
            value 0.1
        }
        angle "angle" {
            doc "Set the opening angle of the hemisphere used at each fragment."
            texturable yes
            animatable yes
            numeric_range yes 0.0 180
            ui_range yes 0.0 180
            value 180
        }
        bool "evaluate_transparency" {
            doc "Enable the computation of the shading for occluding objects. If occluding objects are transparent, this affects the color of the occlusion."
            animatable yes
            value no
        }
        sample_per_pixel "sample_count" {
            doc "Set the sample count used for the sampling. A high value gives a better result but increases the computation time."
            numeric_range yes 1 65535
            ui_range yes 1 512
            value 16
        }
    }
    attribute_group "occlusion>bias" {
        collapsed yes
        long "bias_mode" {
            doc "Specify if the value of the bias is absolute or if it is relative to the slope on the geometry."
            preset "Absolute" "0"
            preset "Follow Slope" "1"
            value 0
        }
        long "space_mode" {
            doc "Set the space to use when applying a bias."
            preset "Object Space" "0"
            preset "World Space" "1"
            value 1
        }
        distance[3] "bias" {
            doc "Apply a bias on the normal."
            texturable yes
            animatable yes
            value 0.0 0.0 0.0
        }
        angle "slope_threshold" {
            doc "Set the minimum angle that a surface must have in order to be considered as a slope. This value corresponds to the angle between the bias direction and the normal of the surface."
            texturable yes
            animatable yes
            numeric_range yes 0.0 90
            ui_range yes 0.0 90
            read_only yes
            value 0.0
        }
    }
    attribute_group "occlusion>merge_objects" {
        collapsed yes
        bool "merge_objects" {
            doc "When activated, rays ignore the surface of two objects that are in contact."
            animatable yes
            value no
        }
        distance "merge_threshold" {
            doc "Maximum distance under which the objects are merged."
            numeric_range yes 0.0 1000000000
            ui_range yes 0.0 1
            read_only yes
            value 1e-06
        }
    }
    attribute_group "occlusion>falloffs" {
        collapsed yes
        curve "normal_falloff" {
            doc "Controls the intensity of the occlusion according to the dot product between the normal of the shaded fragment and the normal on the occluder."
            value[] {
                key 4 0.0 1 0.0 0.0 0.0 -0.3333 0.0 0.3333 0.0 yes yes no yes
                key 4 1 1 0.0 0.0 0.0 -0.3333 0.0 0.3333 0.0 yes yes no yes
            }
        }
        curve "distance_falloff" {
            doc "Controls the intensity of the occlusion according to the distance."
            value[] {
                key 4 0.0 1 0.0 0.0 0.0 -0.3333 0.0 0.3333 0.0 yes yes no yes
                key 4 1 0.0 0.0 0.0 0.0 -0.3333 0.0 0.3333 0.0 yes yes no yes
            }
        }
    }
    set "master_input" {
        private no
        hidden no
        saveable yes
        texturable no
        animatable no
        slider no
        numeric_range no 0.0 1
        ui_range no 0.0 1
        dg_active yes
        dg_cyclic no
        dirtiness_pass_through no
        read_only no
        shading_variable no
        experimental no
        advanced no
        overriden no
        promote_attribute no
        allow_expression yes
        localizable yes
        value "color"
    }
}