BRDF Shaders

BRDF shaders are a new type of material property to support common shading and texturing tasks with a single shading function which is designed to work with both direct and indirect illumination. A BRDF can be computed either procedurally for algorithmic models, or retrieved from measured BRDF data of real-world materials.

Built-in BRDFs

mental ray supports built-in BRDFs for common illumination models, like Lambert, Phong, Ashikhmin, and Mirror, and BRDFs for widely used mental ray shaders like architectural material and car paint. They are pre-registered as BSDF with the following declaration:

builtin_bsdf_lambert
declare shader color "builtin_bsdf_lambert" (
    color       "diffuse",
    array light "lights",
    integer     "mode" )
    version     1
end declare
builtin_bsdf_phong
declare shader color "builtin_bsdf_phong" (
    color       "diffuse",
    color       "glossy",
    scalar      "exponent",
    array light "lights",
    integer     "mode" )
    version     1
end declare
builtin_bsdf_ashikhmin
declare shader color "builtin_bsdf_ashikhmin" (
    color        "diffuse",
    color        "glossy",
    scalar       "exp_u",
    scalar       "exp_v",
    array light  "lights",
    integer      "mode" )
    version      1
end declare
builtin_bsdf_mirror
declare shader color "builtin_bsdf_mirror" (
    color       "reflection"             default 0 0 0 1)
end declare

This is a simple specular reflection, which multiplies the reflected color with the reflection parameter.

builtin_bsdf_architectural
declare shader color "builtin_bsdf_architectural" (
    color       "diffuse_refl"           default 0 0 0 1,
    scalar      "diffuse_refl_scalar"    default 1,
    scalar      "diffuse_dev",
    color       "specular_refl"          default 0 0 0 1,
    scalar      "specular_refl_scalar"   default 1,
    scalar      "refl_gloss"             default 1,
    boolean     "metal_material"         default on,
    color       "specular_trans"         default 0 0 0 1,
    scalar      "specular_trans_scalar"  default 1,
    scalar      "trans_gloss"            default 1,
    color       "diffuse_trans"          default 0 0 0 1,
    scalar      "diffuse_trans_scalar"   default 1,
    scalar      "anisotropy",
    scalar      "anisotropy_rotation",
    integer     "mode",
    array light "lights")
end declare

This is a simplification of the architectural material, containing only those parameters which are relevant for the material properties.

builtin_bsdf_architectural_comp
declare shader color "builtin_bsdf_architectural_comp" (
    color       "diffuse"                 default 0.5 0.5 0.5 1,
    scalar      "diffuse_weight"          default 1,
    scalar      "diffuse_roughness",
    color       "refl_color"              default 1 1 1 1,
    scalar      "reflectivity"            default 0.6,
    scalar      "refl_gloss"              default 1,
    boolean     "refl_is_metal"           default on,
    color       "refr_color"              default 1 1 1 1,
    scalar      "transparency",
    scalar      "refr_gloss"              default 1,
    color       "refr_trans_color"        default 0.7 0.6 0.5 1,
    scalar      "refr_trans_weight"       default 0.5,
    scalar      "anisotropy"              default 1,
    scalar      "anisotropy_rotation",
    integer     "mode",
    array light "lights",
    scalar      "refr_ior",
    boolean     "brdf_fresnel",
    scalar      "brdf_0_degree_refl",
    boolean     "refr_translucency",
    integer     "anisotropy_channel",
    integer     "refl_gloss_samples",
    boolean     "refl_interpolate",
    boolean     "refl_hl_only",
    integer     "refr_gloss_samples",
    boolean     "refr_interpolate",
    scalar      "brdf_90_degree_refl",
    scalar      "brdf_curve",
    boolean     "brdf_conserve_energy",
    integer     "intr_grid_density",
    integer     "intr_refl_samples",
    boolean     "intr_refl_ddist_on",
    scalar      "intr_refl_ddist",
    integer     "intr_refr_samples",
    boolean     "single_env_sample",
    boolean     "refl_falloff_on",
    scalar      "refl_falloff_dist",
    boolean     "refl_falloff_color_on",
    color       "refl_falloff_color",
    integer     "refl_depth",
    scalar      "refl_cutoff",
    boolean     "refr_falloff_on",
    scalar      "refr_falloff_dist",
    boolean     "refr_falloff_color_on",
    color       "refr_falloff_color",
    integer     "refr_depth",
    scalar      "refr_cutoff",
    scalar      "indirect_multiplier",
    scalar      "fg_quality",
    scalar      "fg_quality_w",
    boolean     "ao_on",
    integer     "ao_samples",
    scalar      "ao_distance",
    color       "ao_dark",
    color       "ao_ambient",
    boolean     "ao_do_details",
    boolean     "thin_walled",
    boolean     "no_visible_area_hl",
    boolean     "skip_inside_refl",
    boolean     "do_refractive_caustics",
    boolean     "backface_cull",
    boolean     "propagate_alpha",
    scalar      "hl_vs_refl_balance",
    scalar      "cutout_opacity",
    color       "additional_color",
    shader      "bump",
    boolean     "no_diffuse_bump")
end declare

This is a compatibility version of the architectural BSDF. It provides identical functionality to the builtin_bsdf_architectural, but its declaration exactly matches that of the traditional architectural material shader. It can be used to minimize changes to the existing scenes and translators using the architectural material.

The current feature set for BRDF/BSDF has some known limitations.

Copyright © 1986, 2015 NVIDIA ARC GmbH. All rights reserved.