diff --git a/.gitattributes b/.gitattributes index d6fd480ecccd5f87d3f7f3aa8d184c9c6a88ab12..3894346bdd9e08a15a4ab9fcf62c9b74762fefeb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1258,3 +1258,16 @@ data/hdf5/stack_blocks/arx_x5/data/episode_0000096.hdf5 filter=lfs diff=lfs merg data/hdf5/stack_blocks/arx_x5/data/episode_0000098.hdf5 filter=lfs diff=lfs merge=lfs -text data/hdf5/stack_blocks/arx_x5/data/episode_0000097.hdf5 filter=lfs diff=lfs merge=lfs -text data/hdf5/stack_blocks/arx_x5/data/episode_0000099.hdf5 filter=lfs diff=lfs merge=lfs -text +Assets/Sensor/Camera/realsense.usd filter=lfs diff=lfs merge=lfs -text +Assets/Sensor/Camera/kinect.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link5.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/instanceable_collision_meshes.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_hand.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link0.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link2.usd filter=lfs diff=lfs merge=lfs -text +Assets/Sensor/Camera/d435/configuration/d435_base.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link1.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link7.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link4.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link3.usd filter=lfs diff=lfs merge=lfs -text +Assets/Robots/franka/Props/panda_link6.usd filter=lfs diff=lfs merge=lfs -text diff --git a/Assets/Material/material_0008/Carpet_Cream.mdl b/Assets/Material/material_0008/Carpet_Cream.mdl new file mode 100644 index 0000000000000000000000000000000000000000..2d1000ebf300d748106b6ca28cea78d699f1d2b8 --- /dev/null +++ b/Assets/Material/material_0008/Carpet_Cream.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Carpet_Cream(*) + = OmniPBR( + diffuse_color_constant: color(0.500000, 0.500000, 0.500000), + diffuse_texture: texture_2d("./Carpet_Cream_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.000000, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.000000, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Carpet_Cream_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.000000, 1.000000, 1.000000), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.000000, + bump_factor: 0.75f, + normalmap_texture: texture_2d("./Carpet_Cream_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0014/Carpet_Pattern_Loop.mdl b/Assets/Material/material_0014/Carpet_Pattern_Loop.mdl new file mode 100644 index 0000000000000000000000000000000000000000..46f21ff71899640c9c8579676febcc50a6d0373e --- /dev/null +++ b/Assets/Material/material_0014/Carpet_Pattern_Loop.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Carpet_Pattern_Loop(*) + = OmniPBR( + diffuse_color_constant: color(1.0, 1.0, 1.0), + diffuse_texture: texture_2d("./Carpet_Pattern_Loop_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 0.625f, 0.25f), + reflection_roughness_constant: 0.0, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.0, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Carpet_Pattern_Loop_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(0.0, 0.0, 0.0), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.0, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Carpet_Pattern_Loop_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.3f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0016/Adobe_Brick.mdl b/Assets/Material/material_0016/Adobe_Brick.mdl new file mode 100644 index 0000000000000000000000000000000000000000..76dbfaac72523404cace87a063633931f1d0f1e8 --- /dev/null +++ b/Assets/Material/material_0016/Adobe_Brick.mdl @@ -0,0 +1,47 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Adobe_Brick(*) + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Adobe_Brick_BaseColor.png" /* tag 2956, version 3373013613 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Adobe_Brick_ORM.png" /* tag 2958, version 3215807061 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Adobe_Brick_N.png" /* tag 2960, version 862119224 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0018/Brick_Wall_Brown.mdl b/Assets/Material/material_0018/Brick_Wall_Brown.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f6ddd7aaa29049447db737c92ee4a0a3869c60b8 --- /dev/null +++ b/Assets/Material/material_0018/Brick_Wall_Brown.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Brick_Wall_Brown(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Brick_Wall_Brown_BaseColor.png" /* tag 2739, version 3703676365 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 0.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Brick_Wall_Brown_ORM.png" /* tag 2741, version 397003005 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Brick_Wall_Brown_N.png" /* tag 2743, version 2285331857 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0021/Concrete_Formed.mdl b/Assets/Material/material_0021/Concrete_Formed.mdl new file mode 100644 index 0000000000000000000000000000000000000000..5d7eb8cf55f34887cf1e1068b08611e90a10ae6a --- /dev/null +++ b/Assets/Material/material_0021/Concrete_Formed.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Concrete_Formed(*) + = OmniPBR( + diffuse_color_constant: color(1.0, 1.0, 1.0), + diffuse_texture: texture_2d("./Concrete_Formed_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.000000, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.000000, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Concrete_Formed_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(0.0, 0.0, 0.0), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.0, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Concrete_Formed_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.3f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); \ No newline at end of file diff --git a/Assets/Material/material_0034/Bronze.mdl b/Assets/Material/material_0034/Bronze.mdl new file mode 100644 index 0000000000000000000000000000000000000000..c354a34f677c119e3e31f36e545e99cf1222aa1f --- /dev/null +++ b/Assets/Material/material_0034/Bronze.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Bronze(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Bronze_BaseColor.png" /* tag 2791, version 303717019 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.5f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Bronze_ORM.png" /* tag 2793, version 2682007639 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Bronze_N.png" /* tag 2795, version 2348578768 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0042/Metal_Door.mdl b/Assets/Material/material_0042/Metal_Door.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8f487cfc2c58a478eac4590d8afc78609a1caa85 --- /dev/null +++ b/Assets/Material/material_0042/Metal_Door.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Metal_Door(*) + = OmniPBR( + diffuse_color_constant: color(0.439, 0.5, 0.561), + diffuse_texture: texture_2d(), //"./Metal_Door/Metal_Door_BaseColor.png", ::tex::gamma_srgb + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5, + reflection_roughness_texture_influence: 0.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 1.0, + metallic_texture_influence: 0.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: false, + ORM_texture: texture_2d(), //"./Metal_Door/Metal_Door_ORM.png", ::tex::gamma_linear + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(0.0, 0.0, 0.0), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.0, + bump_factor: 0.7f, + normalmap_texture: texture_2d("./Metal_Door_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.3f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0045/Silver.mdl b/Assets/Material/material_0045/Silver.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f5cd73e137b783f99318a03fab671b8fbb7daf3b --- /dev/null +++ b/Assets/Material/material_0045/Silver.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Silver(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Silver_BaseColor.png" /* tag 2812, version 2041580364 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.5f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Silver_ORM.png" /* tag 2814, version 2252362237 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Silver_N.png" /* tag 2816, version 3701140404 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0046/Steel_Blued.mdl b/Assets/Material/material_0046/Steel_Blued.mdl new file mode 100644 index 0000000000000000000000000000000000000000..eeb890f643ba28f52457acc91d7f842c70661a51 --- /dev/null +++ b/Assets/Material/material_0046/Steel_Blued.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Steel_Blued(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Steel_Blued_BaseColor.png" /* tag 2750, version 1941569663 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 0.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 0.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Steel_Blued_ORM.png" /* tag 2754, version 2522242520 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Steel_Blued_N.png" /* tag 2752, version 1947397307 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0049/Steel_Stainless.mdl b/Assets/Material/material_0049/Steel_Stainless.mdl new file mode 100644 index 0000000000000000000000000000000000000000..b3aa5e11abc84722efacaa37689d74d3c21cce9a --- /dev/null +++ b/Assets/Material/material_0049/Steel_Stainless.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Steel_Stainless(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Steel_Stainless_BaseColor.png" /* tag 3107, version 2706352012 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Steel_Stainless_ORM.png" /* tag 3109, version 880241343 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Steel_Stainless_N.png" /* tag 3111, version 1659240673 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0055/Paint_Satin.mdl b/Assets/Material/material_0055/Paint_Satin.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8b333555a9ec6fc57d7f1176427119700572b06d --- /dev/null +++ b/Assets/Material/material_0055/Paint_Satin.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Paint_Satin(*) + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Paint_Satin_Finish_BaseColor.png" /* tag 2101, version 1315023839 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 0.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Paint_Satin_Finish_ORM.png" /* tag 2103, version 621268788 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Paint_Satin_Finish_N.png" /* tag 2105, version 368198679 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0060/Grass_Cut.mdl b/Assets/Material/material_0060/Grass_Cut.mdl new file mode 100644 index 0000000000000000000000000000000000000000..5cd11f2040745f8f71177c7a2573c8c609890375 --- /dev/null +++ b/Assets/Material/material_0060/Grass_Cut.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Grass_Cut(*) + = OmniPBR( + diffuse_color_constant: color(1.0, 1.0, 1.0), + diffuse_texture: texture_2d("./Grass_Cut_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 1.0, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.0, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Grass_Cut_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(0.0, 0.0, 0.0), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.0, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Grass_Cut_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.3f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0064/Sand.mdl b/Assets/Material/material_0064/Sand.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a200b9cfec7c6e807c07160a8240593a0dfedfeb --- /dev/null +++ b/Assets/Material/material_0064/Sand.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Sand(*) + = OmniPBR( + diffuse_color_constant: color(0.500000, 0.500000, 0.500000), + diffuse_texture: texture_2d("./Sand_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.000000, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.000000, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Sand_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.000000, 1.000000, 1.000000), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.000000, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Sand_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0069/Rubber_Textured.mdl b/Assets/Material/material_0069/Rubber_Textured.mdl new file mode 100644 index 0000000000000000000000000000000000000000..d3e4ea84f724a594026be94335180d8a6cf2f94f --- /dev/null +++ b/Assets/Material/material_0069/Rubber_Textured.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +using ::OmniPBR import OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Rubber_Textured(*) + = OmniPBR( + diffuse_color_constant: color(0.500000, 0.500000, 0.500000), + diffuse_texture: texture_2d("./Rubber_Textured_BaseColor.png", ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.000000, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.000000, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Rubber_Textured_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.000000, 1.000000, 1.000000), + emissive_mask_texture: texture_2d(), + emissive_intensity: 0.000000, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Rubber_Textured_Normal.png", ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0084/Marble_Smooth.mdl b/Assets/Material/material_0084/Marble_Smooth.mdl new file mode 100644 index 0000000000000000000000000000000000000000..0d4d1260a58e43a1a118ad035979bfa3cb672e0c --- /dev/null +++ b/Assets/Material/material_0084/Marble_Smooth.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Marble_Smooth(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Marble_Smooth_BaseColor.png" /* tag 2791, version 1295500887 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Marble_Smooth_ORM.png" /* tag 2793, version 1362976242 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Marble_Smooth_N.png" /* tag 2795, version 4147619283 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0096/Terracotta.mdl b/Assets/Material/material_0096/Terracotta.mdl new file mode 100644 index 0000000000000000000000000000000000000000..b95f66a552b6e3defbf38384b6347a650cf23983 --- /dev/null +++ b/Assets/Material/material_0096/Terracotta.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Terracotta(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Terracotta_BaseColor.png" /* tag 2819, version 3314107828 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Terracotta_ORM.png" /* tag 2821, version 1819114335 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(0.f, 0.f, 0.f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Terracotta_N.png" /* tag 2823, version 1467847953 */, ::tex::gamma_linear), + detail_bump_factor: 0.3f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0103/Linen_Beige.mdl b/Assets/Material/material_0103/Linen_Beige.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8db363c4c690f6a4a2586607d4bf9c765ce5acf9 --- /dev/null +++ b/Assets/Material/material_0103/Linen_Beige.mdl @@ -0,0 +1,47 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Linen_Beige(*) + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Linen_Beige_BaseColor.png" /* tag 2956, version 3373013613 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Linen_Beige_ORM.png", ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Linen_Beige_N.png", ::tex::gamma_linear), + detail_bump_factor: 1.0f, + detail_normalmap_texture: texture_2d("./Linen_Beige_DN.png", ::tex::gamma_linear), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: float2(10.f,10.f)); diff --git a/Assets/Material/material_0106/Cardboard.mdl b/Assets/Material/material_0106/Cardboard.mdl new file mode 100644 index 0000000000000000000000000000000000000000..db9e203f086812ef0b2270205c1aa9c5fabc4c97 --- /dev/null +++ b/Assets/Material/material_0106/Cardboard.mdl @@ -0,0 +1,42 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::tex::gamma_mode; +import ::state::normal; + +export material Cardboard(*) + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Cardboard_BaseColor.png" /* tag 2156, version 3084118474 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.5f, + metallic_texture_influence: 1.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Cardboard_ORM.png" /* tag 2158, version 356350774 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Cardboard_N.png" /* tag 2160, version 818451772 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0113/Bamboo.mdl b/Assets/Material/material_0113/Bamboo.mdl new file mode 100644 index 0000000000000000000000000000000000000000..fecf0d7bf9def52b6b3d29322bcf4c0b6ca23eb3 --- /dev/null +++ b/Assets/Material/material_0113/Bamboo.mdl @@ -0,0 +1,54 @@ +mdl 1.4; + +import ::OmniPBR::OmniPBR; +import ::anno::author; +import ::anno::description; +import ::anno::display_name; +import ::anno::key_words; +import ::anno::version; +import ::tex::gamma_mode; +import ::state::normal; + +export material Bamboo(*) +[[ + ::anno::display_name("Omni PBR "), + ::anno::description("Omni PBR, supports ORM textures"), + ::anno::version(1, 0, 0, ""), + ::anno::author("NVIDIA CORPORATION"), + ::anno::key_words(string[]("omni", "PBR", "omniverse", "generic")) +]] + = ::OmniPBR::OmniPBR( + diffuse_color_constant: color(0.200000003f, 0.200000003f, 0.200000003f), + diffuse_texture: texture_2d("./Bamboo_BaseColor.png" /* tag 2739, version 3703676365 */, ::tex::gamma_srgb), + albedo_desaturation: 0.f, + albedo_add: 0.f, + albedo_brightness: 1.f, + diffuse_tint: color(1.f, 1.f, 1.f), + reflection_roughness_constant: 0.5f, + reflection_roughness_texture_influence: 1.f, + reflectionroughness_texture: texture_2d(), + metallic_constant: 0.f, + metallic_texture_influence: 0.f, + metallic_texture: texture_2d(), + specular_level: 0.5f, + enable_ORM_texture: true, + ORM_texture: texture_2d("./Bamboo_ORM.png" /* tag 2741, version 397003005 */, ::tex::gamma_linear), + ao_to_diffuse: 0.f, + ao_texture: texture_2d(), + enable_emission: false, + emissive_color: color(1.f, 0.100000001f, 0.100000001f), + emissive_mask_texture: texture_2d(), + emissive_intensity: 40.f, + bump_factor: 1.f, + normalmap_texture: texture_2d("./Bamboo_N.png" /* tag 2743, version 273550734 */, ::tex::gamma_linear), + detail_bump_factor: 0.300000012f, + detail_normalmap_texture: texture_2d(), + project_uvw: false, + world_or_object: false, + uv_space_index: 0, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.f, + detail_texture_translate: 0.f, + detail_texture_rotate: 0.f, + detail_texture_scale: 1.f); diff --git a/Assets/Material/material_0142/Carpaint_03.mdl b/Assets/Material/material_0142/Carpaint_03.mdl new file mode 100644 index 0000000000000000000000000000000000000000..fe3c1050c7b988b007439071b216df73ac1317fc --- /dev/null +++ b/Assets/Material/material_0142/Carpaint_03.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Carpaint_03(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(8.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d(), + diffuse_reflection_color: color(0.694117665f, 0.137254909f, 0.f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d(), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d(), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d(), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(1.f), + normal_image: texture_2d(), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(0.5f, 0.499996483f, 0.499995023f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d("./noise_scratch2.png", ::tex::gamma_default, ""), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.0599999987f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_2, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.0899999961f, + flakes_density: 0.280000001f, + flakes_spread: 0.150000006f, + flake_roughness: 0.25f); diff --git a/Assets/Material/material_0149/Carpaint_10.mdl b/Assets/Material/material_0149/Carpaint_10.mdl new file mode 100644 index 0000000000000000000000000000000000000000..2059081160d596ed0b4aca14347a783e135df5be --- /dev/null +++ b/Assets/Material/material_0149/Carpaint_10.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Carpaint_10(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(8.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d(), + diffuse_reflection_color: color(0.0941176489f, 0.137254909f, 0.0823529437f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d(), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d(), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d(), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(1.f, 0.5f), + normal_image: texture_2d(), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(0.499996006f, 0.5f, 0.499994993f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d("./noise_scratch2.png", ::tex::gamma_default, ""), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.0599999987f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_2, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.0899999961f, + flakes_density: 0.280000001f, + flakes_spread: 0.150000006f, + flake_roughness: 0.25f); diff --git a/Assets/Material/material_0151/Carpaint_Metallic_02.mdl b/Assets/Material/material_0151/Carpaint_Metallic_02.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a503b52add16ff98100027d31fd7b17a74b95745 --- /dev/null +++ b/Assets/Material/material_0151/Carpaint_Metallic_02.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Carpaint_Metallic_02(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(8.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d(), + diffuse_reflection_color: color(1.f, 0.999997556f, 0.999989986f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d(), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 1.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d(), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d(), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.f, 0.400000006f), + normal_image: texture_2d(), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(0.234323442f, 0.032480482f, 0.032480482f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d("./noise_scratch2.png", ::tex::gamma_default, ""), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.0599999987f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_2, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.0899999961f, + flakes_density: 0.280000001f, + flakes_spread: 0.150000006f, + flake_roughness: 0.25f); diff --git a/Assets/Material/material_0158/Carpaint_Metallic_09.mdl b/Assets/Material/material_0158/Carpaint_Metallic_09.mdl new file mode 100644 index 0000000000000000000000000000000000000000..2584312dfcabee59d1fa732b35edd76eff0c610c --- /dev/null +++ b/Assets/Material/material_0158/Carpaint_Metallic_09.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Carpaint_Metallic_09(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(8.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d(), + diffuse_reflection_color: color(0.999989986f, 1.f, 0.999998987f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d(), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 1.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d(), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d(), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.f, 0.400000006f), + normal_image: texture_2d(), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(0.399339914f, 0.133204028f, 0.0197692961f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d("./noise_scratch2.png", ::tex::gamma_default, ""), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.0599999987f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_2, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.0899999961f, + flakes_density: 0.280000001f, + flakes_spread: 0.150000006f, + flake_roughness: 0.25f); diff --git a/Assets/Material/material_0189/Leather_Grain_02.mdl b/Assets/Material/material_0189/Leather_Grain_02.mdl new file mode 100644 index 0000000000000000000000000000000000000000..1abb697ea01fa445acd82f7134baaa8bf145e7ba --- /dev/null +++ b/Assets/Material/material_0189/Leather_Grain_02.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Leather_Grain_02(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(2.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(0.075000003f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(0.5f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_leather_b_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(0.524752498f, 0.0329052843f, 0.0329052843f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_leather_e_01_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_leather_e_01_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_leather_b_01_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(1.f, 0.75f), + normal_image: texture_2d("./ov_leather_b_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: true, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d("./leather_blend_mask_04.png", ::tex::gamma_linear, ""), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.5f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d("./ov_leather_b_01_basecolor.png", ::tex::gamma_default, ""), + layer_1_diffuse_reflection_color: color(0.257425725f, 0.0220893342f, 0.0220893342f), + layer_1_base_color_offset: 0.560000002f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d("./ov_leather_b_01_orm.png", ::tex::gamma_default, ""), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d("./ov_leather_b_01_orm.png", ::tex::gamma_default, ""), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d("./ov_leather_b_01_orm.png", ::tex::gamma_default, ""), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.75f, 0.5f), + layer_1_normal_image: texture_2d("./ov_leather_b_01_normal.png", ::tex::gamma_linear, ""), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: true, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_2, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d("./ov_clouds_01_normal.png", ::tex::gamma_linear, ""), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0210/Metal_Ceramic_Brakes_Golden.mdl b/Assets/Material/material_0210/Metal_Ceramic_Brakes_Golden.mdl new file mode 100644 index 0000000000000000000000000000000000000000..7c99449ce3b27c83fe0c9b273b1b9e081b50c2e7 --- /dev/null +++ b/Assets/Material/material_0210/Metal_Ceramic_Brakes_Golden.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Metal_Ceramic_Brakes_Golden(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(1.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_metal_a_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(0.48184818f, 0.311281115f, 0.232177675f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_metal_a_01_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 1.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_metal_a_01_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_metal_a_01_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.349999994f, 0.25f), + normal_image: texture_2d("./ov_metal_a_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.949999988f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0230/Koenigsegg_Emblem_Metal_Logo_Clearcoat.mdl b/Assets/Material/material_0230/Koenigsegg_Emblem_Metal_Logo_Clearcoat.mdl new file mode 100644 index 0000000000000000000000000000000000000000..61c727e82b7321c76c954ce653225414821ed409 --- /dev/null +++ b/Assets/Material/material_0230/Koenigsegg_Emblem_Metal_Logo_Clearcoat.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Koenigsegg_Emblem_Metal_Logo_Clearcoat(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(1.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_car_K_emblem_metal_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(0.5f, 0.499994993f, 0.499994993f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_car_K_emblem_metal_01_metallic.png", ::tex::gamma_srgb, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 1.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_car_K_emblem_metal_01_ambientOcclusion.png", ::tex::gamma_default, ""), + cavity_channel: Templates::OmniUber_Automotive::rgb, + roughness_image: texture_2d("./ov_car_K_emblem_metal_01_roughness.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::rgb, + roughness_u: 1.f, + roughness_range_position: float2(0.5f, 0.349999994f), + normal_image: texture_2d("./ov_car_K_emblem_metal_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: false, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_1, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.0599999987f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.199999988f, + flakes_density: 0.329999983f, + flakes_spread: 0.199999988f, + flake_roughness: 0.119999997f); diff --git a/Assets/Material/material_0238/Plastic_Pattern_Dot_01.mdl b/Assets/Material/material_0238/Plastic_Pattern_Dot_01.mdl new file mode 100644 index 0000000000000000000000000000000000000000..8b70d78427e984fda4ee2ca76b2d79e2e8352902 --- /dev/null +++ b/Assets/Material/material_0238/Plastic_Pattern_Dot_01.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Plastic_Pattern_Dot_01(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(2.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(0.0500000007f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(0.5f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_plastic_pattern_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(0.0941176489f, 0.0941176489f, 0.0941176489f), + base_color_scale: 1.f, + base_color_offset: 0.170000002f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(1.f, 0.779999971f), + normal_image: texture_2d("./ov_plastic_pattern_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: true, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_3, + layer_1_blend_splatmap: texture_2d("./leather_blend_mask_04.png", ::tex::gamma_linear, ""), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 1.f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d("./ov_plastic_pattern_01_basecolor.png", ::tex::gamma_default, ""), + layer_1_diffuse_reflection_color: color(0.0924092531f, 0.092408672f, 0.0924083292f), + layer_1_base_color_offset: 0.189999998f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_default, ""), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_default, ""), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d("./ov_plastic_pattern_01_orm.png", ::tex::gamma_default, ""), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.850000024f, 0.699999988f), + layer_1_normal_image: texture_2d("./ov_plastic_pattern_01_normal.png", ::tex::gamma_linear, ""), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: true, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_2, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d("./ov_clouds_01_normal.png", ::tex::gamma_linear, ""), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0243/Reflectors_01_Glow_White.mdl b/Assets/Material/material_0243/Reflectors_01_Glow_White.mdl new file mode 100644 index 0000000000000000000000000000000000000000..50421f1ff8c95257c8047e550a70a0d29fe92bb2 --- /dev/null +++ b/Assets/Material/material_0243/Reflectors_01_Glow_White.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Reflectors_01_Glow_White(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.f, + uvs_mode_02: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_02: float2(1.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.f, + uvs_mode_03: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.f, + uvs_mode_04: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_reflectors_pattern_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(1.f, 0.99999094f, 0.999989986f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_reflectors_pattern_01_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.5f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_reflectors_pattern_01_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_reflectors_pattern_01_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.f, 0.125f), + normal_image: texture_2d("./ov_reflectors_pattern_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.949999988f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: true, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d("./ov_reflectors_pattern_01_mask.png", ::tex::gamma_srgb, ""), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 60000.f, + emission_color: color(0.366391122f, 0.571865916f, 0.798679888f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0256/Rim_Carpaint_Rose_Gold.mdl b/Assets/Material/material_0256/Rim_Carpaint_Rose_Gold.mdl new file mode 100644 index 0000000000000000000000000000000000000000..24f369508a593b0035f3a5f696ce6498cd8d7060 --- /dev/null +++ b/Assets/Material/material_0256/Rim_Carpaint_Rose_Gold.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Rim_Carpaint_Rose_Gold(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(8.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d(), + diffuse_reflection_color: color(0.999989986f, 1.f, 0.999999225f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d(), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 1.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d(), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d(), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.f, 0.400000006f), + normal_image: texture_2d(), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(1.f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: false, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d(), + detail_normal_flip_green: true, + detail_normal_scale: 1.f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: true, + coat_color: color(0.772277236f, 0.473011315f, 0.321144998f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d("./noise_scratch2.png", ::tex::gamma_default, ""), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.359999985f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_2, + enable_flakes: true, + flake_color: color(1.f, 0.999989986f, 0.999989986f), + flake_size: 0.319999993f, + flakes_density: 0.459999979f, + flakes_spread: 0.569999993f, + flake_roughness: 0.25f); diff --git a/Assets/Material/material_0273/Tire_Supercar_03.mdl b/Assets/Material/material_0273/Tire_Supercar_03.mdl new file mode 100644 index 0000000000000000000000000000000000000000..0734151b0f180f140cadab44cf69ab94cf6d690a --- /dev/null +++ b/Assets/Material/material_0273/Tire_Supercar_03.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Tire_Supercar_03(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::texture_coord_0, + uv_scale_01: float2(1.f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.5f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(1.f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_tire_rubber_trim_sports_02_basecolor.png", ::tex::gamma_srgb, ""), + diffuse_reflection_color: color(0.999996841f, 1.f, 0.999989986f), + base_color_scale: 1.f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_tire_rubber_trim_sports_02_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_tire_rubber_trim_sports_02_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_tire_rubber_trim_sports_02_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.75f, 0.550000012f), + normal_image: texture_2d("./ov_tire_rubber_trim_sports_02_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.949999988f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: true, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_2, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d("./ov_clouds_01_normal.png", ::tex::gamma_linear, ""), + detail_normal_flip_green: true, + detail_normal_scale: 0.5f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0281/Wood_Grain_Raw_03.mdl b/Assets/Material/material_0281/Wood_Grain_Raw_03.mdl new file mode 100644 index 0000000000000000000000000000000000000000..cb7e22150a2d0b36bdf49e89ca1aae6b8ba87e86 --- /dev/null +++ b/Assets/Material/material_0281/Wood_Grain_Raw_03.mdl @@ -0,0 +1,177 @@ +mdl 1.8; + +import ::state::normal; +import ::OmniSurface::OmniShared::emission_mode; +import ..::Templates::OmniUber_Automotive::*; +import ::tex::gamma_mode; + +export material Wood_Grain_Raw_03(*) + = Templates::OmniUber_Automotive::OmniUber_Automotive( + uvs_mode_01: Templates::OmniUber_Automotive::triplanar, + uv_scale_01: float2(2.5f), + uv_offset_01: float2(0.f), + uv_offset_time_01: float2(0.f), + uv_rotation_01: 0.f, + triplanar_blend_range_01: 0.f, + uvs_mode_02: Templates::OmniUber_Automotive::triplanar, + uv_scale_02: float2(0.0500000007f), + uv_offset_02: float2(0.f), + uv_offset_time_02: float2(0.f), + uv_rotation_02: 0.f, + triplanar_blend_range_02: 0.5f, + uvs_mode_03: Templates::OmniUber_Automotive::triplanar, + uv_scale_03: float2(1.f), + uv_offset_03: float2(0.f), + uv_offset_time_03: float2(0.f), + uv_rotation_03: 0.f, + triplanar_blend_range_03: 0.5f, + uvs_mode_04: Templates::OmniUber_Automotive::triplanar, + uv_scale_04: float2(1.f), + uv_offset_04: float2(0.f), + uv_offset_time_04: float2(0.f), + uv_rotation_04: 0.f, + triplanar_blend_range_04: 0.5f, + enable_opacity: false, + uv_set_opacity: Templates::OmniUber_Automotive::uv_set_1, + opacity_image: texture_2d(), + opacity_channel: Templates::OmniUber_Automotive::a, + geometry_opacity_threshold: 0.150000006f, + uv_set_layer_0: Templates::OmniUber_Automotive::uv_set_1, + base_color_image: texture_2d("./ov_wood_grain_c_01_basecolor.png", ::tex::gamma_default, ""), + diffuse_reflection_color: color(1.f, 0.999989986f, 0.999989986f), + base_color_scale: 1.44999993f, + base_color_offset: 0.f, + base_color_desaturation: 0.f, + metalness_image: texture_2d("./ov_wood_grain_c_01_orm.png", ::tex::gamma_linear, ""), + metalness_channel: Templates::OmniUber_Automotive::b, + metalness: 0.f, + specular_reflection_weight: 1.f, + specular_reflection_color: color(1.f, 1.f, 1.f), + cavity_image: texture_2d("./ov_wood_grain_c_01_orm.png", ::tex::gamma_linear, ""), + cavity_channel: Templates::OmniUber_Automotive::r, + roughness_image: texture_2d("./ov_wood_grain_c_01_orm.png", ::tex::gamma_default, ""), + roughness_channel: Templates::OmniUber_Automotive::g, + roughness_u: 1.f, + roughness_range_position: float2(0.850000024f, 0.649999976f), + normal_image: texture_2d("./ov_wood_grain_c_01_normal.png", ::tex::gamma_linear, ""), + normal_flip_green: true, + normal_scale: 1.f, + enable_layer_1: false, + layer_1_order: Templates::OmniUber_Automotive::above, + layer_1_blend_source: Templates::OmniUber_Automotive::texture, + layer_1_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_splatmap: texture_2d(), + layer_1_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_direction: float3(0.f, 1.f, 0.f), + layer_1_blend_axis: Templates::OmniUber_Automotive::y, + layer_1_blend_object_space: true, + layer_1_blend_scale: 1.f, + layer_1_blend_offset: 0.f, + layer_1_blend_primvar_name: "", + layer_1_uv_set_detail: Templates::OmniUber_Automotive::uv_set_1, + layer_1_blend_detail_image: texture_2d(), + layer_1_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_1_blend_threshold: 0.330000013f, + layer_1_blend_factor_override: 0.f, + uv_set_layer_1: Templates::OmniUber_Automotive::uv_set_1, + layer_1_base_color_image: texture_2d(), + layer_1_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_1_base_color_offset: 0.f, + layer_1_base_color_scale: 1.f, + layer_1_base_color_desaturation: 0.f, + layer_1_metalness_image: texture_2d(), + layer_1_metalness_channel: Templates::OmniUber_Automotive::b, + layer_1_metalness: 1.f, + layer_1_specular_reflection_weight: 1.f, + layer_1_cavity_image: texture_2d(), + layer_1_cavity_channel: Templates::OmniUber_Automotive::r, + layer_1_roughness_image: texture_2d(), + layer_1_roughness_channel: Templates::OmniUber_Automotive::g, + layer_1_roughness_u: 1.f, + layer_1_roughness_range_position: float2(0.949999988f, 0.5f), + layer_1_normal_image: texture_2d(), + layer_1_normal_flip_green: true, + layer_1_normal_scale: 1.f, + enable_layer_2: false, + layer_2_order: Templates::OmniUber_Automotive::above, + layer_2_blend_source: Templates::OmniUber_Automotive::texture, + layer_2_uv_set_blend_factor: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_splatmap: texture_2d(), + layer_2_blend_splatmap_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_direction: float3(0.f, 1.f, 0.f), + layer_2_blend_axis: Templates::OmniUber_Automotive::y, + layer_2_blend_object_space: true, + layer_2_blend_scale: 1.f, + layer_2_blend_offset: 0.f, + layer_2_blend_primvar_name: "", + layer_2_uv_set_detail: Templates::OmniUber_Automotive::uv_set_2, + layer_2_blend_detail_image: texture_2d(), + layer_2_blend_detail_image_channel: Templates::OmniUber_Automotive::r, + layer_2_blend_threshold: 0.330000013f, + layer_2_blend_factor_override: 0.f, + uv_set_layer_2: Templates::OmniUber_Automotive::uv_set_2, + layer_2_base_color_image: texture_2d(), + layer_2_diffuse_reflection_color: color(1.f, 1.f, 1.f), + layer_2_base_color_offset: 0.f, + layer_2_base_color_scale: 1.f, + layer_2_base_color_desaturation: 0.f, + layer_2_metalness_image: texture_2d(), + layer_2_metalness_channel: Templates::OmniUber_Automotive::b, + layer_2_metalness: 1.f, + layer_2_specular_reflection_weight: 1.f, + layer_2_cavity_image: texture_2d(), + layer_2_cavity_channel: Templates::OmniUber_Automotive::r, + layer_2_roughness_image: texture_2d(), + layer_2_roughness_channel: Templates::OmniUber_Automotive::g, + layer_2_roughness_u: 1.f, + layer_2_roughness_range_position: float2(1.f, 0.5f), + layer_2_normal_image: texture_2d(), + layer_2_normal_flip_green: true, + layer_2_normal_scale: 1.f, + enable_anisotropy: false, + uv_set_anisotropy: Templates::OmniUber_Automotive::uv_set_1, + anisotropic_roughness_u: 1.f, + anisotropic_roughness_v: 0.25f, + anisotropic_direction_image: texture_2d(), + anisotropic_direction_channel: Templates::OmniUber_Automotive::r, + anisotropic_direction: 0.f, + enable_detail_normal: true, + uv_set_detail_normal: Templates::OmniUber_Automotive::uv_set_2, + uv_set_detail_weight: Templates::OmniUber_Automotive::uv_set_1, + detail_normal_image: texture_2d("./ov_clouds_01_normal.png", ::tex::gamma_linear, ""), + detail_normal_flip_green: true, + detail_normal_scale: 0.5f, + detail_normal_weight_image: texture_2d(), + detail_normal_weight_channel: Templates::OmniUber_Automotive::r, + enable_emission: false, + uv_set_emission: Templates::OmniUber_Automotive::uv_set_1, + uv_set_emission_mask: Templates::OmniUber_Automotive::uv_set_1, + emission_image: texture_2d(), + emission_mask_image: texture_2d(), + emission_mode: OmniSurface::OmniShared::emission_lx, + emission_intensity: 1.f, + emission_color: color(1.f, 1.f, 1.f), + emission_use_temperature: false, + emission_temperature: 6500.f, + enable_coat: false, + coat_color: color(1.f, 1.f, 1.f), + coat_mask_image: texture_2d(), + coat_mask_channel: Templates::OmniUber_Automotive::r, + coat_roughness_image: texture_2d(), + coat_roughness_channel: Templates::OmniUber_Automotive::r, + coat_roughness: 0.f, + coat_ior: 1.60000002f, + coat_anisotropy: 0.f, + coat_anisotropy_rotation: 0.f, + coat_affect_color: 0.f, + coat_affect_roughness: 0.f, + coat_normal_image: texture_2d(), + coat_normal_flip_green: true, + uv_set_coat_roughness_normal: Templates::OmniUber_Automotive::uv_set_1, + uv_set_coat_mask: Templates::OmniUber_Automotive::uv_set_1, + enable_flakes: false, + flake_color: color(1.f, 1.f, 1.f), + flake_size: 0.125f, + flakes_density: 0.25f, + flakes_spread: 0.150000006f, + flake_roughness: 0.0500000007f); diff --git a/Assets/Material/material_0290/Fabric_Carpet_Long_Floor.mdl b/Assets/Material/material_0290/Fabric_Carpet_Long_Floor.mdl new file mode 100644 index 0000000000000000000000000000000000000000..e69e85fbb9a1b480e445f514497f9ff1fe7ba490 --- /dev/null +++ b/Assets/Material/material_0290/Fabric_Carpet_Long_Floor.mdl @@ -0,0 +1,490 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.4; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A floor carpet material with long hair fibers."; + + + +float remap(float input, float low, float high) +{ + //return low + input * (high - low); + return ::math::lerp(low, high, input); +} + +float remap(float input, float low_1, float high_1, float low_2, float high_2) +{ + return low_2 + ((input - low_1) * (high_2 - low_2))/(high_1 - low_1); +} + + +float histogram_pos_range(float input, float range, float position) +{ + float range_half = range/2.0; + float subtract_low = (position + range_half) > 1.0 ? (position + range/2.0) - 1.0 : 0.0; + float low = position - range_half - subtract_low; + + float add_high = (position - range_half) < 0.0 ? ::math::abs(position - range_half) : 0.0; + float high = position + range_half + add_high; + return remap(input, low, high); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + +float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + ::state::normal()*1.0); +} + +float3 normalmap_normal( + uniform texture_2d texture, + float factor = 1.0, + ::base::texture_coordinate_info uvw = ::base::texture_coordinate_info() +) +{ + float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - 0.5) * (factor * 2.0); + return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + ::state::normal()); +} + + +export material Fabric_Carpet_Long_Floor( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables the infinite tiling feature which removes artifacts of repeating texture patterns."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance") + ]], + color carpet_color = color(1.f, 1.f, 1.f) [[ + ::anno::description("Adjusts the overall color of the carpet."), + ::anno::display_name("Carpet Color"), + ::anno::in_group("Appearance") + ]], + float ao_amount = 0.5f [[ + ::anno::description("Produces a more contrasted appearance while also darkening the overall appearance."), + ::anno::display_name("Carpet Contrast"), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float carpet_bump_factor = 1.f [[ + ::anno::description("Adjusts the bump factor of the material."), + ::anno::display_name("Carpet Bump Factor"), + ::anno::soft_range(0.0, 1.0), + ::anno::in_group("Appearance") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::display_name("Translate"), + ::anno::description("Offsets the position of the material."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates the material."), + ::anno::display_name("Rotate"), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.0f [[ + ::anno::description("Scales the material."), + ::anno::display_name("Scale"), + ::nvidia::core_definitions::dimension(float2(1.0, 1.0)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Use selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Advanced") + ]]) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Natural"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "natural", "neutral")) +]] + = + let { + bool tmp0 = false; + + float2 corrected_scale = 0.33 * texture_scale; + + material_surface tmp1( + ::df::custom_curve_layer(0.0780000016f, 0.606000006f, 5.f, ::math::pow(::math::clamp(remap(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, 0.653000057f, 0.f, 1.f), 0.f, 1.f), 2.20000005f), ::df::microfacet_ggx_smith_bsdf(histogram_pos_range(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68599999f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.830000043f, 0.745000064f) * histogram_pos_range(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68599999f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.830000043f, 0.745000064f), histogram_pos_range(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68599999f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.830000043f, 0.745000064f) * histogram_pos_range(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68599999f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.830000043f, 0.745000064f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::diffuse_reflection_bsdf(::nvidia::core_definitions::blend_colors(::nvidia::core_definitions::blend_colors(carpet_color, infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_diff.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.596000016f, 0.549000025f, 0.493999988f), 8.f, true) : ::base::file_texture(texture_2d("./long_floor_carpet_diff.jpg", ::tex::gamma_srgb), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint, ::base::color_layer_multiply, 1.f).tint, color(::math::pow(::math::clamp(remap(float3(infinite_tiling ? endless_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.838999987f, 0.68599999f, 1.f), 8.f, false) : ::base::file_texture(texture_2d("./long_floor_carpet_multi_R_rough_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 1.f, 0.736000061f, ::math::lerp(1.f, 0.349999994f, ao_amount), 1.f), 0.f, 1.f), 2.20000005f)), ::base::color_layer_multiply, 1.f).tint, 0.f, ""), ::state::normal()), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + infinite_tiling ? endless_normal(texture_2d("./long_floor_carpet_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.5f, 0.5f, 1.f), 8.f) : normalmap_normal(texture_2d("./long_floor_carpet_norm.jpg", ::tex::gamma_linear), ::math::lerp(0.f, 0.699999988f, carpet_bump_factor), vmat_transform(texture_translate, texture_rotate, corrected_scale, ::base::texture_coordinate_uvw, uv_space_index))); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + +export material Fabric_Carpet_Long_Floor_Blue(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Blue"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Blue.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "blue", "cool")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.160444f, 0.547994f, .9f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0, + uv_space_index: 0 +); + +export material Fabric_Carpet_Long_Floor_Rose(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Rose"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Rose.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "rose", "warm")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.744530f, 0.378676f, 0.715465f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0, + uv_space_index: 0 +); + + +export material Fabric_Carpet_Long_Floor_Light_Green(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Light Green"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Light_Green.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "green", "light")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.505432f, 0.827726f, 0.133209f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Fabric_Carpet_Long_Floor_Yellow(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Yellow"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Yellow.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "yellow", "warm")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.907547f, 0.907547f, 0.180144f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Fabric_Carpet_Long_Floor_Orange(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Orange"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Orange.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "orange", "warm")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.907547f, 0.293216f, 0.084642f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Fabric_Carpet_Long_Floor_Green(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Green"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Green.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "green")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.267358f, 0.464741f, 0.051122f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Fabric_Carpet_Long_Floor_Bordeaux(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Long Floor Carpet - Bordeaux"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Fabric_Carpet_Long_Floor.Fabric_Carpet_Long_Floor_Bordeaux.png"), + ::anno::key_words(string[]("carpet", "floor", "interior", "soft", "fabric", "long", "bordeaux", "red", "warm")) +]] + = Fabric_Carpet_Long_Floor( + infinite_tiling: true, + carpet_color: color(0.618686f, 0.017936f, 0.141980f), + ao_amount: 0.8f, + carpet_bump_factor: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + diff --git a/Assets/Material/material_0327/Felt_Plain.mdl b/Assets/Material/material_0327/Felt_Plain.mdl new file mode 100644 index 0000000000000000000000000000000000000000..45783fcd041dd005261e869401cdefa17f46ddf6 --- /dev/null +++ b/Assets/Material/material_0327/Felt_Plain.mdl @@ -0,0 +1,1480 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.4; +import ::df::*; +import ::base::*; +import ::anno::*; +import ::math::*; +import ::tex::*; +import ::nvidia::core_definitions::*; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +annotation preview_scale( float f); + +uniform float4x4 rotation_translation_scale( + uniform float3 rotation = float3(0.) + [[ ::anno::description("Rotation applied to every UVW coordinate.") ]], + uniform float3 translation = float3(0.) + [[ ::anno::description("Offset applied to every UVW coordinate.") ]], + uniform float3 scaling = float3(1.) + [[ ::anno::description("Scale applied to every UVW coordinate.") ]] +) +[[ + ::anno::description("Construct transformation matrix from Euler rotation, translation and scale."), + ::anno::hidden() +]] +{ + float4x4 scale = + float4x4(scaling.x , 0. , 0. , 0., + 0. , scaling.y , 0. , 0., + 0. , 0. , scaling.z , 0., + translation.x, translation.y, translation.z, 1.); + + float3 s = ::math::sin(rotation); + float3 c = ::math::cos(rotation); + float4x4 rotate = + float4x4( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , 0.0, + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , 0.0, + -s.y , s.x*c.y , c.x*c.y , 0.0, + 0. , 0 , 0 , 1.); + + return scale*rotate; +} + + + +export material Felt_Plain ( + color base_color = color(0.034230f, 0.373615f, 0.058187f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0f + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15f + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0f, 1.0f), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::preview_scale(1.8f), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Tournament Green"), + ::anno::description("Felt template material from which all the other presets are derived."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "red", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Plain.png"), + ::anno::hidden(), + ::anno::copyright_notice(COPYRIGHT) +]] = let +{ + // Felt Texture, the texture of the felt material + uniform texture_2d felt_texture = texture_2d("./felt_white_diff.jpg", ::tex::gamma_srgb); + + // Fuzz Texture + uniform texture_2d felt_fuzz_texture = texture_2d("./felt_fuzz_mask.jpg", ::tex::gamma_srgb); + + + + ::base::texture_coordinate_info uvw = ::base::coordinate_source( + coordinate_system: ::base::texture_coordinate_uvw, + texture_space: uv_space_index + ); + + ::base::texture_coordinate_info transformed_uvw = ::base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(8.f/texture_scale.x, 8.f/texture_scale.y, 1.0), + rotation: float3(0.0, 0.0, texture_rotate/180.*::math::PI ), + translation: float3(texture_translate.x, texture_translate.y, 0.0) + ), + coordinate: uvw + ); + + + ::base::texture_return felt_texture_return = ::base::file_texture( + texture: felt_texture, + mono_source: ::base::mono_alpha, + uvw: transformed_uvw + ); + + ::base::texture_return fuzz_texture_return = ::base::file_texture( + texture: felt_fuzz_texture, + color_scale: color(fuzz_opacity * 0.5), + mono_source: ::base::mono_average, + uvw: transformed_uvw + ); + + ::base::texture_return tinted_felt_color = nvidia::core_definitions::blend_colors( + color_1: felt_texture_return.tint, + color_2: base_color, + mode: ::base::color_layer_multiply, + weight: 1.0 + ); + + + color felt_color = ::math::max(tinted_felt_color.tint, color((1.0-fill_dark_gaps) * 0.3) * base_color); + + + ::base::texture_return final_color = nvidia::core_definitions::blend_colors( + color_1: felt_color, + color_2: color(1.0, 1.0, 1.0), + mode: ::base::color_layer_blend, + weight: fuzz_texture_return.mono + ); + + + + float3 bump = ::nvidia::core_definitions::file_bump_texture( + texture: felt_texture, + bump_source: ::base::mono_average, + scaling: float2 ((8.f/texture_scale.x), (8.f/ texture_scale.y)), + translation: texture_translate, + rotation: texture_rotate, + clip: false, + factor: bump_strength, + texture_space: uv_space_index + ); + + bsdf diffuse = ::df::diffuse_reflection_bsdf ( + tint: final_color.tint + + ); + + bsdf base = ::df::custom_curve_layer( + weight: felt_texture_return.mono * .15f, + normal_reflectivity: 0.08, + grazing_reflectivity: 1.0, + exponent: 5.0, + base: diffuse, + layer: ::df::simple_glossy_bsdf( + roughness_u: .85, + tint: color(1.0, 1.0, 1.0) + ) + ); + + +} in material ( + surface: material_surface ( + scattering: base + ), + geometry: material_geometry( + normal: bump + ) +); + + + + +// Red +export material Felt_Mat_Red ( + color base_color = color(0.535642f, 0.007155f, 0.007155f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Red"), + ::anno::description("Felt template material from which all the other presets are derived."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "red", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Red.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + +// Burgundy +export material Felt_Mat_Burgundy ( + color base_color = color(0.464741f, 0.014311f, 0.038473f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Burgundy"), + ::anno::description("Felt template material from which all the other presets are derived."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "burgundy", "red", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Burgundy.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + +// Brick +export material Felt_Mat_Brick ( + color base_color = color(0.554227f, 0.061907f, 0.042987f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Brick"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "burgundy", "red", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Brick.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + +// Brown +export material Felt_Mat_Brown ( + color base_color = color(0.250840f, 0.071761f, 0.026549f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Brown"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "burgundy", "brown")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Brown.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + +// Taupe +export material Felt_Mat_Taupe ( + color base_color = color(0.197516f, 0.116576f, 0.091518) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Taupe"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "taupe", "brown")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Taupe.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + +// Golden +export material Felt_Mat_Golden ( + color base_color = color(0.701170f, 0.431340f, 0.091518f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Golden"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "golden", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Golden.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + + +// Khaki +export material Felt_Mat_Khaki ( + color base_color = color(0.487765f, 0.399293f, 0.242796f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Khaki"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "khaki", "brown")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Khaki.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + + + + +// Steel Gray +export material Felt_Mat_Steelgray ( + color base_color = color(0.271577f, 0.302125f, 0.311180f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Steel Gray"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "neutral", "gray", "steel")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Steelgray.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + +// Navy Blue +export material Felt_Mat_Navyblue ( + color base_color = color(0.008373f, 0.023104f, 0.119264f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Navy Blue"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "navy", "blue", "dark", "cool")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Navyblue.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + +export material Felt_Mat_Charcoal ( + color base_color = color(0.035614f, 0.039947f, 0.041452f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Charcoal"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "charcoal", "dark")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Charcoal.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + + +// Euro Blue +export material Felt_Mat_Euroblue ( + color base_color = color(0.011881f, 0.084642f, 0.632043f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Euro Blue"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "euro", "union", "cool", "blue", "saturated", "intense")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Euroblue.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + + +export material Felt_Mat_Electricblue ( + color base_color = color(0.089194f, 0.325037f, 0.875138f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Electric Blue"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "electric", "blue", "cool")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Electricblue.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + + + + +// Academy Blue +export material Felt_Mat_Academyblue ( + color base_color = color(0.007155f, 0.133209f, 0.535642f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Academy Blue"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "academy", "blue", "cool", "dark")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Academyblue.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + +// Black +export material Felt_Mat_Black ( + color base_color = color(0.08f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Black"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "black", "neutral", "dark")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Black.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + +// Dark Green +export material Felt_Mat_Darkgreen ( + color base_color = color(0.004560f, 0.106156f, 0.016068f) + [[ + ::anno::display_name("Base color"), + ::anno::description("The base color of the material."), + ::anno::in_group("Appearance") + ]], + float fill_dark_gaps = 1.0 + [[ + ::anno::display_name("Felt Contrast"), + ::anno::description("Specifies how string the strong the occlusion in the texture shows through."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float fuzz_opacity = 0.15 + [[ + ::anno::display_name("Fuzz Opacity"), + ::anno::soft_range(0.0, 1.0), + ::anno::description("The amount of fuzz visible on the felt material."), + ::anno::in_group("Appearance") + ]], + + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.0, 360.0), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the texture size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + + /* Advanced */ + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::hard_range(0,3), + ::anno::in_group("Advanced") + ]], + + uniform float bump_strength = 4.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::soft_range(0.0f, 5.0f), + ::anno::description("Controls the amount of the bump mapping effect."), + ::anno::in_group("Appearance") + ]] +) [[ + ::anno::display_name("Felt Dark Green"), + ::anno::description("A soft felt material that can have fuzz on top."), + ::anno::key_words (string[]("aec", "fabric", "felt", "fashion", "textile", "soft", "design", "fuzz", "green", "dark")), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Felt_Plain.Felt_Mat_Darkgreen.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Felt_Plain( + base_color: base_color, + fill_dark_gaps: fill_dark_gaps, + fuzz_opacity: fuzz_opacity, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + bump_strength: bump_strength +); + + diff --git a/Assets/Material/material_0339/Wool_Melton.mdl b/Assets/Material/material_0339/Wool_Melton.mdl new file mode 100644 index 0000000000000000000000000000000000000000..a1aad2d6ce5a871a509877a5b5c7a19b03989e7a --- /dev/null +++ b/Assets/Material/material_0339/Wool_Melton.mdl @@ -0,0 +1,811 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.7; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::dimension; +import ::nvidia::core_definitions::blend_colors; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A wool material."; + +annotation preview_scale( float f); + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float f_n(float n, float a, float h, float l) { + float k = ::math::fmod(n + h * 12.f, 12.f); + + return l - a * ::math::max(-1.0f, ::math::min(::math::min(k-3.0f, 9.0f-k), 1.0f)); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float3 rgb2hsl(float3 c) +[[ + ::anno::description("Converts a color value to HSL. The function outputs the hue to \n" + "lie in the range from 0.0-1.0."), + ::anno::author("NVIDIA vMaterials") +]] +{ + float3 hsl; + float cMax = ::math::max(::math::max(c.x, c.y), c.z); + float cMin = ::math::min(::math::min(c.x, c.y), c.z); + float delta = cMax - cMin; + + hsl.z = (cMax + cMin) / 2.0; + hsl.x = ((cMax == cMin) ? 0 : + (cMax == c.x) ? (c.y - c.z) / delta + ((c.z > c.y) ? 6.0f : 0.0f): + (cMax == c.y) ? (c.z - c.x) / delta + 2.0 : (c.x - c.y) / delta + 4.0) / 6.0f; + hsl.y = (hsl.z == 0.0 || hsl.z == 1.0) ? 0.0 : delta / (1.0 - ::math::abs(2.0 * hsl.z - 1.0)); + return hsl; +} + +color hsl2rgb(float3 hsl) +[[ + ::anno::description("Converts a HSL value back to a color. Note that the hue is expected to \n" + "lie in the range from 0.0-1.0."), + ::anno::author("NVIDIA vMaterials") +]] +{ + float h = hsl.x, s = hsl.y, l = hsl.z; + float a = s * ::math::min(l, 1.0f - l); + return color(f_n(0.0, a, h, l), + f_n(8.0, a, h, l), + f_n(4.0, a, h, l)); +} + +struct vm_coordinates{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +struct vm_col_norm{ + float3 value; + float3 norm; +}; + +enum vm_mono_select +[[ + ::anno::description("Modes for the creation of a gray-scale value from a color."), + ::anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + + + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + // Translation before or after rotation? + return uv; +} + + +float3 vm_tex_infinite( + uniform texture_2d tex = texture_2d(), + vm_coordinates uv = vm_coord(), + float3 average_color = float3(0.5f, 0.5f, 1.0f), + float patch_size = 1.0, + bool gamma_correct = true, + float gamma = 2.2f +) +{ + float2 uv_in = uv.uv; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * (uv.uv / patch_size); //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V))+int2(935); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + O = (W[0] = F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I))) - m) + + (W[1] = F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0,1)))) - m) + + (W[2] = F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1,0)))) - m); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1)))) - m) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1, 0)))) - m) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0, 1)))) - m); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0f, 1.0f); + + return gamma_correct? ::math::pow(::math::max(O, float3(0.0f)), gamma) : float3(O); +} + + + +// Returns an infinite lookup plus a normal map lookup +vm_col_norm vm_tex_infinite_color_normal( + uniform texture_2d tex_col = texture_2d(), + uniform texture_2d tex_norm = texture_2d(), + vm_coordinates uv = vm_coord(), + float3 average_color = float3(0.5), + float3 average_norm = float3(0.5f, 0.5f, 1.0f), + float patch_size = 1.0, + // Color output settings + bool color_out_gamma_correct = true, + float color_out_gamma = 2.2f, + // Normal output setting + float normal_strength = 1.0 +) +{ + vm_col_norm ret; + float2 uv_in = uv.uv; + + float3 O_a = float3(0.f); + float3 O_b = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * (uv.uv / patch_size); //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V))+int2(935); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m_a = average_color; + float3 m_b = average_norm; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + { + O_a = (W[0] = F[2]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I))) - m_a) + + (W[1] = F[1]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I+int2(0,1)))) - m_a) + + (W[2] = F[0]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I+int2(1,0)))) - m_a); + O_b = (W[0] = F[2]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I))) - m_b) + + (W[1] = F[1]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I+int2(0,1)))) - m_b) + + (W[2] = F[0]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I+int2(1,0)))) - m_b); + } + else + { + O_a = (W[0] = -F[2]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I+int2(1)))) - m_a) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I+int2(1, 0)))) - m_a) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(tex_col, U-rnd22(I+int2(0, 1)))) - m_a); + O_b = (W[0] = -F[2]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I+int2(1)))) - m_b) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I+int2(1, 0)))) - m_b) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(tex_norm, U-rnd22(I+int2(0, 1)))) - m_b); + } + + O_a = m_a + O_a/::math::length(W); + O_a = ::math::clamp( (O_a), 0.0, 1.0); + ret.value = color_out_gamma_correct? ::math::pow(::math::max(O_a, float3(0.0f)), color_out_gamma) : float3(O_a); + + O_b = m_b + O_b/::math::length(W); + O_b = ::math::clamp( (O_b), 0.0, 1.0); + + float3 norm = (O_b - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(normal_strength, normal_strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(uv.rotation) * norm.x - ::math::sin(uv.rotation) * norm.y, + ::math::sin(uv.rotation) * norm.x + ::math::cos(uv.rotation) * norm.y, + norm.z); + ret.norm = norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); + + return ret; +} + + +export material Wool_Melton( + color fabric_color = color(0.637597f, 0.637597f, 0.637597f) [[ + ::anno::description("Choose the color of the fabric."), + ::anno::display_name("Fabric Color"), + ::anno::in_group("Appearance"), + ::anno::ui_order(0) + ]], + float roughness = 1.0f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(1) + ]], + float white_fibers_weight = 0.29f [[ + ::anno::description("Adds a white fuzz layer on the material which gives it a more used appearance."), + ::anno::display_name("White Fibers Weight"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(2) + ]], + float sheen_weight = 0.38f [[ + ::anno::description("Adds a fuzzy, soft appearance around the material when viewed at grazing angles."), + ::anno::display_name("Sheen Weight"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(3) + ]], + float bump_strength = 1.f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(4) + ]], + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform"), + ::anno::ui_order(5) + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f), + ::anno::ui_order(6) + ]], + float2 texture_scale = 0.5f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::preview_scale(3.5f), + ::anno::ui_order(7) + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Uses selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform"), + ::anno::ui_order(8) + ]], + uniform bool roundcorners_enable = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(9) + ]], + uniform float roundcorners_radius_mm = 1.5f [[ + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::display_name("Round Corner Radius (mm)"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f), + ::anno::ui_order(10) + ]], + uniform bool roundcorners_across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(11) + ]]) +[[ + ::anno::display_name("Wool Melton - White"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "white", "light", "neutral")) +]] + = + let { + bool tmp0 = false; + float2 texture_rescale = texture_scale * 0.11f; // texture covers 11 cm, scale up so it covers 1m per default + + texture_2d multi_tex = texture_2d("./wool_melton_R_rough_G_ao_B_height.jpg", ::tex::gamma_linear); + texture_2d diff_fuzz_tex = texture_2d("./wool_melton_R_diff_G_fuzz.jpg", ::tex::gamma_linear); + texture_2d norm_tex = texture_2d("./wool_melton_norm.jpg", ::tex::gamma_linear); + + material_surface tmp1(::df::custom_curve_layer(0.0599999987f, 1.f, 5.f, histogram_range(vm_tex_infinite(multi_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.444999993f, 0.662f, 0.472000003f), 1.f, false, 2.20000005f).y, 1.f, 0.459999979f), ::df::microfacet_ggx_smith_bsdf(::math::pow(histogram_range(1.f - vm_tex_infinite(multi_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.444999993f, 0.662f, 0.472000003f), 1.f, false, 2.20000005f).x, 0.98999995f, roughness * 0.300000012f + 0.709999979f), 2.f) * ::math::pow(histogram_range(1.f - vm_tex_infinite(multi_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.444999993f, 0.662f, 0.472000003f), 1.f, false, 2.20000005f).x, 0.98999995f, roughness * 0.300000012f + 0.709999979f), 2.f), ::math::pow(histogram_range(1.f - vm_tex_infinite(multi_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.444999993f, 0.662f, 0.472000003f), 1.f, false, 2.20000005f).x, 0.98999995f, roughness * 0.300000012f + 0.709999979f), 2.f) * ::math::pow(histogram_range(1.f - vm_tex_infinite(multi_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.444999993f, 0.662f, 0.472000003f), 1.f, false, 2.20000005f).x, 0.98999995f, roughness * 0.300000012f + 0.709999979f), 2.f), color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(sheen_weight, ::df::sheen_bsdf(0.0700000003f, hsl2rgb(rgb2hsl(float3(fabric_color)) * float3(1.f, 0.74000001f, 1.f)), color(1.f, 1.f, 1.f), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(fabric_color, color(::math::lerp(1.f, vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).value.x, 1.f)), ::base::color_layer_overlay, 1.f, true).tint, color(1.f, 1.f, 1.f), ::base::color_layer_blend, ::math::pow(white_fibers_weight * vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).value.y, 0.629999995f), true).tint, 0.f), bsdf(), vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).norm)), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(fabric_color, color(::math::lerp(1.f, vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).value.x, 1.f)), ::base::color_layer_overlay, 1.f, true).tint, color(1.f, 1.f, 1.f), ::base::color_layer_blend, ::math::pow(white_fibers_weight * vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).value.y, 0.629999995f), true).tint, 0.f), bsdf(), vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).norm), vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).norm), vm_tex_infinite_color_normal(diff_fuzz_tex, norm_tex, vm_coord(texture_translate, texture_rotate, texture_rescale, uv_space_index), float3(0.584999979f, 0.00200000009f, 0.5f), float3(0.5f, 0.5f, 1.f), 0.159999996f, true, 2.20000005f, bump_strength).norm), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f), emission_intensity: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal()); + hair_bsdf tmp6 = hair_bsdf(); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5, + hair: tmp6); + + +// 2 +export material Wool_Melton_Sand(*) +[[ + ::anno::display_name("Wool Melton - Sand"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Sand.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "white", "light", "warm", "sand")) +]] = Wool_Melton( + fabric_color: color(0.637597f, 0.577580f, 0.485150f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 3 +export material Wool_Melton_Gray(*) +[[ + ::anno::display_name("Wool Melton - Gray"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Gray.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "gray", "neutral")) +]] = Wool_Melton( + fabric_color: color(0.274677f, 0.274677f, 0.274677f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 4 +export material Wool_Melton_Tobacco(*) +[[ + ::anno::display_name("Wool Melton - Tobacco"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Tobacco.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "tobacco", "brown")) +]] = Wool_Melton( + fabric_color: color(0.155926f, 0.090842f, 0.038204f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 5 +export material Wool_Melton_Carbon(*) +[[ + ::anno::display_name("Wool Melton - Carbon"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Carbon.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "carbon", "gray", "dark", "neutral")) +]] = Wool_Melton( + fabric_color: color(0.023153f, 0.027321f, 0.031896f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 6 +export material Wool_Melton_Saffron(*) +[[ + ::anno::display_name("Wool Melton - Saffron"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Saffron.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "saffron", "orange", "warm")) +]] = Wool_Melton( + fabric_color: color(0.610496f, 0.262251f, 0.009134f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +//7 +export material Wool_Melton_Paprika(*) +[[ + ::anno::display_name("Wool Melton - Paprika"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Paprika.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "paprika", "orange", "red", "warm", "saturated")) +]] = Wool_Melton( + fabric_color: color(0.679542f, 0.066626f, 0.018500f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 8 +export material Wool_Melton_Garnet(*) +[[ + ::anno::display_name("Wool Melton - Garnet"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Garnet.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "red", "warm", "dark")) +]] = Wool_Melton( + fabric_color: color(0.215861f, 0.013702f, 0.030713f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 9 +export material Wool_Melton_Green_Tea(*) +[[ + ::anno::display_name("Wool Melton - Green Tea"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Green_Tea.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "green")) +]] = Wool_Melton( + fabric_color: color(0.230740f, 0.318547f, 0.030713f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 10 +export material Wool_Melton_Jungle(*) +[[ + ::anno::display_name("Wool Melton - Jungle"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Jungle.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "green", "dark")) +]] = Wool_Melton( + fabric_color: color(0.031896f, 0.080220f, 0.023153f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 11 +export material Wool_Melton_Fuchsia(*) +[[ + ::anno::display_name("Wool Melton - Fuchsia"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Fuchsia.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "fuchsia", "purple", "saturated", "magenta", "violet")) +]] = Wool_Melton( + fabric_color: color(0.386429f, 0.034340f, 0.171441f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 12 +export material Wool_Melton_Aubergine(*) +[[ + ::anno::display_name("Wool Melton - Aubergine"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Aubergine.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "purple", "dark", "violet")) +]] = Wool_Melton( + fabric_color: color(0.066626f, 0.019382f, 0.080220f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 13 +export material Wool_Melton_Morning_Glory(*) +[[ + ::anno::display_name("Wool Melton - Morning Glory"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Morning_Glory.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "blue", "cool")) +]] = Wool_Melton( + fabric_color: color(0.109462f, 0.114435f, 0.304987f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); + +// 14 +export material Wool_Melton_Blue_Jay(*) +[[ + ::anno::display_name("Wool Melton - Blue Jay"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::author("NVIDIA"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Miguel Guerrero"), + ::anno::contributor("Vanni Brighella"), + ::anno::thumbnail("./.thumbs/Wool_Melton.Wool_Melton_Blue_Jay.png"), + ::anno::key_words(string[]("fabric", "felt","wool", "melton", "clothing", "sheen", "fashion", "new", "blue", "cool")) +]] = Wool_Melton( + fabric_color: color(0.072272f, 0.184475f, 0.479320f), + roughness: 1.0f, + white_fibers_weight: 0.1f, + sheen_weight: 0.21f, + bump_strength: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false +); diff --git a/Assets/Material/material_0356/Ground_Leaves.mdl b/Assets/Material/material_0356/Ground_Leaves.mdl new file mode 100644 index 0000000000000000000000000000000000000000..c444d6a8c462ad79fd36d347b93b85b8fae73ad4 --- /dev/null +++ b/Assets/Material/material_0356/Ground_Leaves.mdl @@ -0,0 +1,1122 @@ +/***************************************************************************** +* Copyright 2024 NVIDIA Corporation. All rights reserved. +****************************************************************************** + + MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT, + WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR, + THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA + CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING + ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + THE USE OR INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN + THE MDL MATERIALS. +*/ +mdl 1.4; + +import ::anno::*; +import ::base::*; +import ::nvidia::core_definitions::*; +import ::tex::*; +import ::state::*; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +export material Ground_Leaves( + + /* Appearance */ + color hue_shift = color (0.0461, 0.349, 0.263 ) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 1.0f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::soft_range(0.f, 2.f), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], +/* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] +) + [[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Leaves - Forest Green"), + ::anno::description("A ground material covered with leaves."), + ::anno::thumbnail("./.thumbs/Ground_Leaves.Ground_Leaves.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "green")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); + + +export material ground_leaves_green( + + /* Appearance */ + color hue_shift = color (0.00604f , 1.f , 0.f ) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 0.75f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::in_group("Appearance"), + ::anno::hard_range( 0 , 1) + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], + /* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] + ) + [[ + ::anno::display_name("Leaves - Green"), + ::anno::description("A ground material covered with leaves."), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Ground_Leaves.ground_leaves_green.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "green")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); + + +export material ground_leaves_yellow( + + /* Appearance */ + color hue_shift = color (1.f , 0.883f , 0.0104f ) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 0.5f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::in_group("Appearance"), + ::anno::hard_range( 0 , 1) + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], + /* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] + ) + [[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Leaves - Forest Yellow"), + ::anno::description("A ground material covered with leaves."), + ::anno::thumbnail("./.thumbs/Ground_Leaves.ground_leaves_yellow.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "yellow")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); + + +export material ground_leaves_orange( + + /* Appearance */ + color hue_shift = color (1.f, 0.267f, 0.0385f ) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 0.75f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::in_group("Appearance"), + ::anno::hard_range( 0 , 1) + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], + /* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] + ) + [[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Leaves - Orange"), + ::anno::description("A ground material covered with leaves."), + ::anno::thumbnail("./.thumbs/Ground_Leaves.ground_leaves_orange.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "orange", "brown")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); + + +export material ground_leaves_red( + + /* Appearance */ + color hue_shift = color (0.459f , 0.0278f , 0.0278f) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 1.0f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::in_group("Appearance"), + ::anno::hard_range( 0 , 1) + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], + /* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] + ) + [[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Leaves - Red"), + ::anno::description("A ground material covered with leaves."), + ::anno::thumbnail("./.thumbs/Ground_Leaves.ground_leaves_red.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "red", "brown")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); + +export material ground_leaves_blue( + + /* Appearance */ + color hue_shift = color (0.0104f, 0.136f, 0.828f) + [[ + ::anno::display_name ("Hue Shift"), + ::anno::description("Determine the color of the leaves."), + ::anno::in_group("Appearance") + ]], + uniform float blend_undercoat = 1.0f + [[ + ::anno::display_name("Leaf Saturation"), + ::anno::description("Makes the Hue Shift more saturated."), + ::anno::in_group("Appearance"), + ::anno::hard_range( 0 , 1) + ]], + uniform float reflection_roughness = 1.0 + [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 1.0 + [[ + ::anno::display_name("Bump Strength"), + ::anno::description("Specifies the strength of the bump."), + ::anno::in_group("Appearance") + ]], + /* Transform */ + uniform float2 texture_translate = 0.f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)) + ]], +/* Advanced */ + uniform float displacement_scale = 0.1f + [[ + ::anno::display_name("Displacement Scale"), + ::anno::description("Determine the amount of displacement. A displacement value of 0 turns off displacement."), + ::anno::in_group("Advanced") + ]], + uniform int uv_space_index = 0 + [[ + ::anno::display_name("UV Space Index"), + ::anno::description("UV space index."), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 3) + ]] + ) + [[ + ::anno::display_name("Leaves - Blue"), + ::anno::description("A ground material covered with leaves."), + ::anno::author("NVIDIA vMaterials"), + ::anno::thumbnail("./.thumbs/Ground_Leaves.ground_leaves_blue.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("aec", "ground", "leaves", "nature", "multicolor", "soil", "foliage", "organic", "natural", "forest", "blue", "brown")) + ]]= + ::nvidia::core_definitions::add_displacement( + base: ::nvidia::core_definitions::flex_material_v2( + base_color: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_diff.jpg" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: ::nvidia::core_definitions::blend_colors( + color_1: ::nvidia::core_definitions::file_texture( + texture: texture_2d ( "./leaves_grayscale_diff.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale , + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + color_2: hue_shift, + mode: ::base::color_layer_overlay, + weight: 1.0f).tint, + mode: ::base::color_layer_overlay, + weight: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: blend_undercoat * 2.0f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono).tint, + color_2: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ao.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).tint, + mode: ::base::color_layer_multiply, + weight: 1.0f).tint, + diffuse_roughness: 0.0f, + is_metal: false, + reflectivity: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_ref.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.f, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + reflection_roughness: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_rou.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: reflection_roughness, + contrast: 1.f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + anisotropy: 0.0f, + anisotropy_rotation: 0.0f, + transparency: 0.0f, + transmission_color: color(1.0f, 1.0f, 1.0f), + volume_color: color(1.0f, 1.0f, 1.0f), + transmission_roughness: 0.0f, + base_thickness: 0.1f, + ior: 1.5f, + thin_walled: false, + normal: ::nvidia::core_definitions::normalmap_texture( + texture: texture_2d("./leaves_norm.png" , ::tex::gamma_linear), + factor: bump_strength, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index)), + displacement: ::nvidia::core_definitions::file_texture( + texture: texture_2d("./leaves_dis.png" , ::tex::gamma_srgb), + mono_source: ::base::mono_average, + brightness: 1.0f, + contrast: 1.0f, + scaling: 1.f / texture_scale, + translation: texture_translate, + rotation: texture_rotate, + clip: false, + texture_space: uv_space_index, + invert: false).mono, + displacement_scale: displacement_scale); \ No newline at end of file diff --git a/Assets/Material/material_0376/Aging_Copper.mdl b/Assets/Material/material_0376/Aging_Copper.mdl new file mode 100644 index 0000000000000000000000000000000000000000..2f9c91099e8cdf9a0c1736b3af50cd820b8bab2c --- /dev/null +++ b/Assets/Material/material_0376/Aging_Copper.mdl @@ -0,0 +1,730 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.6; + +import ::anno::*; +import ::base::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::df::*; +import ::nvidia::core_definitions::*; +import ::nvidia::core_definitions::dimension; + +const string DESCRIPTION = "Zinc material with optional oxidation effect"; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + + float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 + //bool srgb2rgb = false, + //bool rgb2srgb = false +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + ::state::normal()*1.0); + //return ::state::normal(); +} + + color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + + float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +::base::texture_coordinate_info transform_coordinate_2( + float4x4 transform + [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix.") ]], + ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() + [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection.") ]] +) [[ + ::anno::description("Transform a texture coordinate by a matrix.") , + ::anno::noinline() + ]] +{ + // Version 2 + float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); + //Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant. + //just pretend there is no other rotation happening + //get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z. + float4 u = transform[0]; + float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); + float cos = ru.x; + float sin = -ru.y; + + return ::base::texture_coordinate_info( + float3(r_position.x,r_position.y,r_position.z), + ::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), + ::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u)); +} + +::base::texture_coordinate_info vmat_transform( + float2 translation = float2(0.0, 0.0), + float rotation = 0.0, // rotation in degrees + float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +color gradient_lookup(uniform texture_2d gradient_texture, float position, int gradient_select = 0) +{ + int2 texel_coord = int2(int(position * ::tex::width(gradient_texture)), gradient_select); + return color(::tex::texel_float3(gradient_texture, texel_coord)); +} + +float3 gradient_lookup_float3(uniform texture_2d gradient_texture, float position, int gradient_select = 0) +{ + int2 texel_coord = int2(int(position * ::tex::width(gradient_texture)), gradient_select); + return float3(::tex::texel_float3(gradient_texture, texel_coord)); +} + +float3 normalmap_normal( + uniform texture_2d texture, + float factor = 1.0, + ::base::texture_coordinate_info uvw = ::base::texture_coordinate_info() +) +{ + float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - float3(0.5)) * (factor * 2.0); + return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + ::state::normal() * (lookup.z + (1.0 - factor))); +} + +export material Aging_Copper( + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance"), + ::anno::ui_order(0) + ]], + float age = 0.0f [[ + ::anno::description("Ages the copper so that it transitions through all the states from brand new to covered by a lovely Patina."), + ::anno::display_name("Age"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(1) + ]], + float age_variation = 0.5f [[ + ::anno::description("Adds some more variation to the aging process, so that the surface ages less uniform."), + ::anno::display_name("Age Variation"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(2) + ]], + float scratches_abrasion = 0.11f [[ + ::anno::description("This parameter removes some of the aging process by simulating scratches and abrasion."), + ::anno::display_name("Scratches Abrasion"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(3) + ]], + float drops_variation = 0.f [[ + ::anno::description("Adds Water droplets that increase the effect of againg."), + ::anno::display_name("Drops Variation"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(4) + ]], + float flow_stains_balance = 0.5f [[ + ::anno::description("This parameter should be centered at 0.5 to have no effect. When below 0.5, the flows remove some of the aging process. When greater than 0.5, the stains add to the aging process."), + ::anno::display_name("Flow Stains Balance"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(5) + ]], + float spotsdirt_amount = .26f [[ + ::anno::description("Adds a layer of spots and dirt."), + ::anno::display_name("Spots Dirt Amount"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(6) + ]], + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform"), + ::anno::ui_order(7) + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f), + ::anno::ui_order(8) + ]], + float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::ui_order(9) + ]], + uniform bool roundcorners_enable = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(10) + ]], + uniform float roundcorners_radius_mm = 1.5f [[ + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::display_name("Round Corner Radius (mm)"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f), + ::anno::ui_order(11) + ]], + uniform bool roundcorners_across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(12) + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Uses selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform"), + ::anno::ui_order(13) + ]]) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Pretty New"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "design", "aec", "sanitary", "kitchen", "architecture", "new", "metallic", "shiny", "reflective", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper.png") +]] + = + let { + bool tmp0 = false; + material_surface tmp1(::df::weighted_layer(::math::pow(1.f - ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 2.6f), ::df::weighted_layer(gradient_lookup_float3(texture_2d("./aging_copper_haze_weight.png", ::tex::gamma_linear), age, 0).x, ::df::microfacet_ggx_smith_bsdf(0.16f, 0.16f, gradient_lookup(texture_2d("./aging_copper_gradient.png", ::tex::gamma_srgb), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 0), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::microfacet_ggx_smith_bsdf(::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), gradient_lookup(texture_2d("./aging_copper_gradient.png", ::tex::gamma_srgb), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 0), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), infinite_tiling ? endless_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), false, false, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 2.01f, float3(0.5f, 0.5f, 1.f), 2.02f) : normalmap_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)))), ::state::normal()), ::df::custom_curve_layer(0.04f, 1.f, 5.f, 1.f, ::df::weighted_layer(gradient_lookup_float3(texture_2d("./aging_copper_haze_weight.png", ::tex::gamma_linear), age, 0).x, ::df::microfacet_ggx_smith_bsdf(0.16f, 0.16f, gradient_lookup(texture_2d("./aging_copper_gradient.png", ::tex::gamma_srgb), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 0), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::microfacet_ggx_smith_bsdf(::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), gradient_lookup(texture_2d("./aging_copper_gradient.png", ::tex::gamma_srgb), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 0), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), infinite_tiling ? endless_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), false, false, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 2.01f, float3(0.5f, 0.5f, 1.f), 2.02f) : normalmap_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)))), ::state::normal()), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(gradient_lookup(texture_2d("./aging_copper_gradient.png", ::tex::gamma_srgb), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f), 0), 0.f), bsdf(), infinite_tiling ? endless_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), false, false, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 2.01f, float3(0.5f, 0.5f, 1.f), 2.02f) : normalmap_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)))), infinite_tiling ? endless_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), false, false, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 2.01f, float3(0.5f, 0.5f, 1.f), 2.02f) : normalmap_normal(texture_2d("./aging_copper_norm.jpg", ::tex::gamma_linear), ::math::clamp((flow_stains_balance - 0.5f) * 2.f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y + (::math::lerp(0.78f , 0.18f, age * 0.94f) * (drops_variation * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x) + (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, age_variation * 0.5f, age * 0.94f * 0.95f) + float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z * (age * 0.94f * 0.39f + 0.05f) - scratches_abrasion * 0.32f * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y)) + spotsdirt_amount * float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.058f, 0.088f, 0.036f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_drops_G_flowstains_B_spotsdirt.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, 0.f, 0.999f) - float3(infinite_tiling ? endless_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.01f, float3(0.511f, 0.208f, 0.2f), 2.02f, false) : ::base::file_texture(texture_2d("./aging_copper_multi_R_base_G_scratches_B_castmetal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y * (age * 0.94f * scratches_abrasion), ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)))), ::state::normal()), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal()); + hair_bsdf tmp6 = hair_bsdf(); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5, + hair: tmp6); + + +// -------------------- 2 -------------------- +export material Aging_Copper_State_2_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Slight Drops"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "drops", "residue", "design", "aec", "sanitary", "kitchen", "architecture", "new", "metallic", "shiny", "reflective", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_2_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.02f, + age_variation: 0.51f, + scratches_abrasion: 0.0f, + drops_variation: 0.41f, + flow_stains_balance: 0.48f, + spotsdirt_amount: 0.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + + +// -------------------- 3 -------------------- +export material Aging_Copper_State_3_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Initial Oxidation"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "drops", "residue", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "shiny", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_3_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.15f, + age_variation: 0.47f, + scratches_abrasion: 0.0f, + drops_variation: 0.09f, + flow_stains_balance: 0.52f, + spotsdirt_amount: 0.17f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 4 -------------------- +export material Aging_Copper_State_4_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Worn Oxidation"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "matte", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_4_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.24f, + age_variation: 0.83f, + scratches_abrasion: 0.66f, + drops_variation: 0.09f, + flow_stains_balance: 0.52f, + spotsdirt_amount: 0.17f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 5 -------------------- +export material Aging_Copper_State_5_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Even Oxidation"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "matte", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_5_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.24f, + age_variation: 0.83f, + scratches_abrasion: 0.0f, + drops_variation: 0.09f, + flow_stains_balance: 0.52f, + spotsdirt_amount: 0.17f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 6 -------------------- +export material Aging_Copper_State_6_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Minimal Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "matte", "warm")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_6_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.4f, + age_variation: 1.0f, + scratches_abrasion: 0.63f, + drops_variation: 0.48f, + flow_stains_balance: 0.48f, + spotsdirt_amount: 0.17f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 7 -------------------- +export material Aging_Copper_State_7_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Slight Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "matte", "brown")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_7_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.4f, + age_variation: 1.0f, + scratches_abrasion: 0.63f, + drops_variation: 0.76f, + flow_stains_balance: 0.91f, + spotsdirt_amount: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 8 -------------------- +export material Aging_Copper_State_8_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Medium Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "metallic", "matte", "brown")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_8_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.61f, + age_variation: 1.0f, + scratches_abrasion: 0.85f, + drops_variation: 0.48f, + flow_stains_balance: 0.91f, + spotsdirt_amount: 0.17f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 9 -------------------- +export material Aging_Copper_State_9_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Weathered Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "weathered", "metallic", "matte", "turquoise")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_9_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.91f, + age_variation: 1.0f, + scratches_abrasion: 0.85f, + drops_variation: 1.0f, + flow_stains_balance: 0.0f, + spotsdirt_amount: 0.76f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 10 -------------------- +export material Aging_Copper_State_10_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Strong Weathered Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "weathered", "rough", "metallic", "matte", "turquoise")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_10_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.91f, + age_variation: 1.0f, + scratches_abrasion: 0.85f, + drops_variation: 1.0f, + flow_stains_balance: 0.5f, + spotsdirt_amount: 0.76f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 11 -------------------- +export material Aging_Copper_State_11_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Strong Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "weathered", "rough", "metallic", "matte", "turquoise")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_11_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 0.91f, + age_variation: 1.0f, + scratches_abrasion: 0.0f, + drops_variation: 1.0f, + flow_stains_balance: 0.5f, + spotsdirt_amount: 0.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + +// -------------------- 12 -------------------- +export material Aging_Copper_State_12_of_12(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Aging copper - Pure Even Patina"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("metal", "copper", "infinite", "tiling", "construction", "oxide", "oxidized", "patina", "design", "aec", "sanitary", "kitchen", "architecture", "aged", "weathered", "rough", "metallic", "matte", "turquoise")), + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::thumbnail("./.thumbs/Aging_Copper.Aging_Copper_State_12_of_12.png") +]] = Aging_Copper +( + infinite_tiling: true, + age: 1.0f, + age_variation: 0.0f, + scratches_abrasion: 0.0f, + drops_variation: 1.0f, + flow_stains_balance: 0.5f, + spotsdirt_amount: 0.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); \ No newline at end of file diff --git a/Assets/Material/material_0399/Bronze_Hammered.mdl b/Assets/Material/material_0399/Bronze_Hammered.mdl new file mode 100644 index 0000000000000000000000000000000000000000..92b003ec41f580d99008c3ee536aebadc23506a1 --- /dev/null +++ b/Assets/Material/material_0399/Bronze_Hammered.mdl @@ -0,0 +1,284 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.6; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A hammered bronze material"; + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation); + float c = ::math::cos(rotation); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + + +float histogram_range(float input, float range, float position) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + + + +float3 normalmap_normal( + uniform texture_2d texture, + float factor = 1.0, + ::base::texture_coordinate_info uvw = ::base::texture_coordinate_info() +) +{ + float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - float3(0.5)) * (factor * 2.0); + return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + ::state::normal() * (lookup.z + (1.0 - factor))); +} + +color gradient_lookup_smooth(uniform texture_2d gradient_texture, float position, float gradient_select = 0) +{ + // Pixel centers lie in the middle. To properly access the pixel centers of the gradients, apply an offset + float2 texel_coord = float2(position, gradient_select + (0.5f / ::tex::height(gradient_texture))); + return color(::tex::lookup_float3(gradient_texture, texel_coord)); +} + + +export material Bronze_Hammered( + float copper_tint = 0.5f [[ + ::anno::description("Blends between the bronze types. 0.0 yields yellowish bronze, increasing the copper amount fades to reddish bronze."), + ::anno::display_name("Copper Tint"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(0) + ]], + float cavities_darkening = 1.f [[ + ::anno::description("Darkens the areas where cavities appear."), + ::anno::display_name("Cavities Darkening"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(1) + ]], + float roughness = 0.f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(2) + ]], + float bump_strength = 0.99f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(3) + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform"), + ::anno::ui_order(4) + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f), + ::anno::ui_order(5) + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::ui_order(6) + ]], + uniform bool roundcorners_enable = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(7) + ]], + uniform float roundcorners_radius_mm = 1.0f [[ + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::display_name("Round Corner Radius (mm)"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f), + ::anno::ui_order(8) + ]], + uniform bool roundcorners_across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(9) + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Uses selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Advanced"), + ::anno::hard_range(0, 10), + ::anno::ui_order(10) + ]]) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Bronze Hammered - Hammered Darkened"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Bronze_Hammered.Bronze_Hammered.png"), + // scratched, old, stained, crumpled, handled, worn, creative, smudged, bumped, matte, shiny + ::anno::key_words(string[]("metal", "bronze", "reflective", "shiny", "hammered", "stained", "bumped", "design", "warm")) +]] + = + let { + float copper_amount_remap = copper_tint / 1.5f; + bool tmp0 = false; + material_surface tmp1(::df::custom_curve_layer(0.f, 1.f, 5.35999966f, 1.f, ::df::weighted_layer(0.349999994f, ::df::microfacet_ggx_smith_bsdf(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)) * histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)), histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)) * histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)), color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::microfacet_ggx_smith_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono, nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono, color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), normalmap_normal(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index))), normalmap_normal(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index))), ::df::tint(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(gradient_lookup_smooth(texture_2d("./bronze_gradients.png", ::tex::gamma_srgb), float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).z, copper_amount_remap), color(::math::pow(float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_multiply, cavities_darkening * 0.75f + 0.25f).tint, color(float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_overlay, cavities_darkening * 0.75f + 0.25f).tint, ::df::weighted_layer(0.349999994f, ::df::microfacet_ggx_smith_bsdf(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)) * histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)), histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)) * histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 0.170000002f, ::math::lerp(0.399999976f, 0.736000001f, roughness * 0.699999988f)), color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::microfacet_ggx_smith_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono, nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, ::math::lerp(0.40200001f, 0.245000005f, roughness * 0.699999988f), ::math::lerp(0.234000012f, 0.395000011f, roughness * 0.699999988f))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).y), ::base::color_layer_add, ::math::lerp(0.189999998f, 0.569999993f, roughness * 0.699999988f)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./brass_hammered_multi_R_pit_G_ao_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint).x, 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness * 0.699999988f)).mono, color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), bsdf(), normalmap_normal(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index))), normalmap_normal(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index)))), ::state::normal()), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal()); + hair_bsdf tmp6 = hair_bsdf(); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5, + hair: tmp6); + +// 2 +export material Bronze_Hammered_Shiny_Soft_Hammering(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Bronze Hammered - Shiny Soft Hammering"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Bronze_Hammered.Bronze_Hammered_Shiny_Soft_Hammering.png"), + // scratched, old, stained, crumpled, handled, worn, creative, smudged, bumped, matte, shiny + ::anno::key_words(string[]("metal", "bronze", "reflective", "shiny", "hammered", "bumped", "design", "warm")) +]] = Bronze_Hammered( + copper_tint: 0.5f, + cavities_darkening: 0.0f, + roughness: 0.0f, + bump_strength: 0.51f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + + +// 3 +export material Bronze_Hammered_Matte_Hammering(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Bronze Hammered - Matte Hammering"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Bronze_Hammered.Bronze_Hammered_Matte_Hammering.png"), + // scratched, old, stained, crumpled, handled, worn, creative, smudged, bumped, matte, shiny + ::anno::key_words(string[]("metal", "bronze", "reflective", "matte", "hammered", "bumped", "design", "warm")) +]] = Bronze_Hammered( + copper_tint: 0.5f, + cavities_darkening: 1.0f, + roughness: 0.8f, + bump_strength: 0.99f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + roundcorners_enable: false, + roundcorners_radius_mm: 1.0f, + roundcorners_across_materials: false, + uv_space_index: 0 +); + + + + + + + + + diff --git a/Assets/Material/material_0408/Chromium_Foil.mdl b/Assets/Material/material_0408/Chromium_Foil.mdl new file mode 100644 index 0000000000000000000000000000000000000000..05bdca0757f8b884780691e94ca847b8cbadba92 --- /dev/null +++ b/Assets/Material/material_0408/Chromium_Foil.mdl @@ -0,0 +1,501 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.4; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "Metal foil material with additional controls for wrinkling the material"; + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +float histogram_range(float input, float range, float position) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + +float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + ::state::normal()*1.0); +} + +export material Chromium_Foil( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Infinite Tiing") + ]], + float brightness = 1.f [[ + ::anno::description("Ajusts the total reflectivity of the metal."), + ::anno::display_name("Brightness"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float roughness = 0.15f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float roughness_variation = 0.564f [[ + ::anno::description("Amount of variation applied to the roughness, higher numbers add more non uniform appearance to the reflectivity of the material."), + ::anno::display_name("Roughness Variation"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float smudges = 0.35f [[ + ::anno::description("Adds blurrier reflections that show smudges on the surface."), + ::anno::display_name("Smudges"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 0.05f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.0f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.4, 0.4)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform") + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float radius = 0.002f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners") + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Slightly Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] + = + let { + color normal_reflectivity = color(0.549302f, 0.5560554f, 0.5542377f); + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + texture_2d rough_ao_tex = texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear); + texture_2d smudge_splotch_tex = texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear); + texture_2d norm_tex = texture_2d("./foil_crumpled_norm.jpg", ::tex::gamma_linear); + + bool tmp0 = false; + material_surface tmp1( + ::df::weighted_layer(0.0299999993f, ::df::microfacet_ggx_smith_bsdf(0.300000012f, 0.300000012f, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::color_custom_curve_layer(normal_reflectivity, grazing_reflectivity, 5.f, color(::math::lerp(0.600000024f, 1.f, brightness) * histogram_scan_big(::math::pow(float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f), 1.f, bump_strength * 0.400000006f)), ::df::microfacet_ggx_smith_bsdf((histogram_range(float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * (histogram_range(float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), (histogram_range(float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * (histogram_range(float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(rough_ao_tex, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(rough_ao_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(smudge_splotch_tex, ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(smudge_splotch_tex, color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), bsdf(), infinite_tiling ? endless_normal(norm_tex, bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.5f, 0.5f, 1.f), 8.f) : ::base::tangent_space_normal_texture(norm_tex, bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), infinite_tiling ? endless_normal(norm_tex, bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.5f, 0.5f, 1.f), 8.f) : ::base::tangent_space_normal_texture(norm_tex, bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + enable_round_corners ? ::state::rounded_corner_normal(radius, across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + +export material Chromium_Foil_Smudged_Foil(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Smudgy Foil"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil_Smudged_Foil.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "smooth", "unfinished", "decorative", "creative", "neutral")) +]] += Chromium_Foil( + infinite_tiling: true, + roughness: 0.15f, + roughness_variation: 0.84f, + smudges: 0.35f, + bump_strength: 0.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + +export material Chromium_Foil_Shiny_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Shiny Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil_Shiny_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "shiny", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] += Chromium_Foil( + infinite_tiling: true, + roughness: 0.25f, + roughness_variation: 0.25f, + smudges: 0.75f, + bump_strength: 0.25f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + + +export material Chromium_Foil_Matte_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Matte Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil_Matte_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "matte", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral", "gray")) +]] += Chromium_Foil( + infinite_tiling: true, + roughness: 0.65f, + roughness_variation: 1.0f, + smudges: 0.4f, + bump_strength: 0.15f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + +export material Chromium_Foil_Heavy_Glossy_Wrinkles(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Heavy Glossy Wrinkles"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil_Heavy_Glossy_Wrinkles.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] += Chromium_Foil( + infinite_tiling: true, + roughness: 0.164f, + roughness_variation: 0.021f, + smudges: 0.143f, + bump_strength: 0.99f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + +export material Chromium_Foil_Heavy_Matte_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chromium Foil - Heavy Matte Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Foil.Chromium_Foil_Heavy_Matte_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "chromium", "foil", "matte", "bumped", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral", "gray")) +]] += Chromium_Foil( + infinite_tiling: true, + roughness: 0.889f, + roughness_variation: 0.018f, + smudges: 0.246f, + bump_strength: 0.732f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + + + + + + + + + + + + diff --git a/Assets/Material/material_0409/Chromium_Knurling.mdl b/Assets/Material/material_0409/Chromium_Knurling.mdl new file mode 100644 index 0000000000000000000000000000000000000000..c9cb646ca331ee2196d733a29c8fce392bd5a6da --- /dev/null +++ b/Assets/Material/material_0409/Chromium_Knurling.mdl @@ -0,0 +1,359 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::df::*; +import ::tex::*; +import ::math::*; +import ::base::*; +import ::state::*; +import ::anno::*; +import ::nvidia::core_definitions::*; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "Metal with a diamond knurling finish"; + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +::base::texture_coordinate_info transform_coordinate_2( + float4x4 transform + [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix.") ]], + ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() + [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection.") ]] +) [[ + ::anno::description("Transform a texture coordinate by a matrix.") , + ::anno::noinline() + ]] +{ + // Version 2 + float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); + //Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant. + //just pretend there is no other rotation happening + //get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z. + float4 u = transform[0]; + float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); + float cos = ru.x; + float sin = -ru.y; + //TODO: at least also handle sign of z? + //TODO: handle tangent becoming 0 + + + return ::base::texture_coordinate_info( + float3(r_position.x,r_position.y,r_position.z), + ::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), + ::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u)); +} + +::base::texture_coordinate_info vmat_transform( + float2 translation = float2(0.0, 0.0), + float rotation = 0.0, // rotation in degrees + float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +export material Chromium_Knurling( + //Appearance + float brightness = float(0.7f) [[ + ::anno::description("Adjusts the brightness of the material."), + ::anno::display_name("Brightness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.0f, 1.0f) + ]], + float roughness = float(0.5f) [[ + ::anno::description("Higher values lead to a rougher appearance of the material."), + ::anno::display_name("Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.0f, 1.0f) + ]], + float grooves_dirt = float(0.4f) [[ + ::anno::description("Adds dirt in the grooves of the knurling pattern."), + ::anno::display_name("Grooves Dirt"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.0f, 1.0f) + ]], + uniform float bump_strength = float(0.8f) [[ + ::anno::description("Adds dirt in the grooves of the knurling pattern."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::soft_range(0.0f, 1.0f) + ]], + + // Round Corners + uniform bool enable_round_corners = false [[ + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::display_name("Round Corner Radius"), + ::anno::description("Sets the radius of the round corners in millimeters."), + ::anno::soft_range(0.0f, 0.1f), + ::anno::in_group("Round Corners") + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the rounded corner effect also between other materials."), + ::anno::in_group("Round Corners") + ]], + //Transform + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f) + ]], + float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.35f, .35f)), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 2.f) + ]], + + // Advanced + uniform int uv_space_index = 0 [[ + ::anno::description("Uses the selected UV space index."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Advanced"), + ::anno::soft_range(0, 4) + ]] +) +[[ + ::anno::display_name("Metal Knurling Chromium"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Knurling.Chromium_Knurling.png"), + ::anno::key_words(string[]("metal", "chromium", "knurled", "knurling", "pattern", "design", "bumped")), + ::anno::contributor("Ruediger Raab"), + ::anno::author("NVIDIA vMaterials") +]] += let +{ + color metal_tint = color(0.549302f, 0.5560554f, 0.5542377f); + + // Texture setup + texture_2d normal_tex = texture_2d("./metal_knurling_norm.jpg", ::tex::gamma_linear); + texture_2d multi_heights_tex = texture_2d("./metal_knurling_multi_heights.jpg", ::tex::gamma_linear); + texture_2d diff_rough_grunge_tex = texture_2d("./metal_knurling_multi_R_diff_G_rough_B_grunge.jpg", ::tex::gamma_linear); + + // Coordinate setup + ::base::texture_coordinate_info uvw = vmat_transform( + translation: texture_translate, + rotation: texture_rotate, + scaling: texture_scale, + system: ::base::texture_coordinate_uvw, + uv_space: uv_space_index + ); + + // ---------- Diff Rough Grunge Lookup ---------- + + float3 diff_rough_grunge_lookup = float3( + ::base::file_texture( + texture: diff_rough_grunge_tex, + uvw: uvw, + mono_source: ::base::mono_average + ).tint ); + + float3 multi_height_lookup = float3( + ::base::file_texture( + texture: multi_heights_tex, + uvw: uvw, + mono_source: ::base::mono_average + ).tint ); + + float3 norm = ::base::tangent_space_normal_texture( + texture: normal_tex, + factor: bump_strength, + uvw: uvw + ); + + + float remap_rough = histogram_range( + input: diff_rough_grunge_lookup.y, + range: 1.0f, + position: 0.234f + ); + + + float roughness_mapped = remap_rough + (roughness * multi_height_lookup.y); + + float remapped_diff = histogram_range( + input: diff_rough_grunge_lookup.x, + range: 1.0f, + position: (brightness * 0.4f) + 0.4f + ); + + float diff_contribution = ::math::pow(remapped_diff - ((grooves_dirt * 0.5) * multi_height_lookup.x * diff_rough_grunge_lookup.z), 2.67f); + + bsdf ggx_smith_bumped = ::df::weighted_layer( + layer: ::df::microfacet_ggx_smith_bsdf( + roughness_u: roughness_mapped * roughness_mapped, + roughness_v: roughness_mapped * roughness_mapped, + tint: color(diff_contribution), + mode: ::df::scatter_reflect + ), + base: bsdf(), + weight: 1.0f, + normal: norm + ); + + bsdf diff_bsdf = ::df::diffuse_reflection_bsdf( + tint: color(diff_contribution) + ); + + + bsdf final_bsdf = ::df::weighted_layer( + weight: 1.0f - (diff_rough_grunge_lookup.z * multi_height_lookup.x * grooves_dirt), + layer: ::df::directional_factor( + normal_tint: metal_tint, + grazing_tint: color(1.0f), + base: ggx_smith_bumped + ), + base: diff_bsdf + ); + + + // Round Corners + float3 round_normal = enable_round_corners ? + ::state::rounded_corner_normal( + radius: roundcorner_radius * 0.001, + across_materials: across_materials + ) : ::state::normal(); +} +in material ( + + surface: material_surface( + scattering: final_bsdf + ), + geometry: material_geometry( + normal: round_normal + ) +); + + +export material Chromium_Knurling_Worn(*) +[[ + ::anno::display_name("Metal Knurling - Chromium Worn"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Knurling.Chromium_Knurling_Worn.png"), + ::anno::key_words(string[]("metal", "chromium", "knurled", "pattern", "knurling", "design", "bumped", "worn")), + ::anno::contributor("Ruediger Raab"), + ::anno::author("NVIDIA vMaterials") +]] = Chromium_Knurling( + brightness: 0.4f, + roughness: 1.0f, + grooves_dirt: 1.0f, + bump_strength: 0.8f, + + enable_round_corners: false, + roundcorner_radius: 1.2f, + across_materials: false, + + texture_translate: 0.0f, + texture_rotate: 0.f, + texture_scale: 1.0f, + + uv_space_index: 0 +); + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Assets/Material/material_0411/Chromium_Sheet.mdl b/Assets/Material/material_0411/Chromium_Sheet.mdl new file mode 100644 index 0000000000000000000000000000000000000000..bee765329c8310a533de9cb09e29329fd961051a --- /dev/null +++ b/Assets/Material/material_0411/Chromium_Sheet.mdl @@ -0,0 +1,1336 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A sheet metal material with adjustable imperfections"; +const string DESCRIPTION_PUNCH = "Punched chromium sheet metal material with adjustable imperfections and punchings."; + + +float4 tile_select(uniform int select = 0) +{ + switch (select) + { + case 0: return float4(0.000, 0.333, 0.666, 1.000); + case 1: return float4(0.333, 0.666, 0.666, 1.000); + case 2: return float4(0.666, 1.000, 0.666, 1.000); + + case 3: return float4(0.000, 0.333, 0.333, 0.666); + case 4: return float4(0.333, 0.666, 0.333, 0.666); + case 5: return float4(0.666, 1.000, 0.333, 0.666); + + case 6: return float4(0.000, 0.333, 0.000, 0.333); + case 7: return float4(0.333, 0.666, 0.000, 0.333); + case 8: return float4(0.666, 1.000, 0.000, 0.333); + + default: return float4(0.000, 0.333, 0.000, 0.333); + } +} + +export struct vm_coordinates +[[ + ::anno::hidden() +]] +{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color"), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + return uv; +} + + +vm_coordinates vm_coord_hex( + vm_coordinates uv, + float scale = 1.0f) +{ + vm_coordinates uv_return; + float2 uv_ = float2(uv.uv.x, uv.uv.y); + + // same as from function get_hex above + float2 s = float2(1.0f, 1.7320508f); + float2 n = uv_ - float2(0.5f, 1.0f); + float4 c = ::math::floor(float4(uv_.x, uv_.y, n.x, n.y)/float4(s.x, s.y, s.x, s.y)) + 0.5f; + float2 h_1 = uv_ - float2(c.x, c.y) * s; + float2 h_2 = uv_ - (float2(c.z, c.w) + 0.5f) * s; + float4 uv_id = ::math::dot(h_1, h_1) < ::math::dot(h_2, h_2) ? float4(h_1.x, h_1.y, c.x, c.y) : float4(h_2.x, h_2.y, c.z, c.w); + + uv_return.uv = float2(uv_id.x*scale+0.5, uv_id.y*scale+0.5); + // unless we introduce random cell rotations where we need to compensate for this in the rotation + // we can just plain copy the rotation value + uv_return.rotation = uv.rotation; + return uv_return; +} + +// Offsets a set of uv coordinates in either row (u) or column (v) direction +vm_coordinates vm_coord_rowcol_offset( + vm_coordinates uv, + float offset, + bool horizontal_offset = true +) +{ + int index = horizontal_offset ? 0 : 1; + uv.uv[index] += ::math::floor(uv.uv[index ^ 1]) * offset; + return uv; +} + +vm_coordinates vm_coord_grid( + vm_coordinates uv, + float scale = 1.0f +) +{ + float2x2 scal = float2x2(scale, 0., 0., scale); + uv.uv = ::math::frac(uv.uv); + uv.uv -= 0.5f; + uv.uv = scal * uv.uv; + uv.uv = uv.uv + 0.5f; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f), + + uniform ::tex::wrap_mode wrap_u = ::tex::wrap_repeat, + uniform ::tex::wrap_mode wrap_v = ::tex::wrap_repeat, + uniform float2 crop_u = float2(0.0, 1.0), + uniform float2 crop_v = float2(0.0, 1.0) +) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, wrap_u, wrap_v, crop_u, crop_v) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +// *** SET CUTOUT ENUM NAMES *** +export enum cutout_pattern +[[ + ::anno::description("Cutout Pattern."), + ::anno::hidden() +]] +{ + pattern_circle = 0 + [[ ::anno::display_name("Circle")]], + pattern_hexagon = 1 + [[ ::anno::display_name("Hexagon")]], + pattern_line = 2 + [[ ::anno::display_name("Line") ]], + + pattern_square = 3 + [[ ::anno::display_name("Square")]], + pattern_rectangle = 4 + [[ ::anno::display_name("Rectangle")]], + pattern_cross = 5 + [[ ::anno::display_name("Cross")]], + + pattern_rhombus = 6 + [[ ::anno::display_name("Rhombus")]], + pattern_triangle = 7 + [[ ::anno::display_name("Triangle")]], + pattern_star = 8 + [[ ::anno::display_name("Star")]] +}; + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + + +export material Chromium_Sheet( + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance", "Main") + ]], + float sheet_brightness = 0.5f [[ + ::anno::display_name("Brightness"), + ::anno::description("Controls the brightness of the material."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float roughness = 0.2f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float streaks = 0.0f [[ + ::anno::display_name("Streaks Weight"), + ::anno::description("Adds directional streaks that occur as part of the sheet manufacturing process."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float scratch_bump_factor = 0.0f [[ + ::anno::description("Determines the degree of bumpiness."), + ::anno::display_name("Bump Factor Streaks"), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float imperfections_amount = 0.6f [[ + ::anno::description("Balances between a perfectly smooth metal and a surface that has various imperfections."), + ::anno::display_name("Imperfections Amount"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_1 = 0.f [[ + ::anno::display_name("Washed Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_2 = 0.939f [[ + ::anno::display_name("Noisy Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_3 = 0.0 [[ + ::anno::display_name("Splotchy Imperfection Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 0.1f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f) + ]], + uniform float2 texture_scale = 1.0f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.75f, 0.75f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - New Clean"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] + = + let { + color normal_reflectivity = color(0.549302f, 0.5560554f, 0.5542377f); + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + bool tmp0 = false; + material_surface tmp1( + ::df::color_custom_curve_layer(normal_reflectivity, grazing_reflectivity, 5.f, color(::math::lerp(0.400000006f, 1.f, sheet_brightness) * ::math::lerp(1.f, ::math::pow(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 2.20000005f), ::math::lerp(0.f, 0.300000012f, streaks))), ::df::weighted_layer(0.0700000003f, ::df::microfacet_ggx_smith_bsdf(0.150000006f, 0.150000006f, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::microfacet_ggx_smith_bsdf((::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)) * (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)), (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)) * (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::math::normalize(::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./sheet_metal_norm.jpg", ::tex::gamma_linear), scratch_bump_factor, false, false, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), histogram_scan_big(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.242000014f, 0.850000024f)))), bsdf(), ::math::normalize(::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./sheet_metal_norm.jpg", ::tex::gamma_linear), scratch_bump_factor, false, false, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), histogram_scan_big(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.242000014f, 0.850000024f)))), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + enable_round_corners ? ::state::rounded_corner_normal(roundcorner_radius, across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + + +export material Chromium_Sheet_Punched( + // Cutout parameters + + uniform cutout_pattern shape_select = pattern_circle //select atlas tile here + [[ + ::anno::description("Select a cutout shape."), + ::anno::display_name("Cutout Shape"), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(0) + ]], + float2 punching_grid_size = float2(.5f, .5f) + [[ + ::anno::description("Scales the size of the punching grid."), + ::anno::display_name("Punching Grid Size"), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(1) + ]], + float cutout_size = .92f + [[ + ::anno::description("Scales the size of the cutout pattern independently from the base material."), + ::anno::display_name("Cutout Size"), + ::anno::hard_range(0.f, 1.2f), + ::anno::soft_range(0.f, 1.0f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(2) + ]], + float cutout_roundness = .4f + [[ + ::anno::description("At low values it makes the cutouts sharper. Higher values give the shapes a more rounded look."), + ::anno::display_name("Cutout Roundness"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(3) + ]], + float cutout_bevel_width = 0.5f + [[ + ::anno::description("Adjusts the width of the bevel transition."), + ::anno::display_name("Cutout Bevel Width"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(4) + ]], + float cutout_bump_strength = .8f + [[ + ::anno::description("Sets the strength of the bevelled normal around the cutout."), + ::anno::display_name("Cutout Bevel Strength"), + ::anno::soft_range(0.0f, 1.0f), + ::anno::hard_range(0.0f, 2.0f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(5) + ]], +// Grid Layout parameters + bool hexagonal_grid = true + [[ + ::anno::description("When enabled, the punching will occur on a hexagonal grid, otherwise a square grid."), + ::anno::display_name("Enable Hexagonal Grid"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::ui_order(6) + ]], + float square_grid_offset = 0.0f + [[ + ::anno::description("Offsets each row of the grid by a certain amount."), + ::anno::display_name("Square Grid Offset"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::enable_if("hexagonal_grid==false"), + ::anno::ui_order(7) + ]], + bool horizontal_offset = true + [[ + ::anno::description("Choose whether to offset either in row or column direction."), + ::anno::display_name("Horizontal Offset"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::enable_if("hexagonal_grid==false"), + ::anno::ui_order(8) + ]], + + + +// Chromium Sheet parameters + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance", "Main") + ]], + float sheet_brightness = 0.9f [[ + ::anno::display_name("Brightness"), + ::anno::description("Controls the brightness of the material."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float roughness = 0.2f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float streaks = 0.1f [[ + ::anno::display_name("Streaks Weight"), + ::anno::description("Adds directional streaks that occur as part of the sheet manufacturing process."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float scratch_bump_factor = 0.0f [[ + ::anno::description("Determines the degree of bumpiness."), + ::anno::display_name("Bump Factor Streaks"), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float imperfections_amount = 0.6f [[ + ::anno::description("Balances between a perfectly smooth metal and a surface that has various imperfections."), + ::anno::display_name("Imperfections Amount"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_1 = 0.3f [[ + ::anno::display_name("Washed Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_2 = 1.0f [[ + ::anno::display_name("Noisy Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_3 = 0.5f [[ + ::anno::display_name("Splotchy Imperfection Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f) + ]], + uniform float2 texture_scale = 1.0f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.75f, 0.75f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 0.1f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Circular Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "neutral")) +]] = let +{ + material base_mat = Chromium_Sheet( + infinite_tiling: infinite_tiling, + sheet_brightness: sheet_brightness, + roughness: roughness, + streaks: streaks, + scratch_bump_factor: scratch_bump_factor, + imperfections_amount: imperfections_amount, + impurities_weight_1: impurities_weight_1, + impurities_weight_2: impurities_weight_2, + impurities_weight_3: impurities_weight_3, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + enable_round_corners: enable_round_corners, + roundcorner_radius: roundcorner_radius, + across_materials: across_materials + ); + texture_2d punching_cutout = texture_2d("./atlas_02_norm_dist.png", ::tex::gamma_linear); + + // remap range of slider to avoid artifacts in the bevelling + float2 punching_scale = texture_scale * 0.01f * punching_grid_size; + float cutout_roundness_ = cutout_roundness*0.6f+0.4f; + float cutout_size_lin = (1.0f/cutout_size); + float cutout_bevel_width_ = 0.1 + cutout_bevel_width * 0.9f; + + vm_coordinates uv = vm_coord( + translation: texture_translate, + rotation: texture_rotate, + scaling: punching_scale, + uv_space: uv_space_index + ); + + vm_coordinates punching_uv = hexagonal_grid ? vm_coord_hex( + uv: uv, + scale: cutout_roundness_ * cutout_size_lin + ) : vm_coord_grid( + uv: vm_coord_rowcol_offset( + uv: uv, + offset: square_grid_offset, + horizontal_offset: horizontal_offset + ), + scale: cutout_roundness_ * cutout_size_lin + ); + // select the correct subtile from the atlas + float4 crop = tile_select(shape_select); + + ::base::texture_return lookup = vm_tex_lookup( + tex: punching_cutout, + uv: punching_uv, + mono_source: mono_a, + scale: float4(1.0f), + crop_u: float2(crop.x, crop.y), + crop_v: float2(crop.z, crop.w), + wrap_u: ::tex::wrap_clamp, + wrap_v: ::tex::wrap_clamp + ); + + float low = (1.0 - cutout_roundness_); + float high = (cutout_size_lin * (cutout_bevel_width_ * 0.2f) * cutout_roundness_) + (1.0 - cutout_roundness_); + // remap x...y to (clamped) 0...1 + float x = ::math::clamp((lookup.mono - low)/(high - low), 0.0, 1.0); + // spherical falloff + float falloff=::math::sqrt(1.0-x*x); + // masking falloff as the center of the cutout is flat + float masked_falloff=falloff<=0.0?1.0:falloff; + + // where base material is still there, use the value of the base material + float cutout= ::math::min(falloff<=0.0?0.0:1.0, base_mat.geometry.cutout_opacity); + + // bring in -.5 ... +.5 range and lerp between lookup and flat normal + float3 remap_norm = ::math::lerp(float3(lookup.tint), float3(0.5, 0.5, 1.0), masked_falloff) - float3(0.5); + float3 t_norm = ::math::normalize(remap_norm * float3(cutout_bump_strength, cutout_bump_strength, 1.0)); + + float3 rotfix_norm = float3(::math::cos(punching_uv.rotation) * t_norm.x - ::math::sin(punching_uv.rotation) * t_norm.y, + ::math::sin(punching_uv.rotation) * t_norm.x + ::math::cos(punching_uv.rotation) * t_norm.y, + t_norm.z); + + float3 normal = ::state::texture_tangent_u(punching_uv.uv_space_index) * rotfix_norm.x + + ::state::texture_tangent_v(punching_uv.uv_space_index) * rotfix_norm.y + + ::state::normal() * rotfix_norm.z; + + float3 final_normal = ::base::blend_normals( + base_normal: normal, + base_normal_weight: 1.0f, + detail_normal: base_mat.geometry.normal, + detail_normal_weight: 1.0f + ); + +} in material( + surface: material_surface( + scattering: base_mat.surface.scattering + ), + volume: base_mat.volume, + ior: base_mat.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base_mat.geometry.displacement, + normal: final_normal, + cutout_opacity: cutout + ) +); + + + + +// ------------------------ Chromium Sheet Presets ------------------------ +export material Chromium_Sheet_Soft_Splotches(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - Soft Splotches"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Soft_Splotches.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral", "gray")) +]] += Chromium_Sheet( + infinite_tiling: false, + sheet_brightness: 0.5f, + roughness: 0.3f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.75f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.01f, + impurities_weight_3: 0.98f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Chromium_Sheet_Matte_Imperfections(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - Matte Imperfections"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Matte_Imperfections.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "matte", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]]= Chromium_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.75f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.265f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.43f, + impurities_weight_3: 0.0f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Chromium_Sheet_Glossy_Imperfections(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - Glossy Imperfections"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Glossy_Imperfections.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] += Chromium_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.3f, + streaks: 0.1f, + scratch_bump_factor: 0.15f, + imperfections_amount: 0.1f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.89f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Chromium_Sheet_Splotchy_Streaks(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - Splotchy Streaks"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Splotchy_Streaks.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]]= Chromium_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.6f, + streaks: 0.1f, + scratch_bump_factor: 0.2f, + imperfections_amount: 0.26f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.76f, + impurities_weight_3: 0.13f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + +export material Chromium_Sheet_Glossy_Streaks(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Chromium - Glossy Streaks"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Glossy_Streaks.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] += Chromium_Sheet( + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + +// ------------------------ Punched Chromium Sheet Presets ------------------------ + +export material Chromium_Sheet_Punched_Circular_Small(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Small Circular Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Circular_Small.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "circular", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_circle, + punching_grid_size: float2(.6f), + cutout_size: 0.5f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 0.8f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Hexagonal(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Hexagonal Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Hexagonal.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "hexagonal", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_hexagon, + punching_grid_size: 1.5f, + cutout_size: .95f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Hexagonal_Small(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Small Hexagonal Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Hexagonal_Small.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "hexagonal", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_hexagon, + punching_grid_size: float2(.75f), + cutout_size: .58f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.3f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Square(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Square Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Square.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "square", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_square, + punching_grid_size: 1.2f, + cutout_size: 0.56f, + cutout_roundness: 0.1f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: false, + square_grid_offset: 0.5f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Line(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Line Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Line.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "line", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_line, + punching_grid_size: 1.3f, + cutout_size: 0.59f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.3f, + cutout_bump_strength: 1.5f, + hexagonal_grid: false, + square_grid_offset: 0.3333f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chromium_Sheet_Punched_Cross(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Cross Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Cross.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "cross", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_cross, + punching_grid_size: 2.0f, + cutout_size: 0.59f, + cutout_roundness: 0.1f, + cutout_bevel_width: 0.44f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Rhombus(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Rhombus Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Rhombus.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "rhombus", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_rhombus, + punching_grid_size: 1.4f, + cutout_size: 1.0f, + cutout_roundness: 0.8f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Triangle(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Triangle Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Triangle.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "triangle", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_triangle, + punching_grid_size: 1.3f, + cutout_size: 1.08f, + cutout_roundness: 1.0f, + cutout_bevel_width: 1.0f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Chromium_Sheet_Punched_Star(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Chromium Sheet - Star Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chromium_Sheet.Chromium_Sheet_Punched_Star.png"), + ::anno::key_words(string[]("metal", "sheet", "chromium", "interior", "exterior", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "decorative", "punched", "punching", "star", "neutral")) +]] = Chromium_Sheet_Punched ( + // Punching parameters + shape_select: pattern_star, + punching_grid_size: 1.5f, + cutout_size: 0.68f, + cutout_roundness: 0.5f, + cutout_bevel_width: 0.44f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); \ No newline at end of file diff --git a/Assets/Material/material_0444/Metal_Mesh_Weave_02.mdl b/Assets/Material/material_0444/Metal_Mesh_Weave_02.mdl new file mode 100644 index 0000000000000000000000000000000000000000..946b665b8796c790d244f69a476add08da6b054a --- /dev/null +++ b/Assets/Material/material_0444/Metal_Mesh_Weave_02.mdl @@ -0,0 +1,606 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.6; + +import ::df::*; +import ::base::*; +import ::math::*; +import ::state::*; +import ::anno::*; +import ::tex::*; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + + +uniform float4x4 rotation_translation_scale( + uniform float3 rotation = float3(0.) + [[ ::anno::description("Rotation applied to every UVW coordinate.") ]], + uniform float3 translation = float3(0.) + [[ ::anno::description("Offset applied to every UVW coordinate.") ]], + uniform float3 scaling = float3(1.) + [[ ::anno::description("Scale applied to every UVW coordinate.") ]] +) +[[ + ::anno::description("Construct transformation matrix from Euler rotation, translation and scale."), + ::anno::hidden() +]] +{ + float4x4 scale = + float4x4(scaling.x , 0. , 0. , 0., + 0. , scaling.y , 0. , 0., + 0. , 0. , scaling.z , 0., + translation.x, translation.y, translation.z, 1.); + + float3 s = ::math::sin(rotation); + float3 c = ::math::cos(rotation); + float4x4 rotate = + float4x4( c.y*c.z , -c.x*s.z + s.x*s.y*c.z , s.x*s.z + c.x*s.y*c.z , 0.0, + c.y*s.z , c.x*c.z + s.x*s.y*s.z , -s.x*c.z + c.x*s.y*s.z , 0.0, + -s.y , s.x*c.y , c.x*c.y , 0.0, + 0. , 0 , 0 , 1.); + + return scale*rotate; +} + +::base::texture_return blend_colors( + color color_1 = color(1.0, 0.0, 0.0), + color color_2 = color(0.0, 1.0, 0.0), + float blend = 0.5 +) +[[ + ::anno::hidden() +]] +{ + return ::base::blend_color_layers( + layers: ::base::color_layer[]( + ::base::color_layer( + layer_color: color_2, + weight: blend, + mode: ::base::color_layer_blend + )), + base: color_1 + ); +} + +::base::texture_return multiply_colors( + color color_1 = color(1.0, 0.0, 0.0), + color color_2 = color(0.0, 1.0, 0.0), + float blend = 0.5 +) +[[ + ::anno::hidden() +]] +{ + return ::base::blend_color_layers( + layers: ::base::color_layer[]( + ::base::color_layer( + layer_color: color_2, + weight: blend, + mode: ::base::color_layer_multiply + )), + base: color_1 + ); +} + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + ::anno::hidden(), + ::anno::unused() + +]] +{ + return + n.x* float3(::state::texture_tangent_u(0).x,::state::texture_tangent_v(0).x,::state::normal().x)+ + n.y* float3(::state::texture_tangent_u(0).y,::state::texture_tangent_v(0).y,::state::normal().y)+ + n.z* float3(::state::texture_tangent_u(0).z,::state::texture_tangent_v(0).z,::state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + ::anno::hidden(), + ::anno::unused() +]] +{ + return ::state::texture_tangent_u(0) * n.x + + ::state::texture_tangent_v(0) * n.y + + ::state::normal() * n.z ; +} + + +// Returns a normal by adding a detail normal to a global normal. +float3 add_detail_normal(float3 nd = ::state::normal(), float3 n = ::state::normal()) +[[ + ::anno::hidden(), + ::anno::unused() +]] +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + + n = n_t*::math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + +enum metal_color_enum{steel = 0, brass = 1, copper = 2}; + + +export material Metal_Mesh_Weave_02 ( + color weave_color = color(0.373615, 0.186989, 0.052842) + [[ + ::anno::display_name("Metal Weave Color"), + ::anno::description("Specifies the base color of the material."), + ::anno::in_group("Appearance") + ]], + float weave_color_variation = 0.0 + [[ + ::anno::display_name("Weave Color Variation"), + ::anno::hard_range(float(0.0f), float(1.0f)), + ::anno::description("Adds some brightness variation to the metal color."), + ::anno::in_group("Appearance") + ]], + float weave_roughness = float(0.6) + [[ + ::anno::display_name("Metal Weave Roughness"), + ::anno::soft_range(float(0.0f), float(1.0f)), + ::anno::description("The Roughness of the material."), + ::anno::in_group("Appearance") + ]], + color rod_color = color(.37) + [[ + ::anno::display_name("Metal Bar Color"), + ::anno::description("Specifies the base color of the material."), + ::anno::in_group("Appearance") + ]], + float rod_roughness = float(0.0) + [[ + ::anno::display_name("Metal Bar Roughness"), + ::anno::hard_range(float(0.0f), float(1.0f)), + ::anno::description("The Roughness of the material."), + ::anno::in_group("Appearance") + ]], + float AO_weight = 0.7 + [[ + ::anno::display_name("Metal Darkening"), + ::anno::hard_range(float(0.0f), float(1.0f)), + ::anno::description("Darkens the appearance of the weave by weighing in precalculated ambient occlusion."), + ::anno::in_group("Other") + ]], + + uniform float bump_amount_1 = 1.0 + [[ + ::anno::display_name("Weaving Bump Amount"), + ::anno::description("Specifies the intensity of the normal texture."), + ::anno::in_group("Appearance") + ]], + + // Adjustments Group + uniform float2 texture_translate = 0.0f + [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Adjustments") + ]], + uniform float texture_rotate = 0.0f + [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Adjustments") + ]], + uniform float2 texture_scale = 2.0f + [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 2.0f)), + ::anno::in_group("Adjustments") + ]] +) +[[ + ::anno::author("NVIDIA ARC"), + ::anno::display_name("Metalweave 02"), + ::anno::description("A woven brushed metal material."), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Metal_Mesh_Weave_02.png"), + ::anno::hidden() +]] = let { + + float specular = 0.5; + float metallic = 1.0; + float rod_roughness_mapped = rod_roughness * 0.5; + float diffuse_metal_amount = 0.1; // This accounts for the fact, that all the rough metals also behave a bit like + // diffuse surfaces. This is a lazy method but proves to give enough visual + // credibility + // Textures + texture_2d weave_colormask_tex = texture_2d("./metalweave_02_color_mask.png", ::tex::gamma_srgb); + texture_2d weave_metalcolormask_tex = texture_2d("./metalweave_02_metalcolor_mask.png", ::tex::gamma_srgb); + texture_2d weave_roughness_tex = texture_2d("./metalweave_02_rough.jpg", ::tex::gamma_linear); + texture_2d weave_normal_tex = texture_2d("./metalweave_02_norm.jpg", ::tex::gamma_linear); + texture_2d AO_tex = texture_2d("./metalweave_02_AO.jpg", ::tex::gamma_srgb); + + ::base::texture_coordinate_info uvw = ::base::coordinate_source( + coordinate_system: ::base::texture_coordinate_uvw, + texture_space: 0 + ); + + + ::base::texture_coordinate_info transformed_uvw = ::base::transform_coordinate( + transform: rotation_translation_scale( + scaling: float3(4.f/texture_scale.x, 4.f/texture_scale.y, 1.0), + rotation: float3(0.0, 0.0, texture_rotate/180.*::math::PI ), + translation: float3(texture_translate.x, texture_translate.y, 0.0) + ), + coordinate: uvw + ); + + + ::base::texture_coordinate_info AO_and_norm_uvw = ::base::transform_coordinate( + transform: float4x4(2 , 0.0 , 0.0, 0.0, + 0.0 , 2 , 0.0, 0.0, + 0.0 , 0.0 , 1.0, 0.0, + 0.0 , 0.0 , 0.0, 1.0), + coordinate: transformed_uvw + ); + + ::base::texture_coordinate_info color_mask_uvw = ::base::transform_coordinate( + transform: float4x4(2 , 0.0 , 0.0, 0.0, + 0.0 , 10 , 0.0, 0.0, + 0.0 , 0.0 , 1.0, 0.0, + 0.0 , 0.0 , 0.0, 1.0), + coordinate: transformed_uvw + ); + + + float weave_colormask_lookup = ::base::file_texture( + texture: weave_colormask_tex, + color_offset: color(0.0, 0.0, 0.0), + color_scale: color(1.0, 1.0, 1.0), + mono_source: ::base::mono_average, + uvw: color_mask_uvw, + clip: false + ).mono; + + + float weave_metalcolormask_lookup = ::base::file_texture( + texture: weave_metalcolormask_tex, + color_offset: color(0.0, 0.0, 0.0), + color_scale: color(1.0, 1.0, 1.0), + mono_source: ::base::mono_average, + uvw: transformed_uvw, + clip: false + ).mono; + + color AO_lookup = ::base::file_texture( + texture: AO_tex, + color_offset: color(0.0, 0.0, 0.0), + color_scale: color(1.0, 1.0, 1.0), + mono_source: ::base::mono_average, + uvw: AO_and_norm_uvw, + clip: false + ).tint; + + float weave_roughness_lookup = ::base::file_texture( + texture: weave_roughness_tex, + color_offset: color(0.025, 0.025, 0.025), + color_scale: color(weave_roughness), + mono_source: ::base::mono_average, + uvw: transformed_uvw, + clip: false + ).mono; + + float roughness = ::math::lerp(weave_roughness_lookup, rod_roughness_mapped, weave_colormask_lookup); + + color metal_color = blend_colors(weave_color, weave_color * (1.0-(weave_color_variation*0.7)), weave_metalcolormask_lookup).tint; + + color base_color = multiply_colors(blend_colors(metal_color, rod_color, weave_colormask_lookup).tint, + AO_lookup, + AO_weight + ).tint; + + // Metallic Roughness Model + bsdf diffuse_bsdf = ::df::diffuse_reflection_bsdf( + roughness: 0.0f, //assign the user controllable + tint: base_color //values to the bsdf + ); + + bsdf ggx_smith_bsdf = ::df::microfacet_ggx_smith_bsdf( + roughness_u: roughness*roughness, + roughness_v: roughness*roughness, + tint: color(1.0, 1.0, 1.0), + mode: ::df::scatter_reflect + ); + + bsdf custom_curve_layer_bsdf = ::df::custom_curve_layer( + normal_reflectivity: 0.08 * specular, + grazing_reflectivity: 1.0, + exponent: 3.0, + weight: 1.0, + layer: ggx_smith_bsdf, + base: diffuse_bsdf + ); + + bsdf directional_factor_bsdf = ::df::directional_factor( + normal_tint: base_color, + grazing_tint: base_color, + exponent: 3.0f, + base: ggx_smith_bsdf + ); + + bsdf pre_final_bsdf = ::df::weighted_layer( + base: custom_curve_layer_bsdf, + weight: metallic, + layer: directional_factor_bsdf + ); + + bsdf final_bsdf = ::df::weighted_layer( + weight: diffuse_metal_amount, + layer: diffuse_bsdf, + base: pre_final_bsdf + ); + + // Normal lookup + float3 the_normal = ::base::tangent_space_normal_texture( + texture: weave_normal_tex, + factor: bump_amount_1, + uvw: AO_and_norm_uvw, + flip_tangent_u: false, + flip_tangent_v: false + ); + + +} in material ( + surface: material_surface( + scattering: final_bsdf + ), + geometry: material_geometry( + normal: the_normal + ) +); + + + + + +// 1 Copper Steel +export material Woven_Metal_02_Copper_Steel(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Copper Steel"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "copper", "steel", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Copper_Steel.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.812241, 0.302125, 0.136099), + weave_color_variation: 0.5f, + weave_roughness: 0.75f, + rod_color: color(0.368591), + rod_roughness: 0.0f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + +// 2 Copper Pure +export material Woven_Metal_02_Copper_Pure(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Copper Pure"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "copper", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Copper_Pure.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.812241, 0.302125, 0.136099), + weave_color_variation: 0.5f, + weave_roughness: 0.33f, + rod_color: color(0.358654, 0.133209, 0.060032), + rod_roughness: 0.0f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + +// 3 Brass Steel +export material Woven_Metal_02_Brass_Steel(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Brass Steel"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "brass", "steel", "yellow", "gold", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Brass_Steel.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.652370, 0.464741, 0.163641), + weave_color_variation: 0.5f, + weave_roughness: 0.33f, + rod_color: color(0.368591), + rod_roughness: 0.0f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + +// 4 Brass Pure +export material Woven_Metal_02_Brass_Pure(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Brass Pure"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "brass", "yellow", "gold", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Brass_Pure.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.652370, 0.464741, 0.163641), + weave_color_variation: 0.5f, + weave_roughness: 0.33f, + rod_color: color(0.358654, 0.254916, 0.089194), + rod_roughness: 0.5f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + +// 5 Steel Brass +export material Woven_Metal_02_Steel_Brass(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Steel Brass"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "steel", "brass", "gray")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Steel_Brass.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.383775), + weave_color_variation: 0.5f, + weave_roughness: 0.33f, + rod_color: color(0.358654, 0.254916, 0.089194), + rod_roughness: 0.2f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + +// 6 Steel Brass +export material Woven_Metal_02_Steel_Pure(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Steel Pure"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "steel", "gray")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Steel_Pure.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.383775), + weave_color_variation: 0.5f, + weave_roughness: 0.33f, + rod_color: color(0.250840), + rod_roughness: 0.2f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + +// 7 Gold Glossy +export material Woven_Metal_02_Gold_Glossy(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Gold Glossy"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "steel", "gold", "glossy", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Gold_Glossy.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.796917, 0.493616, 0.103634), + weave_color_variation: 0.4f, + weave_roughness: 0.2f, + rod_color: color(0.368591), + rod_roughness: 0.2f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + +// 8 Gold Matte +export material Woven_Metal_02_Gold_Matte(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Weave 02 - Gold Matte"), + ::anno::description("Strong metal shapes woven around metal rods forming a solid sheet of metal."), + ::anno::key_words(string[]("design", "metal", "mesh", "weave", "woven", "fancy", "decorative", "brushed", "bumped", "new", "multimaterial", "steel", "gold", "matte", "warm")), + ::anno::thumbnail("./.thumbs/Metal_Mesh_Weave_02.Woven_Metal_02_Gold_Matte.png"), + ::anno::copyright_notice(COPYRIGHT) +]] += Metal_Mesh_Weave_02( + weave_color: color(0.796917, 0.493616, 0.103634), + weave_color_variation: 0.8f, + weave_roughness: 0.9f, + rod_color: color(0.368591), + rod_roughness: 0.5f, + AO_weight: .7f, + bump_amount_1: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 2.0f +); + + + + diff --git a/Assets/Material/material_0464/Silver.mdl b/Assets/Material/material_0464/Silver.mdl new file mode 100644 index 0000000000000000000000000000000000000000..42b8d1d5349608500e199ff70370fabe1ae69006 --- /dev/null +++ b/Assets/Material/material_0464/Silver.mdl @@ -0,0 +1,378 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.4; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + + +export material Silver( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance") + ]], + float roughness = 0.1f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + float smudges = 0.5f [[ + ::anno::description("Adds blurrier reflection that follow the intensities of the Roughness texture on top."), + ::anno::display_name("Smudges"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float radius = 0.03f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners") + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("When enabled the round corner effect is applied across different materials."), + ::anno::in_group("Round Corners") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::soft_range(0.f, 360.f), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(.45f, .45f)) + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::in_group("Advanced") + ]], + float3 normal = ::state::normal() [[ + ::anno::description("Modify the surface normal."), + ::anno::display_name("Normal"), + ::anno::in_group("Advanced") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Silver"), + ::anno::description("Pure metal material with optional smudges."), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver.Silver.png"), + ::anno::key_words(string[]("metal", "pure", "smudged", "design", "reflective", "infinite tiling", "smooth", "conductor", "new", "polished", "silver")) +]] + = + let { + + color normal_reflectivity = color(0.9614253056f, 0.948983344333f, 0.918968346466f); // Silver + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + bool tmp0 = false; + material_surface tmp1( + ::df::color_custom_curve_layer(normal_reflectivity, grazing_reflectivity, 5.f, color(1.f, 1.f, 1.f), ::df::microfacet_ggx_smith_bsdf(::math::lerp(::math::lerp(0.f, 0.5f, roughness), ::math::lerp(0.f, 0.5f, roughness) + smudges * (1.f - ::math::lerp(0.f, 0.5f, roughness)), infinite_tiling ? float3(endless_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.0820000023f), 8.f, false))[0] : ::base::file_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono) * ::math::lerp(::math::lerp(0.f, 0.5f, roughness), ::math::lerp(0.f, 0.5f, roughness) + smudges * (1.f - ::math::lerp(0.f, 0.5f, roughness)), infinite_tiling ? float3(endless_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.0820000023f), 8.f, false))[0] : ::base::file_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono), ::math::lerp(::math::lerp(0.f, 0.5f, roughness), ::math::lerp(0.f, 0.5f, roughness) + smudges * (1.f - ::math::lerp(0.f, 0.5f, roughness)), infinite_tiling ? float3(endless_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.0820000023f), 8.f, false))[0] : ::base::file_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono) * ::math::lerp(::math::lerp(0.f, 0.5f, roughness), ::math::lerp(0.f, 0.5f, roughness) + smudges * (1.f - ::math::lerp(0.f, 0.5f, roughness)), infinite_tiling ? float3(endless_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.0820000023f), 8.f, false))[0] : ::base::file_texture(texture_2d("./metal_smudges_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).mono), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), bsdf(), normal), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + enable_round_corners ? ::state::rounded_corner_normal(radius, across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + +export material Silver_Polished(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Silver Polished"), + ::anno::description("Pure metal material with optional smudges."), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver.Silver_Polished.png"), + ::anno::key_words(string[]("metal", "pure", "design", "reflective", "infinite tiling", "smooth", "conductor", "new", "polished", "silver")) +]] += Silver( + infinite_tiling: true, + roughness: 0.0f, + smudges: 0.0f, + enable_round_corners: false, + radius: 0.03f, + across_materials: false, + texture_translate: float2(0.0f, 0.0f), + texture_rotate: 0.0f, + texture_scale: float2(1.0f, 1.0f), + uv_space_index: 0, + normal: ::state::normal() +); + + +export material Silver_Glossy_Fingerprints(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Silver Glossy Fingerprints"), + ::anno::description("Pure metal material with optional smudges."), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver.Silver_Glossy_Fingerprints.png"), + ::anno::key_words(string[]("metal", "pure", "design", "smudged", "reflective", "infinite tiling", "smooth", "conductor", "new", "polished", "Silver")) +]] += Silver( + infinite_tiling: true, + roughness: 0.23f, + smudges: 1.0f, + enable_round_corners: false, + radius: 0.03f, + across_materials: false, + texture_translate: float2(0.0f, 0.0f), + texture_rotate: 0.0f, + texture_scale: float2(1.0f, 1.0f), + uv_space_index: 0, + normal: ::state::normal() +); + + + +/* +- Aluminum + 0.911810895428,0.914089043421,0.920152876196 + +- Copper + 0.9654565, 0.6899602, 0.4830392 + +- Chromium + 0.549302, 0.5560554, 0.5542377 + +- Iron + 0.5293683, 0.5132565, 0.4942483 + +- Gold + 1.0,0.722306985258,0.340058756743 + +- Nickel + 0.696691094703,0.640529134605,0.563260231405 + +- Platinum + 0.678533319955,0.639590890417,0.583638675413 + +- Mercury + 0.780978740699,0.779541528985,0.778441417779 + +- Silver + 0.9614253056,0.948983344333,0.918968346466 + +- Titanium + 0.618264052974,0.579396264956,0.542545225681 + +- Tungsten + 0.951001417565,0.815051845356,0.751931718925 + +- Zinc + 0.87467950988,0.868943040106,0.855089634324 + + +*/ diff --git a/Assets/Material/material_0465/Silver_Brushed.mdl b/Assets/Material/material_0465/Silver_Brushed.mdl new file mode 100644 index 0000000000000000000000000000000000000000..b2f70f159f3fac897732a1462bdb92b829d36f5c --- /dev/null +++ b/Assets/Material/material_0465/Silver_Brushed.mdl @@ -0,0 +1,301 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.5; +import ::anno::*; +import ::base::*; +import ::math::*; +import ::state::*; +import ::std::*; +import ::tex::*; +import ::df::*; +import ::nvidia::core_definitions::*; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "Brushed metal material with adjustable settings for the brushing"; + + +float histogram_range(float input, float range, float position) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + +export material Silver_Brushed( + float brush_width = 1.0f [[ + ::anno::display_name("Roughness Width"), + ::anno::description("Widens the anisotropic metal reflections which leads to a stronger effect of " + "the metal brushing."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float brush_height_blur = 0.75f [[ + ::anno::display_name("Roughness Height"), + ::anno::description("Increases the anisotropy of the brushed metal, blurring the reflections."), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float scratch_variation_amount = 1.f [[ + ::anno::description("Adds a bit variation to the roughness of the brushing pattern in the form of occasional scratches that sprea dout in a wider range."), + ::anno::display_name("Scratch Variation Amount"), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float scratch_reflection_variation = 0.4f [[ + ::anno::description("Attenuates the reflection of the brushed metal which will also make the material appear darker."), + ::anno::display_name("Scratch Reflection Variation"), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + float scratches_bump = 0.65f [[ + ::anno::description("Introduces normal-mapped scratches which further add to the realistic appearance of the surface. However, this might become for the renderer more difficult to resolve."), + ::anno::display_name("Scratches Bump Amount"), + ::anno::hard_range(0.0f, 1.0f), + ::anno::in_group("Appearance") + ]], + uniform bool enable_round_corners = false [[ + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::display_name("Round Corner Radius"), + ::anno::description("Adjusts the radius of the round corner effect."), + ::anno::soft_range(0.0f, 0.1f), + ::anno::in_group("Round Corners") + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the rounded corner effect also between other materials."), + ::anno::in_group("Round Corners") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::display_name("Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::display_name("Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::display_name("Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(0.75f, 0.75f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Use selected UV space for material."), + ::anno::in_group("Advanced") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Brushed Silver - Strong Brushing"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Brushed.Silver_Brushed.png"), + ::anno::key_words(string[]("aec", "metal", "silver", "brushed", "kitchen", "design", "modern", "reflective", "shiny", "architecture", "sanitary", "new", "gray", "neutral")) +]] + = + let { + color normal_reflectivity = color(0.9614253056f, 0.948983344333f, 0.918968346466f); // Silver + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + bool tmp0 = false; + material_surface tmp1( + ::df::color_custom_curve_layer(::nvidia::core_definitions::blend_colors(normal_reflectivity, color(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0]), ::base::color_layer_multiply, scratch_reflection_variation).tint, ::nvidia::core_definitions::blend_colors(grazing_reflectivity, color(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0]), ::base::color_layer_multiply, scratch_reflection_variation).tint, 5.f, color(1.f, 1.f, 1.f), ::df::weighted_layer(0.0900000036f, ::df::microfacet_ggx_smith_bsdf(0.399000019f, 0.399000019f, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::microfacet_ggx_smith_bsdf(::math::lerp(histogram_range(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.183000013f, ::math::lerp(0.100000001f, 0.400000006f, brush_width)), 0.376000017f, scratch_variation_amount * float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * ::math::lerp(histogram_range(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.183000013f, ::math::lerp(0.100000001f, 0.400000006f, brush_width)), 0.376000017f, scratch_variation_amount * float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::math::lerp(histogram_range(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.100000001f, ::math::lerp(0.0500000007f, 0.25f, brush_height_blur)), 0.376000017f, scratch_variation_amount * float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * ::math::lerp(histogram_range(float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 0.100000001f, ::math::lerp(0.0500000007f, 0.25f, brush_height_blur)), 0.376000017f, scratch_variation_amount * float3(::base::file_texture(texture_2d("./brushed_metal_linear_R_rough_G_scratchvar_B_impurities.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./brushed_metal_linear_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), scratches_bump)), bsdf(), ::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./brushed_metal_linear_norm.jpg", ::tex::gamma_linear), 1.f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale * 0.25f, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), scratches_bump)), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5 = enable_round_corners ? material_geometry(float3(0.f), 1.f, ::state::rounded_corner_normal(roundcorner_radius, across_materials, 1.f)) : material_geometry(float3(0.f), 1.f, ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + + +export material Silver_Brushed_Light_Brushing(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Brushed Silver - Light Brushing"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Brushed.Silver_Brushed_Light_Brushing.png"), + ::anno::key_words(string[]("aec", "metal", "silver", "brushed", "kitchen", "design", "modern", "reflective", "shiny", "architecture", "sanitary", "new", "gray", "neutral")) +]] + = Silver_Brushed ( + brush_width: 0.225f, + brush_height_blur: 0.035f, + scratch_variation_amount: 1.0f, + scratch_reflection_variation: 0.4f, + scratches_bump: 0.2f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Silver_Brushed_Medium_Light_Brushing(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Brushed Silver - Medium Light Brushing"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Brushed.Silver_Brushed_Medium_Light_Brushing.png"), + ::anno::key_words(string[]("aec", "metal", "silver", "brushed", "kitchen", "design", "modern", "reflective", "shiny", "architecture", "sanitary", "new", "gray", "neutral")) +]] += Silver_Brushed ( + brush_width: 0.361f, + brush_height_blur: 0.204f, + scratch_variation_amount: 1.0f, + scratch_reflection_variation: 0.559f, + scratches_bump: 0.35f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Silver_Brushed_Medium_Brushing(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Brushed Silver - Medium Brushing"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Brushed.Silver_Brushed_Medium_Brushing.png"), + ::anno::key_words(string[]("aec", "metal", "silver", "brushed", "kitchen", "design", "modern", "reflective", "shiny", "architecture", "sanitary", "new", "gray", "neutral")) +]] += Silver_Brushed ( + brush_width: 0.665f, + brush_height_blur: 0.471f, + scratch_variation_amount: 1.0f, + scratch_reflection_variation: 0.621f, + scratches_bump: 0.5f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Brushed_Very_Strong_Brushing(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Brushed Silver - Very Strong Brushing"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Brushed.Silver_Brushed_Very_Strong_Brushing.png"), + ::anno::key_words(string[]("aec", "metal", "silver", "brushed", "kitchen", "design", "modern", "reflective", "shiny", "architecture", "sanitary", "new", "gray", "neutral")) +]] += Silver_Brushed ( + brush_width: 1.0f, + brush_height_blur: 1.0f, + scratch_variation_amount: 1.0f, + scratch_reflection_variation: 0.824f, + scratches_bump: 1.0f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + diff --git a/Assets/Material/material_0467/Silver_Hammered.mdl b/Assets/Material/material_0467/Silver_Hammered.mdl new file mode 100644 index 0000000000000000000000000000000000000000..036cba7f25fb9bda2a0c4d843e2ac1e09fd943e1 --- /dev/null +++ b/Assets/Material/material_0467/Silver_Hammered.mdl @@ -0,0 +1,263 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.5; + +import ::anno::*; +import ::math::*; +import ::base::*; +import ::df::*; +import ::nvidia::core_definitions::*; +import ::state::*; +import ::tex::*; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A hammered metal material"; + + + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +::base::texture_coordinate_info transform_coordinate_2( + float4x4 transform + [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix.") ]], + ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() + [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection.") ]] +) [[ + ::anno::description("Transform a texture coordinate by a matrix.") , + ::anno::noinline() + ]] +{ + // Version 2 + float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); + //Try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant. + //just pretend there is no other rotation happening + //get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z. + float4 u = transform[0]; + float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); + float cos = ru.x; + float sin = -ru.y; + + return ::base::texture_coordinate_info( + float3(r_position.x,r_position.y,r_position.z), + ::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), + ::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u)); +} + + +// Takes the standard input that every material has. It combines a couple of +// functions in one convenience function. +::base::texture_coordinate_info vmat_transform( + float2 translation = float2(0.0, 0.0), + float rotation = 0.0, // rotation in degrees + float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +export material Silver_Hammered( + color metal_color = color(0.767f, 0.759f, 0.737f) [[ + ::anno::description("Adjusts the reflection color of the metal material."), + ::anno::display_name("Metal Color"), + ::anno::in_group("Appearance") + ]], + float roughness = 0.5f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + float diffuse_variation = 0.8f [[ + ::anno::description("Adds grime, dirt and imperfections."), + ::anno::display_name("Variation"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float bump_strength = 0.8f [[ + ::anno::description("Determines the degree of bumpiness."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + + uniform bool roundcorners_enable = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorners_radius_mm = 1.5f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners") + ]], + uniform bool roundcorners_across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]], + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(.4f, 0.4f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Use selected UV space."), + ::anno::display_name("UV Space index"), + ::anno::in_group("Advanced") + ]] +) +[[ + ::anno::display_name("Hammered Silver - Dark Pits"), + ::anno::author("NVIDIA vMaterials"), + ::anno::in_group("Metal"), + ::anno::key_words(string[]("metal", "silver", "blackened", "hammered", "design", "classic", "architecture", "pattern", "reflective", "rough", "bumped", "conductor")), + ::anno::thumbnail("./.thumbs/Silver_Hammered.Silver_Hammered.png"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT) +]] + = + let { + bool tmp0 = false; + material_surface tmp1(::df::weighted_layer(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], ::df::directional_factor(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(metal_color, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_multiply, diffuse_variation).tint, color(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_overlay, diffuse_variation).tint, color(1.f, 1.f, 1.f), 3.f, ::df::microfacet_ggx_smith_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono, nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, "")), ::df::custom_curve_layer(0.0399999991f, 1.f, 5.f, 1.f, ::df::microfacet_ggx_smith_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono, nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono * nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(color(histogram_range(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], ::math::lerp(0.40200001f, 0.245000005f, roughness), ::math::lerp(0.234000012f, 0.395000011f, roughness))), color(float3(::base::file_texture(texture_2d("./hammered_multi_R_rough_G_corrspots_B_metal.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_add, ::math::lerp(0.582000017f, 0.280000001f, roughness)).tint, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.70600003f, 0.560000002f, roughness)).tint, color(::math::pow(1.f - float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_add, ::math::lerp(0.185000002f, 0.960000038f, roughness)).mono, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(metal_color, color(::math::pow(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], 2.20000005f)), ::base::color_layer_multiply, diffuse_variation).tint, color(float3(::base::file_texture(texture_2d("./hammered_multi_R_pit_G_ao_B_hammer.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), ::base::color_layer_overlay, diffuse_variation).tint, 0.f, ""), bsdf(), ::base::tangent_space_normal_texture(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), ::base::tangent_space_normal_texture(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), ::base::tangent_space_normal_texture(texture_2d("./hammered_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal()); + hair_bsdf tmp6 = hair_bsdf(); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5, + hair: tmp6); + + +export material Silver_Hammered_Shiny(*) +[[ + ::anno::display_name("Hammered Silver - Shiny"), + ::anno::author("NVIDIA vMaterials"), + ::anno::in_group("Metal"), + ::anno::key_words(string[]("metal", "silver", "hammered", "design", "classic", "architecture", "pattern", "reflective", "rough", "bumped", "conductor", "shiny")), + ::anno::thumbnail("./.thumbs/Silver_Hammered.Silver_Hammered_Shiny.png"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT) +]] + = Silver_Hammered( + metal_color: color(0.767f, 0.759f, 0.737f), + roughness: 0.3f, + diffuse_variation: 0.2f, + bump_strength: 0.5f, + roundcorners_enable:false, + roundcorners_radius_mm: 1.5f, + roundcorners_across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + +export material Silver_Hammered_Dull(*) +[[ + ::anno::display_name("Hammered Silver - Dull"), + ::anno::author("NVIDIA vMaterials"), + ::anno::in_group("Metal"), + ::anno::key_words(string[]("metal", "silver", "hammered", "design", "classic", "architecture", "pattern", "reflective", "rough", "bumped", "conductor", "matte", "dull")), + ::anno::thumbnail("./.thumbs/Silver_Hammered.Silver_Hammered_Dull.png"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT) +]] + = Silver_Hammered( + metal_color: color(0.767f, 0.759f, 0.737f), + roughness: 1.0f, + diffuse_variation: 0.4f, + bump_strength: 0.8f, + roundcorners_enable:false, + roundcorners_radius_mm: 1.5f, + roundcorners_across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); \ No newline at end of file diff --git a/Assets/Material/material_0470/Silver_Sheet.mdl b/Assets/Material/material_0470/Silver_Sheet.mdl new file mode 100644 index 0000000000000000000000000000000000000000..388cb78de3774b0e90863cc32ea6132fb877a5c9 --- /dev/null +++ b/Assets/Material/material_0470/Silver_Sheet.mdl @@ -0,0 +1,1343 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A sheet metal material with adjustable imperfections"; +const string DESCRIPTION_PUNCH = "Punched silver sheet metal material with adjustable imperfections and punchings."; + + +float4 tile_select(uniform int select = 0) +{ + switch (select) + { + case 0: return float4(0.000, 0.333, 0.666, 1.000); + case 1: return float4(0.333, 0.666, 0.666, 1.000); + case 2: return float4(0.666, 1.000, 0.666, 1.000); + + case 3: return float4(0.000, 0.333, 0.333, 0.666); + case 4: return float4(0.333, 0.666, 0.333, 0.666); + case 5: return float4(0.666, 1.000, 0.333, 0.666); + + case 6: return float4(0.000, 0.333, 0.000, 0.333); + case 7: return float4(0.333, 0.666, 0.000, 0.333); + case 8: return float4(0.666, 1.000, 0.000, 0.333); + + default: return float4(0.000, 0.333, 0.000, 0.333); + } +} + +export struct vm_coordinates +[[ + ::anno::hidden() +]] +{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color"), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + return uv; +} + + +vm_coordinates vm_coord_hex( + vm_coordinates uv, + float scale = 1.0f) +{ + vm_coordinates uv_return; + float2 uv_ = float2(uv.uv.x, uv.uv.y); + + // same as from function get_hex above + float2 s = float2(1.0f, 1.7320508f); + float2 n = uv_ - float2(0.5f, 1.0f); + float4 c = ::math::floor(float4(uv_.x, uv_.y, n.x, n.y)/float4(s.x, s.y, s.x, s.y)) + 0.5f; + float2 h_1 = uv_ - float2(c.x, c.y) * s; + float2 h_2 = uv_ - (float2(c.z, c.w) + 0.5f) * s; + float4 uv_id = ::math::dot(h_1, h_1) < ::math::dot(h_2, h_2) ? float4(h_1.x, h_1.y, c.x, c.y) : float4(h_2.x, h_2.y, c.z, c.w); + + uv_return.uv = float2(uv_id.x*scale+0.5, uv_id.y*scale+0.5); + // unless we introduce random cell rotations where we need to compensate for this in the rotation + // we can just plain copy the rotation value + uv_return.rotation = uv.rotation; + return uv_return; +} + +// Offsets a set of uv coordinates in either row (u) or column (v) direction +vm_coordinates vm_coord_rowcol_offset( + vm_coordinates uv, + float offset, + bool horizontal_offset = true +) +{ + int index = horizontal_offset ? 0 : 1; + uv.uv[index] += ::math::floor(uv.uv[index ^ 1]) * offset; + return uv; +} + +vm_coordinates vm_coord_grid( + vm_coordinates uv, + float scale = 1.0f +) +{ + float2x2 scal = float2x2(scale, 0., 0., scale); + uv.uv = ::math::frac(uv.uv); + uv.uv -= 0.5f; + uv.uv = scal * uv.uv; + uv.uv = uv.uv + 0.5f; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f), + + uniform ::tex::wrap_mode wrap_u = ::tex::wrap_repeat, + uniform ::tex::wrap_mode wrap_v = ::tex::wrap_repeat, + uniform float2 crop_u = float2(0.0, 1.0), + uniform float2 crop_v = float2(0.0, 1.0) +) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, wrap_u, wrap_v, crop_u, crop_v) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +// *** SET CUTOUT ENUM NAMES *** +export enum cutout_pattern +[[ + ::anno::description("Cutout Pattern."), + ::anno::hidden() +]] +{ + pattern_circle = 0 + [[ ::anno::display_name("Circle")]], + pattern_hexagon = 1 + [[ ::anno::display_name("Hexagon")]], + pattern_line = 2 + [[ ::anno::display_name("Line") ]], + + pattern_square = 3 + [[ ::anno::display_name("Square")]], + pattern_rectangle = 4 + [[ ::anno::display_name("Rectangle")]], + pattern_cross = 5 + [[ ::anno::display_name("Cross")]], + + pattern_rhombus = 6 + [[ ::anno::display_name("Rhombus")]], + pattern_triangle = 7 + [[ ::anno::display_name("Triangle")]], + pattern_star = 8 + [[ ::anno::display_name("Star")]] +}; + + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + + +export material Silver_Sheet( + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance", "Main") + ]], + float sheet_brightness = 0.5f [[ + ::anno::display_name("Brightness"), + ::anno::description("Controls the brightness of the material."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float roughness = 0.2f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float streaks = 0.0f [[ + ::anno::display_name("Streaks Weight"), + ::anno::description("Adds directional streaks that occur as part of the sheet manufacturing process."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float scratch_bump_factor = 0.0f [[ + ::anno::description("Determines the degree of bumpiness."), + ::anno::display_name("Bump Factor Streaks"), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float imperfections_amount = 0.6f [[ + ::anno::description("Balances between a perfectly smooth metal and a surface that has various imperfections."), + ::anno::display_name("Imperfections Amount"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_1 = 0.f [[ + ::anno::display_name("Washed Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_2 = 0.939f [[ + ::anno::display_name("Noisy Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_3 = 0.0 [[ + ::anno::display_name("Splotchy Imperfection Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 0.1f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f) + ]], + uniform float2 texture_scale = 1.0f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.75f, 0.75f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - New Clean"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] + = + let { + color normal_reflectivity = color(0.9614253056f, 0.948983344333f, 0.918968346466f); // Silver + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + bool tmp0 = false; + material_surface tmp1( + ::df::color_custom_curve_layer(normal_reflectivity, grazing_reflectivity, 5.f, color(::math::lerp(0.400000006f, 1.f, sheet_brightness) * ::math::lerp(1.f, ::math::pow(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 2.20000005f), ::math::lerp(0.f, 0.300000012f, streaks))), ::df::weighted_layer(0.0700000003f, ::df::microfacet_ggx_smith_bsdf(0.150000006f, 0.150000006f, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::microfacet_ggx_smith_bsdf((::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)) * (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)), (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)) * (::math::lerp(roughness * 0.5f, (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_1 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_2 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] + (impurities_weight_1 + impurities_weight_2 + impurities_weight_3 > 0.f ? impurities_weight_3 / (impurities_weight_1 + impurities_weight_2 + impurities_weight_3) : 0.333299994f) * roughness * float3(infinite_tiling ? endless_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 2.f, float3(0.633000016f, 0.495000005f, 0.542999983f), 2.f, false) : ::base::file_texture(texture_2d("./sheet_metal_multi_rough.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], imperfections_amount) + (float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] - 0.5f) * (streaks * 0.5f * 0.5f)), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::math::normalize(::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./sheet_metal_norm.jpg", ::tex::gamma_linear), scratch_bump_factor, false, false, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), histogram_scan_big(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.242000014f, 0.850000024f)))), bsdf(), ::math::normalize(::math::lerp(::state::normal(), ::base::tangent_space_normal_texture(texture_2d("./sheet_metal_norm.jpg", ::tex::gamma_linear), scratch_bump_factor, false, false, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f), histogram_scan_big(float3(::base::file_texture(texture_2d("./sheet_metal_R_rough_G_ao_B_streaks.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.242000014f, 0.850000024f)))), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + enable_round_corners ? ::state::rounded_corner_normal(roundcorner_radius, across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + +export material Silver_Sheet_Punched( + // Cutout parameters + + uniform cutout_pattern shape_select = pattern_circle //select atlas tile here + [[ + ::anno::description("Select a cutout shape."), + ::anno::display_name("Cutout Shape"), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(0) + ]], + float2 punching_grid_size = float2(.5f, .5f) + [[ + ::anno::description("Scales the size of the punching grid."), + ::anno::display_name("Punching Grid Size"), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(1) + ]], + float cutout_size = .92f + [[ + ::anno::description("Scales the size of the cutout pattern independently from the base material."), + ::anno::display_name("Cutout Size"), + ::anno::hard_range(0.f, 1.2f), + ::anno::soft_range(0.f, 1.0f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(2) + ]], + float cutout_roundness = .4f + [[ + ::anno::description("At low values it makes the cutouts sharper. Higher values give the shapes a more rounded look."), + ::anno::display_name("Cutout Roundness"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(3) + ]], + float cutout_bevel_width = 0.5f + [[ + ::anno::description("Adjusts the width of the bevel transition."), + ::anno::display_name("Cutout Bevel Width"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(4) + ]], + float cutout_bump_strength = .8f + [[ + ::anno::description("Sets the strength of the bevelled normal around the cutout."), + ::anno::display_name("Cutout Bevel Strength"), + ::anno::soft_range(0.0f, 1.0f), + ::anno::hard_range(0.0f, 2.0f), + ::anno::in_group("Appearance", "Cutout"), + ::anno::ui_order(5) + ]], +// Grid Layout parameters + bool hexagonal_grid = true + [[ + ::anno::description("When enabled, the punching will occur on a hexagonal grid, otherwise a square grid."), + ::anno::display_name("Enable Hexagonal Grid"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::ui_order(6) + ]], + float square_grid_offset = 0.0f + [[ + ::anno::description("Offsets each row of the grid by a certain amount."), + ::anno::display_name("Square Grid Offset"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::enable_if("hexagonal_grid==false"), + ::anno::ui_order(7) + ]], + bool horizontal_offset = true + [[ + ::anno::description("Choose whether to offset either in row or column direction."), + ::anno::display_name("Horizontal Offset"), + ::anno::in_group("Appearance", "Cutout Layout"), + ::anno::enable_if("hexagonal_grid==false"), + ::anno::ui_order(8) + ]], + + + +// Silver Sheet parameters + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance", "Main") + ]], + float sheet_brightness = 0.5f [[ + ::anno::display_name("Brightness"), + ::anno::description("Controls the brightness of the material."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float roughness = 0.2f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float streaks = 0.0f [[ + ::anno::display_name("Streaks Weight"), + ::anno::description("Adds directional streaks that occur as part of the sheet manufacturing process."), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float scratch_bump_factor = 0.0f [[ + ::anno::description("Determines the degree of bumpiness."), + ::anno::display_name("Bump Factor Streaks"), + ::anno::in_group("Appearance", "Main"), + ::anno::hard_range(0.f, 1.f) + ]], + float imperfections_amount = 0.6f [[ + ::anno::description("Balances between a perfectly smooth metal and a surface that has various imperfections."), + ::anno::display_name("Imperfections Amount"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_1 = 0.f [[ + ::anno::display_name("Washed Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_2 = 0.939f [[ + ::anno::display_name("Noisy Imperfections Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float impurities_weight_3 = 0.0 [[ + ::anno::display_name("Splotchy Imperfection Ratio"), + ::anno::in_group("Appearance", "Imperfections"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f) + ]], + uniform float2 texture_scale = 1.0f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.75f, 0.75f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius = 0.01f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 0.1f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Circular Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "circular", "neutral")) +]] = let +{ + material base_mat = Silver_Sheet( + infinite_tiling: infinite_tiling, + sheet_brightness: sheet_brightness, + roughness: roughness, + streaks: streaks, + scratch_bump_factor: scratch_bump_factor, + imperfections_amount: imperfections_amount, + impurities_weight_1: impurities_weight_1, + impurities_weight_2: impurities_weight_2, + impurities_weight_3: impurities_weight_3, + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + enable_round_corners: enable_round_corners, + roundcorner_radius: roundcorner_radius, + across_materials: across_materials + ); + texture_2d punching_cutout = texture_2d("./atlas_02_norm_dist.png", ::tex::gamma_linear); + + // remap range of slider to avoid artifacts in the bevelling + float2 punching_scale = texture_scale * 0.01f * punching_grid_size; + float cutout_roundness_ = cutout_roundness*0.6f+0.4f; + float cutout_size_lin = (1.0f/cutout_size); + float cutout_bevel_width_ = 0.1 + cutout_bevel_width * 0.9f; + + vm_coordinates uv = vm_coord( + translation: texture_translate, + rotation: texture_rotate, + scaling: punching_scale, + uv_space: uv_space_index + ); + + vm_coordinates punching_uv = hexagonal_grid ? vm_coord_hex( + uv: uv, + scale: cutout_roundness_ * cutout_size_lin + ) : vm_coord_grid( + uv: vm_coord_rowcol_offset( + uv: uv, + offset: square_grid_offset, + horizontal_offset: horizontal_offset + ), + scale: cutout_roundness_ * cutout_size_lin + ); + // select the correct subtile from the atlas + float4 crop = tile_select(shape_select); + + ::base::texture_return lookup = vm_tex_lookup( + tex: punching_cutout, + uv: punching_uv, + mono_source: mono_a, + scale: float4(1.0f), + crop_u: float2(crop.x, crop.y), + crop_v: float2(crop.z, crop.w), + wrap_u: ::tex::wrap_clamp, + wrap_v: ::tex::wrap_clamp + ); + + float low = (1.0 - cutout_roundness_); + float high = (cutout_size_lin * (cutout_bevel_width_ * 0.2f) * cutout_roundness_) + (1.0 - cutout_roundness_); + // remap x...y to (clamped) 0...1 + float x = ::math::clamp((lookup.mono - low)/(high - low), 0.0, 1.0); + // spherical falloff + float falloff=::math::sqrt(1.0-x*x); + // masking falloff as the center of the cutout is flat + float masked_falloff=falloff<=0.0?1.0:falloff; + + // where base material is still there, use the value of the base material + float cutout= ::math::min(falloff<=0.0?0.0:1.0, base_mat.geometry.cutout_opacity); + + // bring in -.5 ... +.5 range and lerp between lookup and flat normal + float3 remap_norm = ::math::lerp(float3(lookup.tint), float3(0.5, 0.5, 1.0), masked_falloff) - float3(0.5); + float3 t_norm = ::math::normalize(remap_norm * float3(cutout_bump_strength, cutout_bump_strength, 1.0)); + + float3 rotfix_norm = float3(::math::cos(punching_uv.rotation) * t_norm.x - ::math::sin(punching_uv.rotation) * t_norm.y, + ::math::sin(punching_uv.rotation) * t_norm.x + ::math::cos(punching_uv.rotation) * t_norm.y, + t_norm.z); + + float3 normal = ::state::texture_tangent_u(punching_uv.uv_space_index) * rotfix_norm.x + + ::state::texture_tangent_v(punching_uv.uv_space_index) * rotfix_norm.y + + ::state::normal() * rotfix_norm.z; + + float3 final_normal = ::base::blend_normals( + base_normal: normal, + base_normal_weight: 1.0f, + detail_normal: base_mat.geometry.normal, + detail_normal_weight: 1.0f + ); + +} in material( + surface: material_surface( + scattering: base_mat.surface.scattering + ), + volume: base_mat.volume, + ior: base_mat.ior, + thin_walled: true, + geometry: material_geometry( + displacement: base_mat.geometry.displacement, + normal: final_normal, + cutout_opacity: cutout + ) +); + + +// ------------------------ Silver Sheet Presets ------------------------ +export material Silver_Sheet_Soft_Splotches(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - Soft Splotches"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Soft_Splotches.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral", "gray")) +]] += Silver_Sheet( + infinite_tiling: false, + sheet_brightness: 0.5f, + roughness: 0.3f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.75f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.01f, + impurities_weight_3: 0.98f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Silver_Sheet_Matte_Imperfections(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - Matte Imperfections"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Matte_Imperfections.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "matte", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]]= Silver_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.75f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.265f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.43f, + impurities_weight_3: 0.0f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Silver_Sheet_Glossy_Imperfections(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - Glossy Imperfections"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Glossy_Imperfections.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] += Silver_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.3f, + streaks: 0.1f, + scratch_bump_factor: 0.15f, + imperfections_amount: 0.1f, + impurities_weight_1: 0.75f, + impurities_weight_2: 0.89f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Silver_Sheet_Splotchy_Streaks(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - Splotchy Streaks"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Splotchy_Streaks.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]]= Silver_Sheet( + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.6f, + streaks: 0.1f, + scratch_bump_factor: 0.2f, + imperfections_amount: 0.26f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.76f, + impurities_weight_3: 0.13f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + +export material Silver_Sheet_Glossy_Streaks(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Metal Sheet Silver - Glossy Streaks"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Glossy_Streaks.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "glossy", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "neutral")) +]] += Silver_Sheet( + infinite_tiling: false, + sheet_brightness: 0.65f, + roughness: 0.25f, + streaks: 0.8f, + scratch_bump_factor: 0.88f, + imperfections_amount: 0.86f, + impurities_weight_1: 1.0f, + impurities_weight_2: 0.75f, + impurities_weight_3: 0.125f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +// ------------------------ Punched Silver Sheet Presets ------------------------ + +export material Silver_Sheet_Punched_Small_Circular(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Small Circular Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Small_Circular.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "circular", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_circle, + punching_grid_size: 1.0f, + cutout_size: 0.5f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 0.8f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Hexagonal(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Hexagonal Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Hexagonal.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "hexagonal", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_hexagon, + punching_grid_size: 1.5f, + cutout_size: .95f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Silver_Sheet_Punched_Hexagonal_Small(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Small Hexagonal Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Hexagonal_Small.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "hexagonal", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_hexagon, + punching_grid_size: float2(.75f), + cutout_size: .58f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.3f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Square(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Square Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Square.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "square", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_square, + punching_grid_size: 1.2f, + cutout_size: 0.56f, + cutout_roundness: 0.1f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: false, + square_grid_offset: 0.5f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Line(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Line Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Line.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "line", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_line, + punching_grid_size: 1.3f, + cutout_size: 0.59f, + cutout_roundness: 0.4f, + cutout_bevel_width: 0.3f, + cutout_bump_strength: 1.5f, + hexagonal_grid: false, + square_grid_offset: 0.3333f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Cross(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Cross Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Cross.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "cross", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_cross, + punching_grid_size: 2.0f, + cutout_size: 0.59f, + cutout_roundness: 0.1f, + cutout_bevel_width: 0.44f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Rhombus(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Rhombus Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Rhombus.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "rhombus", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_rhombus, + punching_grid_size: 1.4f, + cutout_size: 1.0f, + cutout_roundness: 0.8f, + cutout_bevel_width: 0.5f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Triangle(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Triangle Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Triangle.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "triangle", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_triangle, + punching_grid_size: 1.3f, + cutout_size: 1.08f, + cutout_roundness: 1.0f, + cutout_bevel_width: 1.0f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + +export material Silver_Sheet_Punched_Star(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::contributor("Rüdiger Raab"), + ::anno::contributor("Maik Rohland"), + ::anno::display_name("Silver Sheet - Star Punch"), + ::anno::description(DESCRIPTION_PUNCH), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Silver_Sheet.Silver_Sheet_Punched_Star.png"), + ::anno::key_words(string[]("metal", "sheet", "silver", "imperfections", "new", "unfinished", "reflective", "oxidized", "construction", "design", "infinite tiling", "punched", "punching", "star", "neutral")) +]] += Silver_Sheet_Punched( + // Punching Parameters + shape_select: pattern_star, + punching_grid_size: 1.5f, + cutout_size: 0.68f, + cutout_roundness: 0.5f, + cutout_bevel_width: 0.44f, + cutout_bump_strength: 1.5f, + hexagonal_grid: true, + square_grid_offset: 0.0f, + horizontal_offset: true, + + // Material Parameters + infinite_tiling: false, + sheet_brightness: 0.85f, + roughness: 0.4f, + streaks: 0.0f, + scratch_bump_factor: 0.0f, + imperfections_amount: 0.2f, + impurities_weight_1: 0.0f, + impurities_weight_2: 0.5f, + impurities_weight_3: 0.86f, + enable_round_corners: false, + roundcorner_radius: 0.01f, + across_materials: false, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0 +); \ No newline at end of file diff --git a/Assets/Material/material_0480/Steel_Painted_Cracked.mdl b/Assets/Material/material_0480/Steel_Painted_Cracked.mdl new file mode 100644 index 0000000000000000000000000000000000000000..affdbe16177bba60ec2f7df4f85bd69d7d67093b --- /dev/null +++ b/Assets/Material/material_0480/Steel_Painted_Cracked.mdl @@ -0,0 +1,804 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.7; + +import ::state::*; +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A painted steel material with dirt and weathering effects, optional cracked paint effect on the surface as well as and paint artifacts."; + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +struct vm_coordinates{ + float2 uv; // UV coordinates stored as a simple float2 + float rotation; // The rotation is stored in radiands (not degress), to convert use ((rotation* 3.1415926535897932384626433832f) / 180.f) + int uv_space_index; // The UV space Index from which the UV data came from + float4 carry; // may carry additional data, such as random IDs +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color."), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + // Translation before or after rotation? + return uv; +} + +vm_coordinates vm_coord_post_scale( + vm_coordinates uv = vm_coord(), + float2 scale = 1.0f +) +{ + uv.uv /= scale; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f)) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +float3 vm_tex_normal_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + float strength = 1.0f +) +{ + float rot = uv.rotation; + // Lookup and convert normal texture to -1 ... 1 range + float3 norm = (::tex::lookup_float3(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(strength, strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(rot) * norm.x - ::math::sin(rot) * norm.y, + ::math::sin(rot) * norm.x + ::math::cos(rot) * norm.y, + norm.z); + return norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); +} + + + +float3 vm_tex_normal_lookup_2x( + uniform texture_2d tex_a, + uniform texture_2d tex_b, + vm_coordinates uv_a = vm_coord(), + vm_coordinates uv_b = vm_coord(), + float strength_a = 1.0f, + float strength_b = 1.0f, + bool use_coord_a_only = false // when set to 'false, tex_b share coordinates from 'uv_a' +) +{ + float rot_a = uv_a.rotation; + float rot_b = use_coord_a_only ? uv_a.rotation : uv_b.rotation; + uv_b.uv = use_coord_a_only ? uv_a.uv : uv_b.uv; + + // Lookup and convert normal textures a and b to -1 ... 1 range + float3 norm_a = (::tex::lookup_float3(tex_a, uv_a.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm_a = ::math::normalize(norm_a * float3(strength_a, strength_a, 1.0)); + float3 norm_b = (::tex::lookup_float3(tex_b, uv_b.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm_b = ::math::normalize(norm_b * float3(strength_b, strength_b, 1.0)); + + // if any rotation happened prior to the lookup, compensate for it + norm_a = float3(::math::cos(rot_a) * norm_a.x - ::math::sin(rot_a) * norm_a.y, + ::math::sin(rot_a) * norm_a.x + ::math::cos(rot_a) * norm_a.y, + norm_a.z); + norm_b = float3(::math::cos(rot_b) * norm_b.x - ::math::sin(rot_b) * norm_b.y, + ::math::sin(rot_b) * norm_b.x + ::math::cos(rot_b) * norm_b.y, + norm_b.z); + + // http://blog.selfshadow.com/publications/blending-in-detail/ + norm_a=norm_a + float3(0.,0.,1.); + norm_b = norm_b * float3(-1.,-1.,1.); + float3 norm = norm_a*math::dot(norm_a, norm_b)/norm_a.z - norm_b; + + return norm.x * ::state::texture_tangent_u(uv_a.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv_a.uv_space_index) + + norm.z * ::state::normal(); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + + +float3 rgb2srgb(float3 val) [[ anno::unused() ]] { + return ::math::pow( ::math::max(val, float3(0.f)), float3(1./2.2) ); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + + + + +float3 vm_tex_infinite( + uniform texture_2d tex = texture_2d(), + vm_coordinates uv = vm_coord(), + float3 average_color = float3(0.5f, 0.5f, .5f), + float patch_size = 1.0, + bool gamma_correct = true, + float gamma = 2.2f +) +{ + float2 uv_in = uv.uv; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * (uv.uv / patch_size); //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V))+int2(935); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + O = (W[0] = F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I))) - m) + + (W[1] = F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0,1)))) - m) + + (W[2] = F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1,0)))) - m); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1)))) - m) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1, 0)))) - m) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0, 1)))) - m); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0f, 1.0f); + + return gamma_correct? ::math::pow(::math::max(O, float3(0.0f)), gamma) : float3(O); +} + +float3 vm_tex_infinite_normal( + uniform texture_2d tex = texture_2d(), + vm_coordinates uv = vm_coord(), + float3 average_color = float3(0.5f), + float patch_size = 1.0, + float normal_strength = 1.0 +) +{ + float2 uv_in = uv.uv; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * (uv.uv / patch_size); //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V))+int2(935); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + O = (W[0] = F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I))) - m) + + (W[1] = F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0,1)))) - m) + + (W[2] = F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1,0)))) - m); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1)))) - m) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(1, 0)))) - m) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(tex, U-rnd22(I+int2(0, 1)))) - m); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + float3 norm = (O - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(normal_strength, normal_strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(uv.rotation) * norm.x - ::math::sin(uv.rotation) * norm.y, + ::math::sin(uv.rotation) * norm.x + ::math::cos(uv.rotation) * norm.y, + norm.z); + return norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); +} + + + +// ----------------------------------------------------------------- + +float screen(float base, float layer, float weight) +{ + return base + (1.0f - base) * layer * weight; +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + position * (1.0 + width)), // special case of ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + anno::hidden() +]] +{ + return + n.x* float3(state::texture_tangent_u(0).x,state::texture_tangent_v(0).x,state::normal().x)+ + n.y* float3(state::texture_tangent_u(0).y,state::texture_tangent_v(0).y,state::normal().y)+ + n.z* float3(state::texture_tangent_u(0).z,state::texture_tangent_v(0).z,state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + anno::hidden() +]] +{ + return state::texture_tangent_u(0) * n.x + + state::texture_tangent_v(0) * n.y + + state::normal() * n.z ; +} + + + +// Returns a normal by adding a detail normal to a global normal. +// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded +// correctly with tex::gamma_linear +float3 add_detail_normal(float3 nd = state::normal(), float3 n = state::normal()) +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + n = n_t*math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + +export material Steel_Painted_Cracked( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance"), + ::anno::ui_order(0) + ]], + color paint_color = color(0.603827f) [[ + ::anno::description("Choose the color of the paint."), + ::anno::display_name("Paint Color"), + ::anno::in_group("Appearance"), + ::anno::ui_order(1) + ]], + float paint_roughness = 0.28f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Paint Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(2) + ]], + float paint_roughness_variation = 0.34f [[ + ::anno::description("Amount of variation applied to the roughness, higher numbers lead to non-uniform reflections of the material."), + ::anno::display_name("Paint Roughness Variation"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(3) + ]], + float dirt_weight = 0.1f [[ + ::anno::description("Adjusts the amount of dirty stains on the surface."), + ::anno::display_name("Dirt Weight"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(4) + ]], + float wash_weight = 0.1f [[ + ::anno::description("Adjusts the amount of washed dirty stains on the paint."), + ::anno::display_name("Wash Dirt Weight"), + ::anno::in_group("Appearance"), + ::anno::soft_range(0.f, 1.f), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(5) + ]], + float paint_stroke_normal_strength = 0.35f [[ + ::anno::description("Specifies the strength of the bump that shows the paint strokes."), + ::anno::display_name("Paint Stroke Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::soft_range(0.f, 1.f), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(6) + ]], + float uneven_normal_strength = 0.42f [[ + ::anno::description("Specifies the strength of the bump that shows signs of being aleady overpainted."), + ::anno::display_name("Overpaint Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::soft_range(0.f, 1.f), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(7) + ]], + uniform bool enable_rust_damage = true [[ + ::anno::description("Enables the damaged rust spots."), + ::anno::display_name("Enable Rust Damage"), + ::anno::in_group("Appearance", "Damage"), + ::anno::ui_order(8) + ]], + float cracks_bump_strength = 0.4f [[ + ::anno::description("Adjusts how much the cracked paint bumps the surface."), + ::anno::display_name("Cracks Bump Strength"), + ::anno::in_group("Appearance", "Damage"), + ::anno::soft_range(0.f, 1.f), + ::anno::hard_range(0.f, 2.f), + ::anno::ui_order(9) + ]], + float cracks_darkness = 0.58f [[ + ::anno::description("Darkens the cracks"), + ::anno::display_name("Cracks Darkness"), + ::anno::in_group("Appearance", "Damage"), + ::anno::soft_range(0.f, 1.f), + ::anno::hard_range(0.f, 1.f), + ::anno::ui_order(10) + ]], + float damages_scale = 1.f [[ + ::anno::description("Adjusts the size of the damages."), + ::anno::display_name("Damages Scale"), + ::anno::in_group("Appearance", "Damage"), + ::anno::hard_range(0.f, 1.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(11) + ]], + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform"), + ::anno::ui_order(12) + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::soft_range(0.f, 360.f), + ::anno::ui_order(13) + ]], + float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::ui_order(14) + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Uses selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform"), + ::anno::ui_order(15) + ]], + uniform bool roundcorners_enable = true [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(16) + ]], + uniform float roundcorners_radius_mm = 0.5f [[ + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::display_name("Round Corner Radius (mm)"), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f), + ::anno::ui_order(17) + ]], + uniform bool roundcorners_across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(18) + ]]) +[[ + ::anno::display_name("Steel Painted - White Cracked"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Cracked.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "interior", "exterior", "old", "cracked", "white", "neutral", "warm")) +]] + = + let { + bool tmp0 = false; + float2 tex_rescale = texture_scale * 0.5f; + + material_surface tmp1(::df::weighted_layer(dirt_weight * float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, ::df::diffuse_reflection_bsdf(color(0.174647003f, 0.146449998f, 0.0981639996f), 1.f), ::df::weighted_layer(enable_rust_damage ? histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f) : 0.f, ::df::directional_factor((enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(paint_color, color(0.0843759999f, 0.0304700006f, 0.00322300009f), ::base::color_layer_blend, 1.f - ::math::pow(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 4.48000002f), true).tint, ::math::pow(vm_tex_lookup(texture_2d("./cracked_paint_surface_bare_metal_albedo.jpg", ::tex::gamma_srgb), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint, 0.569999993f), ::base::color_layer_blend, histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f), true).tint : paint_color, color(0.f, 0.f, 0.f), ::base::color_layer_blend, wash_weight * ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), true).tint, color(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).y, 1.57999992f)), ::base::color_layer_multiply, cracks_darkness, true) : nvidia::core_definitions::blend_colors(enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(paint_color, color(0.0843759999f, 0.0304700006f, 0.00322300009f), ::base::color_layer_blend, 1.f - ::math::pow(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 4.48000002f), true).tint, ::math::pow(vm_tex_lookup(texture_2d("./cracked_paint_surface_bare_metal_albedo.jpg", ::tex::gamma_srgb), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint, 0.569999993f), ::base::color_layer_blend, histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f), true).tint : paint_color, color(0.f, 0.f, 0.f), ::base::color_layer_blend, wash_weight * ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), true)).tint, color(1.f, 1.f, 1.f), 3.f, ::df::microfacet_ggx_smith_bsdf(screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight) * screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight), screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight) * screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight), color(1.f, 0.810754001f, 0.730461001f), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect)), ::df::custom_curve_layer(0.0399999991f, 1.f, 5.f, 1.f, ::df::microfacet_ggx_smith_bsdf(screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight) * screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight), screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight) * screen(enable_rust_damage ? screen(::math::lerp(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).y, 1.f, 0.359999985f), histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f)), ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 0.459999979f), 0.f) : histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x, paint_roughness_variation * 0.699999988f, ::math::clamp(paint_roughness * 0.75f + 0.0500000007f + paint_roughness_variation * 0.25f, 0.f, 0.899999976f)) + float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).x * dirt_weight, ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), wash_weight), color(1.f, 0.810754001f, 0.730461001f), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(1.f, ::df::diffuse_reflection_bsdf((enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(paint_color, color(0.0843759999f, 0.0304700006f, 0.00322300009f), ::base::color_layer_blend, 1.f - ::math::pow(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 4.48000002f), true).tint, ::math::pow(vm_tex_lookup(texture_2d("./cracked_paint_surface_bare_metal_albedo.jpg", ::tex::gamma_srgb), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint, 0.569999993f), ::base::color_layer_blend, histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f), true).tint : paint_color, color(0.f, 0.f, 0.f), ::base::color_layer_blend, wash_weight * ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), true).tint, color(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).y, 1.57999992f)), ::base::color_layer_multiply, cracks_darkness, true) : nvidia::core_definitions::blend_colors(enable_rust_damage ? nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(paint_color, color(0.0843759999f, 0.0304700006f, 0.00322300009f), ::base::color_layer_blend, 1.f - ::math::pow(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).z, 4.48000002f), true).tint, ::math::pow(vm_tex_lookup(texture_2d("./cracked_paint_surface_bare_metal_albedo.jpg", ::tex::gamma_srgb), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint, 0.569999993f), ::base::color_layer_blend, histogram_scan_big(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.0500000007f, 0.0700000003f), true).tint : paint_color, color(0.f, 0.f, 0.f), ::base::color_layer_blend, wash_weight * ::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.151999995f, 0.635999978f, 0.0820000023f), 0.439999998f, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_met_damage_multi_R_dirt_G_nrm_B_wash.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), mono_a, float4(1.f)).tint).z, 0.439999998f), true)).tint, 0.f), bsdf(), enable_rust_damage ? ::math::lerp(vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_met_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale * 0.5f)), 0.930000007f), add_detail_normal(infinite_tiling ? vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.5f), 0.439999998f, cracks_bump_strength * 1.70000005f) : vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), cracks_bump_strength * 1.70000005f), infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f)) : infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), enable_rust_damage ? ::math::lerp(vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_met_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale * 0.5f)), 0.930000007f), add_detail_normal(infinite_tiling ? vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.5f), 0.439999998f, cracks_bump_strength * 1.70000005f) : vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), cracks_bump_strength * 1.70000005f), infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f)) : infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), enable_rust_damage ? ::math::lerp(vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_met_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale * 0.5f)), 0.930000007f), add_detail_normal(infinite_tiling ? vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.5f), 0.439999998f, cracks_bump_strength * 1.70000005f) : vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), cracks_bump_strength * 1.70000005f), infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f)) : infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), enable_rust_damage ? ::math::lerp(vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_met_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale * 0.5f)), 0.930000007f), add_detail_normal(infinite_tiling ? vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.5f), 0.439999998f, cracks_bump_strength * 1.70000005f) : vm_tex_normal_lookup(texture_2d("./cracked_paint_surface_crackedpaint_norm.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), cracks_bump_strength * 1.70000005f), infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f)) : infinite_tiling ? add_detail_normal(vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength), vm_tex_infinite_normal(texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float3(0.5f), 0.439999998f, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength)) : vm_tex_normal_lookup_2x(texture_2d("./cracked_paint_surface_paint_bg_norm.jpg", ::tex::gamma_linear), texture_2d("./cracked_paint_surface_chaotic_paint_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), vm_coord(0.f, 0.f, 1.f, 0), histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * uneven_normal_strength, histogram_scan_big(1.f - float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), float3(0.0439999998f, 0.898000002f, 0.0109999999f), 0.439999998f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./cracked_paint_surface_crackedpaint_multi.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, tex_rescale, uv_space_index), float2(damages_scale)), mono_a, float4(1.f)).tint).x, 0.399999976f, 0.649999976f) * paint_stroke_normal_strength, false)), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f), emission_intensity: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, roundcorners_enable ? ::state::rounded_corner_normal(roundcorners_radius_mm * 0.00100000005f, roundcorners_across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + +export material Steel_Painted_Turquise_Cracked_Shiny(*) +[[ + ::anno::display_name("Steel Painted - Turquoise Cracked Shiny"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Turquise_Cracked_Shiny.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "worn", "old", "cracked", "bumped", "turquoise", "light", "cool")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.031896f, 0.356400f, 0.514918f), + paint_roughness: 0.18f, + paint_roughness_variation: 0.69f, + dirt_weight: 0.1f, + wash_weight: 0.1f, + paint_stroke_normal_strength: 0.35f, + uneven_normal_strength: 0.42f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.26f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + + +export material Steel_Painted_Light_Blue_Cracked_Matte(*) +[[ + ::anno::display_name("Steel Painted - Light Blue Cracked Matte"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Light_Blue_Cracked_Matte.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "worn", "old", "bleached", "cracked", "bumped", "blue", "light", "cool")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.031896f, 0.356400f, 0.514918f), + paint_roughness: 0.2f, + paint_roughness_variation: 0.69f, + dirt_weight: 0.1f, + wash_weight: 0.1f, + paint_stroke_normal_strength: 0.35f, + uneven_normal_strength: 0.42f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.26f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + +export material Steel_Painted_Russet_Cracked_Dirty(*) +[[ + ::anno::display_name("Steel Painted - Russet Cracked Dirty"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Russet_Cracked_Dirty.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "worn", "old", "dirty", "weathered", "cracked", "bumped", "russet", "red", "brown", "warm")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.332452f, 0.035601f, 0.021219f), + paint_roughness: 0.31f, + paint_roughness_variation: 0.39f, + dirt_weight: 1.0f, + wash_weight: 0.1f, + paint_stroke_normal_strength: 0.39f, + uneven_normal_strength: 0.9f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.74f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + +export material Steel_Painted_Red_Cracked_Matte(*) +[[ + ::anno::display_name("Steel Painted - Red Cracked Matte"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Red_Cracked_Matte.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "worn", "old", "dirty", "matte", "weathered", "cracked", "bumped", "red", "saturated", "warm")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.332452f, 0.035601f, 0.021219f), + paint_roughness: 0.42f, + paint_roughness_variation: 0.39f, + dirt_weight: 1.0f, + wash_weight: 0.1f, + paint_stroke_normal_strength: 0.39f, + uneven_normal_strength: 0.9f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.74f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + + + +export material Steel_Painted_Orange_Cracked_Worn(*) +[[ + ::anno::display_name("Steel Painted - Orange Cracked Worn"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Orange_Cracked_Worn.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "matte", "worn", "old", "dirty", "weathered", "cracked", "bumped", "orange", "saturated", "warm")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.505f, 0.212f, 0.0303f), + paint_roughness: 0.49f, + paint_roughness_variation: 0.45f, + dirt_weight: 0.79f, + wash_weight: 0.65f, + paint_stroke_normal_strength: 0.9f, + uneven_normal_strength: 0.9f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.77f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + + +export material Steel_Painted_Army_Green_Cracked_Dirty(*) +[[ + ::anno::display_name("Steel Painted - Army Green Cracked Dirty"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Army_Green_Cracked_Dirty.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "matte", "worn", "old", "dirty", "weathered", "cracked", "bumped", "army", "green", "cool")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.122139f, 0.147027f, 0.021219f), + paint_roughness: 0.36f, + paint_roughness_variation: 0.86f, + dirt_weight: 1.0f, + wash_weight: 0.65f, + paint_stroke_normal_strength: 0.9f, + uneven_normal_strength: 0.9f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.77f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); + + +export material Steel_Painted_Yellow_Cracked_Bleached(*) +[[ + ::anno::display_name("Steel Painted - Yellow Cracked Bleached"), + ::anno::author("Nvidia vMaterials"), + ::anno::description(DESCRIPTION), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Steel_Painted_Cracked.Steel_Painted_Yellow_Cracked_Bleached.png"), + ::anno::key_words(string[]("steel", "metal", "paint", "coated", "construction", "urban", "architecture", "naval", "automotive", "multimaterial", "exterior", "matte", "worn", "old", "dirty", "weathered", "cracked", "bumped", "yellow", "warm", "light")) +]] = Steel_Painted_Cracked( + infinite_tiling: false, + paint_color: color(0.854993f, 0.665387f, 0.162029f), + paint_roughness: 0.36f, + paint_roughness_variation: 0.86f, + dirt_weight: 1.0f, + wash_weight: 0.65f, + paint_stroke_normal_strength: 0.9f, + uneven_normal_strength: 0.9f, + enable_rust_damage: true, + cracks_bump_strength: 1.0f, + cracks_darkness: 0.77f, + damages_scale: 1.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + roundcorners_enable: false, + roundcorners_radius_mm: 0.5f, + roundcorners_across_materials: false +); \ No newline at end of file diff --git a/Assets/Material/material_0490/Tungsten_Foil.mdl b/Assets/Material/material_0490/Tungsten_Foil.mdl new file mode 100644 index 0000000000000000000000000000000000000000..88b4b83cf1341302880617b34a659b4fa93d20e0 --- /dev/null +++ b/Assets/Material/material_0490/Tungsten_Foil.mdl @@ -0,0 +1,497 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "Metal foil material with additional controls for wrinkling the material"; + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +float histogram_range(float input, float range, float position) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + +float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + ::state::normal()*1.0); +} + +export material Tungsten_Foil( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Infinite Tiing") + ]], + float brightness = 1.f [[ + ::anno::description("Ajusts the total reflectivity of the metal."), + ::anno::display_name("Brightness"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float roughness = 0.15f [[ + ::anno::display_name("Roughness"), + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float roughness_variation = 0.564f [[ + ::anno::description("Amount of variation applied to the roughness, higher numbers add more non uniform appearance to the reflectivity of the material."), + ::anno::display_name("Roughness Variation"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + float smudges = 0.35f [[ + ::anno::description("Adds blurrier reflections that show smudges on the surface."), + ::anno::display_name("Smudges"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float bump_strength = 0.05f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Appearance") + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.0f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::nvidia::core_definitions::dimension(float2(0.4, 0.4)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform") + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::display_name("Enable Round Corners"), + ::anno::in_group("Round Corners") + ]], + uniform float radius = 0.002f [[ + ::anno::description("Radius of the rounded corners."), + ::anno::display_name("Round Corner Radius"), + ::anno::in_group("Round Corners") + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Slightly Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] + = + let { + color normal_reflectivity = color(0.951001417565f, 0.815051845356f, 0.751931718925f); // Tungsten + color grazing_reflectivity = color(0.99942f, 1.f, 1.f); + + bool tmp0 = false; + material_surface tmp1( + ::df::weighted_layer(0.0299999993f, ::df::microfacet_ggx_smith_bsdf(0.300000012f, 0.300000012f, color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::color_custom_curve_layer(normal_reflectivity, grazing_reflectivity, 5.f, color(::math::lerp(0.600000024f, 1.f, brightness) * histogram_scan_big(::math::pow(float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 2.20000005f), 1.f, bump_strength * 0.400000006f)), ::df::microfacet_ggx_smith_bsdf((histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]) * (histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0], roughness * 0.5f * roughness_variation, roughness * 0.5f) + roughness * 0.5f * roughness_variation * (float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.328999996f, 0.513999999f, 0.764999986f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_rough1_G_rough2_G_ao.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] - 0.5f) + (1.f - roughness) * smudges * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0] + roughness_variation * 0.200000003f * float3(infinite_tiling ? endless_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), ::base::coordinate_source(::base::texture_coordinate_uvw, 0), 10.f, float3(0.0820000023f), 8.f, false) : ::base::file_texture(texture_2d("./foil_crumpled_R_smudge_G_splotch.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_average, ::base::texture_coordinate_info(::state::texture_coordinate(0), ::state::texture_tangent_u(0), ::state::texture_tangent_v(0)), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1]), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), bsdf(), infinite_tiling ? endless_normal(texture_2d("./foil_crumpled_norm.jpg", ::tex::gamma_linear), bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.5f, 0.5f, 1.f), 8.f) : ::base::tangent_space_normal_texture(texture_2d("./foil_crumpled_norm.jpg", ::tex::gamma_linear), bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), infinite_tiling ? endless_normal(texture_2d("./foil_crumpled_norm.jpg", ::tex::gamma_linear), bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), 8.f, float3(0.5f, 0.5f, 1.f), 8.f) : ::base::tangent_space_normal_texture(texture_2d("./foil_crumpled_norm.jpg", ::tex::gamma_linear), bump_strength * 1.5f, false, false, vmat_transform(texture_translate, texture_rotate, texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false, 1.f, 0.f)), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + enable_round_corners ? ::state::rounded_corner_normal(radius, across_materials, 1.f) : ::state::normal()); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + +export material Tungsten_Foil_Smudged_Foil(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Smudged"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil_Smudged_Foil.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "smooth", "unfinished", "decorative", "creative", "neutral")) +]] += Tungsten_Foil( + infinite_tiling: true, + roughness: 0.15f, + roughness_variation: 0.84f, + smudges: 0.35f, + bump_strength: 0.0f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + +export material Tungsten_Foil_Shiny_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Shiny Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil_Shiny_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "shiny", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] += Tungsten_Foil( + infinite_tiling: true, + roughness: 0.25f, + roughness_variation: 0.25f, + smudges: 0.75f, + bump_strength: 0.25f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + + +export material Tungsten_Foil_Matte_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Matte Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil_Matte_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "matte", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral", "gray")) +]] += Tungsten_Foil( + infinite_tiling: true, + roughness: 0.65f, + roughness_variation: 1.0f, + smudges: 0.4f, + bump_strength: 0.15f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + +export material Tungsten_Foil_Heavy_Glossy_Wrinkles(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Heavy Glossy Wrinkles"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil_Heavy_Glossy_Wrinkles.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "smooth", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral")) +]] += Tungsten_Foil( + infinite_tiling: true, + roughness: 0.164f, + roughness_variation: 0.021f, + smudges: 0.143f, + bump_strength: 0.99f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + +export material Tungsten_Foil_Heavy_Matte_Wrinkled(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Tungsten Foil - Heavy Matte Wrinkled"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Tungsten_Foil.Tungsten_Foil_Heavy_Matte_Wrinkled.png"), + ::anno::key_words(string[]("design", "metal", "tungsten", "foil", "matte", "bumped", "crumpled", "wrinkled", "creased", "unfinished", "decorative", "creative", "neutral", "gray")) +]] += Tungsten_Foil( + infinite_tiling: true, + roughness: 0.889f, + roughness_variation: 0.018f, + smudges: 0.246f, + bump_strength: 0.732f, + texture_translate: 0.0f, + texture_rotate: 0.0f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 0.002f, + across_materials: false +); + + + + + + + + + + + + + + diff --git a/Assets/Material/material_0508/Caoutchouc.mdl b/Assets/Material/material_0508/Caoutchouc.mdl new file mode 100644 index 0000000000000000000000000000000000000000..51d8fc9e28ac63ba9a6a037ee5e135c4e3d1ff21 --- /dev/null +++ b/Assets/Material/material_0508/Caoutchouc.mdl @@ -0,0 +1,3467 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + +mdl 1.7; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A simple rubber material."; +const string DESCRIPTION_LATEX = "A material made from natural rubber."; +const string DESCRIPTION_NITRILE = "Nitrile is a synthetic material (nitrile butadiene) made from petroleum."; +const string DESCRIPTION_SILICONE = "A material with molecular chains consisting of silicon and oxygen as well as a proportion of hydrogen and carbon."; +const string DESCRIPTION_ERASER = "A material for removing pencil or ink marks."; + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan(float input, float width, float position) +{ + float low = ::math::clamp(1.0f - position * 2.0, 0.0f ,1.0f); + float high = ::math::clamp(position > 0.5f ? 1.0 : 2.0f - 2 * position, 0.0f, 1.0f); + //float center = (low + high)/2.0f); + float offset = ((high - low) / 2.0) * width; + low += offset; + high -= offset; + return ::math::clamp( + remap_xy_to_0_1(input, + low, + high), + 0.0, + 1.0); +} + +::base::texture_coordinate_info transform_coordinate_2( + float4x4 transform + [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix") ]], + ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() + [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection") ]] +) [[ + ::anno::description("Transform a texture coordinate by a matrix") , + ::anno::noinline() + ]] +{ + // Version 2 + float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); + //Hack: try aproximating it for the case that the rotation is only aroud z and assuming the texture layout is nice and z is ~constant. + //just pretend there is no other rotation happening + //get rid of scaling and translation. Then extract fields where sin and cos would be in a simple 2d transform around z. + float4 u = transform[0]; + float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); + float cos = ru.x; + float sin = -ru.y; + + + return ::base::texture_coordinate_info( + float3(r_position.x,r_position.y,r_position.z), + math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), + math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u)); +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 + //bool srgb2rgb = false, + //bool rgb2srgb = false +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + state::normal()*1.0); + //return state::normal(); +} +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, .5), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} +::base::texture_coordinate_info vmat_transform( + float2 translation = float2(0.0, 0.0), + float rotation = 0.0, // rotation in degrees + float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + +::base::texture_coordinate_info vmat_transform_post_scale( + ::base::texture_coordinate_info uvw, + float2 scale = 1.0f +) +{ + return ::base::texture_coordinate_info( + position: float3(uvw.position.x / scale.x, + uvw.position.y / scale.y, + uvw.position.z), + tangent_u: uvw.tangent_u, + tangent_v: uvw.tangent_v + ); +} + +enum unit_scale{ + unit_mm = 1, + unit_cm = 2, + unit_m = 3 +}; + +struct volume_info{ + color absorption_coefficient; + color scattering_coefficient; +}; + + + +// simplified volume coefficients +// This function takes a transmittance value and and albedo and translates it into meaningful +// scattering and volume coefficients that are userfriendly +// +volume_info volume_transmittance_albedo( + float density_scale = 1.0, + color transmittance = color(0.5f), // transmittance color after unit distance + color albedo = color(1.0f) +) +[[ + anno::noinline() +]] +{ + color sigma_t = -math::log(math::saturate(transmittance)) * density_scale; + color sigma_s = sigma_t * ::math::saturate(albedo); + return volume_info( + scattering_coefficient: sigma_s, + absorption_coefficient: sigma_t - sigma_s); +} + +// This function calculates the apropriate scattering and volume coefficients +// for a material of a given thickness. +// The user specifies the thickness of the material, e.g. 3mm and the amount +// of light passing through. The rest is automatically calculated for the material +// and the material_volume is returned. +volume_info custom_volume_transmittance( + unit_scale unit_scale_select = unit_mm, + float absorption_thickness = 3.0f, + color transmittance = color(0.5f), + color albedo = color(0.0f) +) +{ + absorption_thickness = (absorption_thickness <= 0.0f) ? 0.00001 : absorption_thickness; + float scalefactor; + switch(unit_scale_select){ + case unit_mm: scalefactor = 0.001f; break; + case unit_cm: scalefactor = 0.01f; break; + case unit_m: scalefactor = 1.0f; break; + default: scalefactor = 1.0f; + } + + + + volume_info vol_coefficients = volume_transmittance_albedo( + density_scale: 1.0f/(absorption_thickness * scalefactor), + transmittance: transmittance, + albedo: albedo + ); + + return vol_coefficients; +} + +export material Rubber( + uniform bool infinite_tiling = false [[ + ::anno::description("Enables infinite tiling feature that removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::display_name("Infinite Tiling"), + ::anno::in_group("Appearance"), + ::anno::ui_order(0) + ]], + color color_2 = color(0.205079f, 0.205079f, 0.205079f) [[ + ::anno::description("Choose the color of the material."), + ::anno::display_name("Color"), + ::anno::in_group("Appearance"), + ::anno::ui_order(1) + ]], + float dust = 0.f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections. Applies a roughness layer of dust."), + ::anno::display_name("Dust"), + ::anno::in_group("Appearance", "Roughness"), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(2) + ]], + float grunge = 0.f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections. Applies a roughness layer of grunge."), + ::anno::display_name("Grunge"), + ::anno::in_group("Appearance", "Roughness"), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(3) + ]], + float sharp_grunge = 0.f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections. Applies a roughness layer of grunge with sharper edges."), + ::anno::display_name("Sharp Grunge"), + ::anno::in_group("Appearance", "Roughness"), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(4) + ]], + float reflection_scale = 1.f [[ + ::anno::description("Scales the dust, grunge and spot reflection layer."), + ::anno::display_name("Imperfection Scale"), + ::anno::in_group("Appearance", "Roughness"), + ::anno::ui_order(5) + ]], + uniform float bump_strength = 0.f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance", "Bump"), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(6) + ]], + float bump_scale = 1.f [[ + ::anno::description("This slider scales the bump layer."), + ::anno::display_name("Bump Scale"), + ::anno::in_group("Appearance", "Bump"), + ::anno::ui_order(7) + ]], + uniform bool subsurface_scattering = false [[ + ::anno::description("Enable light that penetrates the surface of a translucent object. While set to True it\'s a physically correct calculated SSS effect. If set to False it\'s a diffuse transmission that is cheaper to perform."), + ::anno::display_name("Subsurface Scattering"), + ::anno::in_group("Appearance", "Advanced"), + ::anno::ui_order(8) + ]], + float translucency_amount = 0.5f [[ + ::anno::description("Higher values let more light pass through the material. When subsurface scattering is enabled the effect may be more subtle as light is absorbed when it travels through the material."), + ::anno::display_name("Translucency Amount"), + ::anno::in_group("Appearance", "Advanced"), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(9) + ]], + float translucency_blur = 0.f [[ + ::anno::description("Diffusion causes the light to be scattered in different directions as it passes through the materials."), + ::anno::display_name("Diffusion"), + ::anno::in_group("Appearance", "Advanced"), + ::anno::hard_range(0.f, 1.f), + ::anno::soft_range(0.f, 1.f), + ::anno::ui_order(10) + ]], + uniform bool thin_walled = false [[ + ::anno::description("Only set this to \"True\" for thin surfaces."), + ::anno::display_name("Thin Walled"), + ::anno::in_group("Appearance", "Advanced"), + ::anno::ui_order(11) + ]], + float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Texture Translate"), + ::anno::in_group("Transform"), + ::anno::ui_order(12) + ]], + float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Texture Rotate"), + ::anno::in_group("Transform"), + ::anno::ui_order(13) + ]], + float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Texture Scale"), + ::anno::in_group("Transform"), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::ui_order(14) + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Uses selected UV space for the material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Transform"), + ::anno::ui_order(15) + ]], + uniform bool enable_round_corners = false [[ + ::anno::description("Enables the round cornwer effect. Comes at a slight performance cost as additional raytracing calls are rquired to evaluate the round corner effect"), + ::anno::display_name("Round Corners"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(16) + ]], + uniform float radius = 1.5f [[ + ::anno::description("Radius of the rounded corners in millimeters (mm)"), + ::anno::display_name("Radius mm"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(17) + ]], + uniform bool across_materials = false [[ + ::anno::description("Applies the round corner effect across different materials when enabled"), + ::anno::display_name("Across Materials"), + ::anno::in_group("Round Corners"), + ::anno::ui_order(18) + ]]) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("rubber", "gray", "natural", "rough", "matte", "neutral", "caoutchouc", "wheel", "car", "automotive")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = + let { + bool tmp0 = thin_walled; + material_surface tmp1(df::custom_curve_layer(0.0399999991f, 1.f, 5.f, 1.f, df::microfacet_ggx_smith_bsdf(math::max(math::max(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[0], 1.f, 0.579999983f) * math::lerp(0.f, 1.5f, dust), float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[1] * grunge), histogram_scan(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[2], 0.159999996f, 0.099999994f) * sharp_grunge) * math::max(math::max(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[0], 1.f, 0.579999983f) * math::lerp(0.f, 1.5f, dust), float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[1] * grunge), histogram_scan(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[2], 0.159999996f, 0.099999994f) * sharp_grunge), math::max(math::max(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[0], 1.f, 0.579999983f) * math::lerp(0.f, 1.5f, dust), float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[1] * grunge), histogram_scan(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[2], 0.159999996f, 0.099999994f) * sharp_grunge) * math::max(math::max(histogram_range(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[0], 1.f, 0.579999983f) * math::lerp(0.f, 1.5f, dust), float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[1] * grunge), histogram_scan(float3(infinite_tiling ? endless_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), 8.f, float3(0.800000012f, 0.756862998f, 0.847059011f), 8.f, false) : base::file_texture(texture_2d("./tire_multi_rough_R_fractal_sum_G_grungeA_B_BnWSpots3.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), base::mono_alpha, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(9.99999975e-05f, 1.f, reflection_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 0.f, int2(0), tex::wrap_repeat, 30.f).tint)[2], 0.159999996f, 0.099999994f) * sharp_grunge), color(1.f, 1.f, 1.f), color(1.f, 1.f, 1.f), state::texture_tangent_u(0), df::scatter_reflect), df::weighted_layer(math::lerp(1.f, 0.f, translucency_amount), df::diffuse_reflection_bsdf(color_2, 0.f), df::weighted_layer(0.899999976f, df::diffuse_transmission_bsdf(color_2), df::weighted_layer(0.970000029f, df::simple_glossy_bsdf(math::lerp(0.f, 0.200000003f, translucency_blur) * math::lerp(0.f, 0.200000003f, translucency_blur), math::lerp(0.f, 0.200000003f, translucency_blur) * math::lerp(0.f, 0.200000003f, translucency_blur), color(0.752942026f, 0.752942026f, 0.752942026f), color(0.787411988f, 0.787411988f, 0.787411988f), state::texture_tangent_u(0), df::scatter_transmit), df::specular_bsdf(color(0.284646988f, 0.284646988f, 0.284646988f), df::scatter_transmit), state::normal()), state::normal()), state::normal()), infinite_tiling ? endless_normal(texture_2d("./tire_fractal_sum_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(0.00999999978f, 2.f, bump_scale))), 8.f, float3(0.501960993f, 0.501960993f, 0.988234997f), 8.f) : base::tangent_space_normal_texture(texture_2d("./tire_fractal_sum_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform_post_scale(vmat_transform(texture_translate, texture_rotate, texture_scale, base::texture_coordinate_uvw, uv_space_index), float2(math::lerp(0.00999999978f, 2.f, bump_scale))), float2(0.f, 1.f), float2(0.f, 1.f), tex::wrap_repeat, tex::wrap_repeat, false, 1.f, 0.f, 0.f, int2(0), tex::wrap_repeat, 30.f)), material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(2.61219501f, 2.61219501f, 2.61219501f); + material_volume tmp4 = subsurface_scattering ? material_volume(vdf(), custom_volume_transmittance(unit_cm, 6.f, color(0.0432340018f, 0.0432340018f, 0.0432340018f), color(0.911408007f, 0.911408007f, 0.911408007f)).absorption_coefficient, custom_volume_transmittance(unit_cm, 6.f, color(0.0432340018f, 0.0432340018f, 0.0432340018f), color(0.911408007f, 0.911408007f, 0.911408007f)).scattering_coefficient, color(0.f, 0.f, 0.f)) : material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f), emission_intensity: color(0.f, 0.f, 0.f)); + material_geometry tmp5(float3(0.f), 1.f, enable_round_corners ? state::rounded_corner_normal(radius * 0.00100000005f, across_materials, 1.f) : state::normal()); + + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + +export material Rubber_Black_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Black Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "neutral", "shiny", "dark", "warm", "black")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.010330f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Black_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Black Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "neutral", "matte", "dark", "warm", "black")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( infinite_tiling: false, + color_2: color(0.010330f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Wine_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Wine Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "dark", "warm", "red", "wine")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.171441f,0.f,0.f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Wine_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Wine Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "dark", "warm", "red", "wine")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.171441f,0.f,0.f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Orange_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Orange Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "light", "warm", "orange")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.147027f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Orange_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Orange Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "light", "warm", "orange")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.147027f,0.012983f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Mandarin_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Mandarin Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "light", "warm", "mandarin")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.417885f,0.078187f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Mandarin_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Mandarin Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "light", "warm", "mandarin")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.417885f,0.078187f,0.012983f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Lemon_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Lemon Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "light", "warm", "lemon", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.539479f,0.439657f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Lemon_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Lemon Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "light", "warm", "lemon", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.539479f,0.439657f,0.012983f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Turtle_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Turtle Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "warm", "turtle", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.056128f,0.141263f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Turtle_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Turtle Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "warm", "turtle", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.056128f,0.141263f,0.012983f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Frog_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Frog Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "cold", "cool", "frog", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.223228f,0.057805f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Frog_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Frog Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "cold", "cool", "frog", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.223228f,0.057805f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Heaven_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Heaven Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "cold", "cool", "heaven", "blue", "light")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.456411f,0.603827f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Heaven_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Heaven Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "cold", "cool", "heaven", "blue", "light")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.456411f,0.603827f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Submarine_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Submarine Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "cold", "cool", "submarine", "blue")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.124772f,0.223228f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Submarine_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Submarine Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "cold", "cool", "submarine", "blue")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.124772f,0.223228f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Lolly_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Lolly Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "warm", "lolly", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.012983f,0.318547f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Lolly_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Lolly Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "warm", "lolly", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.012983f,0.318547f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Rubber_Beet_Shiny(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Beet Shiny"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "shiny", "dark", "cold", "cool", "beet", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.084376f,0.012983f,0.030713f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Rubber_Beet_Matte(*) +[[ + ::anno::description(DESCRIPTION), + ::anno::display_name("Rubber - Beet Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "car", "tyres", "tire", "automotive", "gaskets", "mountings", "toys", "wrist bands", "gum", "matte", "dark", "cold", "cool", "beet", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.084376f,0.012983f,0.030713f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 0.2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// eraeser material appearances + +export material Eraser_Blue(*) +[[ + ::anno::description(DESCRIPTION_ERASER), + ::anno::display_name("Eraser - Blue"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "school", "eraser", "gum", "matte", "cold", "cool", "blue")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f,0.028426f,0.132868f), + dust: 0.85f, + grunge: 1.f, + sharp_grunge: 1.f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:0.1f, + subsurface_scattering: false, + translucency_amount:0.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Eraser_Red(*) +[[ + ::anno::description(DESCRIPTION_ERASER), + ::anno::display_name("Eraser - Red"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "school", "eraser", "gum", "matte", "cold", "warm", "orange", "red")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.262251f,0.025187f,0.012983f), + dust: 0.85f, + grunge: 1.f, + sharp_grunge: 1.f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:0.1f, + subsurface_scattering: false, + translucency_amount:0.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Eraser_White(*) +[[ + ::anno::description(DESCRIPTION_ERASER), + ::anno::display_name("Eraser - White"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "school", "eraser", "gum", "matte", "white", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.212231f,0.187821f,0.171441f), + dust: 0.85f, + grunge: 1.f, + sharp_grunge: 1.f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:0.1f, + subsurface_scattering: false, + translucency_amount:0.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Eraser_Gray(*) +[[ + ::anno::description(DESCRIPTION_ERASER), + ::anno::display_name("Eraser - Gray"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "school", "eraser", "gum", "matte", "gray", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.019382f,0.017642f,0.015996f), + dust: 0.85f, + grunge: 1.f, + sharp_grunge: 1.f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:0.1f, + subsurface_scattering: false, + translucency_amount:0.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Black +export material Latex_Black_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Black Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "black", "dark")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Black_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Black Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "black", "dark")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Black_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Black Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "black", "transparent", "dark")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Red +export material Latex_Red_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Red Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "red")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.715694f,0.012983f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Red_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Red Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "red")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.715694f,0.012983f,0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Red_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Red Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "red", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.715694f,0.012983f,0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Tangerine +export material Latex_Tangerine_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Tangerine Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "tangerine", "orange")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.871367f,0.147027f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Tangerine_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Tangerine Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "tangerine", "orange")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.871367f,0.147027f,0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Tangerine_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Tangerine Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "tangerine", "orange", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.871367f,0.147027f,0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Citrus +export material Latex_Citrus_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Citrus Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "citrus", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.679542f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Citrus_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Citrus Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "citrus", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.679542f,0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Citrus_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Citrus Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "citrus", "yellow", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.791298f,0.679542f,0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Mustard +export material Latex_Mustard_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Mustard Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "mustard", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.577580f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Mustard_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Mustard Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "mustard", "yellow")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.577580f,0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Mustard_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Mustard Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "mustard", "yellow", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.577580f,0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Lime +export material Latex_Lime_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Lime Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "lime", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.226966f,0.658375f,0.012983f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Lime_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Lime Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "lime", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.226966f,0.658375f,0.012983f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Lime_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Lime Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "lime", "green", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.226966f,0.658375f,0.012983f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Grass +export material Latex_Grass_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Grass Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "cold", "cool", "grass", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.004777f,0.223228f,0.004777f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Grass_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Grass Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "cold", "cool", "grass", "green")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.004777f,0.223228f,0.004777f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Grass_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Grass Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "grass", "green", "cold", "cool", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.004777f,0.223228f,0.004777f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Turquoise +export material Latex_Turquoise_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Turquoise Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "cold", "cool", "turquoise")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.603827f,0.603827f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Turquoise_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Turquoise Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "cold", "cool", "turquoise")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.603827f,0.603827f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Turquoise_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Turquoise Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "turquoise", "cold", "cool", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.603827f,0.603827f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Ultra Blue +export material Latex_Ultra_Blue_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Ultra Blue Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "cold", "cool", "ultra", "blue")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.102242f,0.791298f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Ultra_Blue_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Ultra Blue Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "cold", "cool", "blue", "ultra")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.102242f,0.791298f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Ultra_Blue_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Ultra Blue Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "blue", "ultra", "cold", "cool", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f,0.102242f,0.791298f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Pink +export material Latex_Pink_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Pink Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "warm", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.f,0.879622F), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Pink_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Pink Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "warm", "pink")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.f,0.879622F), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Pink_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Pink Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "pink", "warm", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f,0.f,0.879622F), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// latex material appearances +// Radish +export material Latex_Radish_Clean(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Radish Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "clean", "cold", "cool", "radish")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.445201f,0.f,0.147027f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:0.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Radish_Soft(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Radish Soft"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "soft", "smooth", "cold", "cool", "radish")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.445201f,0.f,0.147027f), + dust: 0.3f, + grunge: 0.45f, + sharp_grunge: 0.15f, + reflection_scale: .2f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:.2f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Latex_Radish_Transparent(*) +[[ + ::anno::description(DESCRIPTION_LATEX), + ::anno::display_name("Latex - Radish Transparent"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "rubber", "caoutchouc", "gum","clothes", "radish", "cold", "cool", "transparent")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.445201f,0.f,0.147027f), + dust: .0f, + grunge: 0.0f, + sharp_grunge: 0.0f, + reflection_scale: 1.f, + bump_strength: 0.f, + bump_scale:1.f, + subsurface_scattering: true, + translucency_amount:1.f, + translucency_blur:0.f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// nitrile material appearances +// Ultra White +export material Nitrile_Ultra_White_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Ultra White Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "neutral", "ultra", "white")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.863157f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// nitrile material appearances +// Cream White +export material Nitrile_Cream_White_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Cream White Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "neutral", "cream", "white")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.863157f, 0.806952f, 0.603827f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// nitrile material appearances +// Violet +export material Nitrile_Violet_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Violet Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "cold", "cool", "violet")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.054480f, 0.013702f, 0.672443f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// nitrile material appearances +// Black +export material Nitrile_Black_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Black Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "neutral", "dark", "black")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.004025f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// nitrile material appearances +// Blue +export material Nitrile_Blue_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Blue Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "cold", "cool", "blue")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f, 0.109462f, 0.445201f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// nitrile material appearances +// Light Blue +export material Nitrile_Light_Blue_Clean(*) +[[ + ::anno::description(DESCRIPTION_NITRILE), + ::anno::display_name("Latex - Light Blue Clean"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "thin", "walled" ,"nitrile", "rubber", "caoutchouc", "gum", "clothes", "medical", "clean", "cold", "cool", "blue", "light")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.010330f, 0.491021f, 1.f), + dust: 0.5f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: .2f, + bump_strength: 0.02f, + bump_scale:1.f, + subsurface_scattering: false, + translucency_amount:0.8f, + translucency_blur:1.f, + thin_walled: true, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// silicone material appearances +// Silicone White +export material Silicone_White(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - White"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "neutral", "white", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.88f, 0.88f, 0.88f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: .1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_White_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - White Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "neutral", "white", "neutral", "opaque")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.66f, 0.66f, 0.66f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength: .1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_White_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - White Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "neutral", "white", "neutral", "matte")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.88f, 0.88f, 0.88f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// Silicone Gray +export material Silicone_Gray(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Gray"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "neutral", "gray")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.4f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Gray_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Gray Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "gray", "neutral", "opaque")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.2f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +export material Silicone_Gray_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Gray Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "neutral", "gray", "matte")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.4f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); + +// Silicone Marone +export material Silicone_Marone(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Marone"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "marone", "brown", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.57f, 0.285f, 0.0734f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Marone_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Marone Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "marone", "brown", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.308057f, 0.09462f, 0.03895f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Marone_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Marone Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "marone", "brown", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.57f, 0.285f, 0.0734f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Blue +export material Silicone_Blue(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Blue"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "blue", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f, 0.11765f, 0.72941f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Blue_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - BLue Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "blue", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f, 0.09197f, 0.57011f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Blue_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Blue Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "blue", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f, 0.11765f, 0.72941f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Green +export material Silicone_Green(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Green"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "green", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.00392f, 0.39216f, 0.2f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Green_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Green Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "green", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.f, 0.2069f, 0.04851f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Green_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Green Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "green", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.00392f, 0.39216f, 0.2f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Yellow +export material Silicone_Yellow(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Yellow"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "yellow", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f, 0.95294f, 0.f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Yellow_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Yellow Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "yellow", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.85747f, 0.81712f, 0.f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Yellow_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Yellow Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "yellow", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(1.f, 0.95294f, 0.f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Light Pink +export material Silicone_Light_Pink(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Light Pink"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "pink", "light", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.95294f, 0.70588f, 0.82353f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Light_Pink_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Light Pink Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "pink", "light", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.96552f, 0.58375f, 0.76554f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Light_Pink_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Light Pink Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "light", "pink", "cold", "cool")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.95294f, 0.70588f, 0.82353f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Cream +export material Silicone_Cream(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Cream"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "gray", "cream", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.63529f, 0.61176f, 0.49804f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Cream_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Cream Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "gray", "cream", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.56092, 0.53686f, 0.42037f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Cream_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Light Cream Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "cream", "gray", "neutral")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.63529f, 0.61176f, 0.49804f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +// Silicone Red +export material Silicone_Red(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Red"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "red", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(.67451f, 0.f, 0.11765f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Red_Opaque(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Red Opaque"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "opaque", "red", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(0.52644f, 0.f, 0.f), + dust: 0.f, + grunge: 0.f, + sharp_grunge: 0.f, + reflection_scale: 1.f, + bump_strength:.1f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:.5f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); +export material Silicone_Red_Matte(*) +[[ + ::anno::description(DESCRIPTION_SILICONE), + ::anno::display_name("Silicone - Red Matte"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::key_words(string[]("infinite tiling", "silicone", "rubber", "caoutchouc", "gum", "clothes", "medical", "sanitary", "facilities", "matte", "red", "warm")), + ::anno::author("Nvidia vMaterials"), + ::anno::contributor("Maik Rohland"), + ::anno::contributor("Ruediger Raab") +]] + = Rubber ( + infinite_tiling: false, + color_2: color(.67451f, 0.f, 0.11765f), + dust: 0.8f, + grunge: 0.5f, + sharp_grunge: 0.2f, + reflection_scale: 1.f, + bump_strength: 1.f, + bump_scale:.5f, + subsurface_scattering: false, + translucency_amount:1.f, + translucency_blur:.0f, + thin_walled: false, + texture_translate:0.0f, + texture_rotate:0.f, + texture_scale: 1.0f, + uv_space_index: 0, + enable_round_corners: false, + radius: 1.5f, + across_materials: false +); \ No newline at end of file diff --git a/Assets/Material/material_0515/Chalk_Paint_Pebbles.mdl b/Assets/Material/material_0515/Chalk_Paint_Pebbles.mdl new file mode 100644 index 0000000000000000000000000000000000000000..0dff1e41ed6576be9b3ee5acc51e9f54bf6df336 --- /dev/null +++ b/Assets/Material/material_0515/Chalk_Paint_Pebbles.mdl @@ -0,0 +1,802 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. * + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.4; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::dimension; +import ::nvidia::core_definitions::blend_colors; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = +"A diffuse chalk paint material with a slightly glossy sheen, evenly applied with a bumpy look and feel"; + + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +::base::texture_coordinate_info vmat_transform( + uniform float2 translation = float2(0.0, 0.0), + uniform float rotation = 0.0, + uniform float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return ::base::transform_coordinate(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + +float uint2float(int x) +{ + return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); +} + +int lowbias32(int x) +{ + x ^= x >>> 16; + x *= 0x7feb352d; + x ^= x >>> 15; + x *= 0x846ca68b; + x ^= x >>> 16; + return x; +} + +float2 rnd22(int2 p) { + float2 ret_val = float2( + uint2float(lowbias32(p[0] + lowbias32(p[1]))) / 4294967296.f, + uint2float(lowbias32(p[0] + 32000 + lowbias32(p[1]))) / 4294967296.f + ); + return ret_val; +} + +float3 srgb2rgb(float3 val) +{ + return ::math::pow(::math::max(val, float3(0.0f)), 2.2); +} + +float2x2 invert_2x2(float2x2 M) +{ + float det = M[0][0]*M[1][1] - M[0][1]*M[1][0]; + //https://www.chilimath.com/lessons/advanced-algebra/inverse-of-a-2x2-matrix/ + return (1.0 / det) * float2x2(M[1][1], -M[0][1], -M[1][0], M[0][0]); +} + +float3 nonrepeat_lookup( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5), + float patch_size = 8.0 +) +{ + + float2 uv_in = float2(uvw.position[0], uvw.position[1]) * texture_scale; + float Z = patch_size; // patch scale inside example texture + float CON = 1.0f; + + float3 O = float3(0.f); + float2x2 M0 = float2x2(1.f,0.f, 0.5f, ::math::sqrt(3.f)/2.f); + float2x2 M = invert_2x2(M0); // transform matrix <-> tilted space + + float2 U = uv_in; + float2 V = M * uv_in; //pre-tilted hexa coordinates + int2 I = int2(::math::floor(V)); // hexa-tile id + + // The mean color needs to be determined in Photoshop then to make the + // average color work out, take the float value and calculate the apropriate + // mean value as (value^(1/2.2)) + + float3 m = average_color; + + float3 F = float3(::math::frac(V)[0], ::math::frac(V)[1], 0.f), W; + F[2] = 1.0 - F[0] - F[1]; // local hexa coordinates + + if( F[2] > 0.f ) + + O = (W[0] = F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I))) - m*float(CON)) + + (W[1] = F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0,1)))) - m*float(CON)) + + (W[2] = F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1,0)))) - m*float(CON)); + else + O = (W[0] = -F[2]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1)))) - m*float(CON)) + + (W[1] = 1.f - F[1]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(1, 0)))) - m*float(CON)) + + (W[2] = 1.f - F[0]) * (( ::tex::lookup_float3(texture, U/Z-rnd22(I+int2(0, 1)))) - m*float(CON)); + O = m + O/::math::length(W); + O = ::math::clamp( (O), 0.0, 1.0); + + return float3(O); +} + +color endless_texture( + uniform texture_2d texture = texture_2d(), + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 10.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0, + bool gamma_correct_lookup = true +) +{ + return gamma_correct_lookup ? color(srgb2rgb( + nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )) + ) : color(nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + )); +} + +float3 endless_normal( + uniform texture_2d texture = texture_2d(), + float factor = 1.0, + bool flip_tangent_u = false, + bool flip_tangent_v = false, + ::base::texture_coordinate_info uvw = ::base::coordinate_source(), + float texture_scale = 1.0, + float3 average_color = float3(0.5, 0.5, 1.0), + float patch_size = 8.0 +) +{ + float3 transformed_tangent_u = flip_tangent_u ? uvw.tangent_u : - uvw.tangent_u; + float3 transformed_tangent_v = flip_tangent_v ? uvw.tangent_v : - uvw.tangent_v; + + if (flip_tangent_u) + transformed_tangent_u=-transformed_tangent_u; + if (flip_tangent_v) + transformed_tangent_v=-transformed_tangent_v; + + // normalized Lookup + float3 tangent_space_normal = + (nonrepeat_lookup ( + texture: texture, + uvw: uvw, + texture_scale: texture_scale, + average_color: average_color, + patch_size: patch_size + ) - 0.5) * (2.0 * factor); + + return ::math::normalize(uvw.tangent_u * tangent_space_normal.x + + uvw.tangent_v * tangent_space_normal.y + + ::state::normal()*1.0); +} + +float3 normalmap_normal( + uniform texture_2d texture, + float factor = 1.0, + ::base::texture_coordinate_info uvw = ::base::texture_coordinate_info() +) +{ + float3 lookup = (::tex::lookup_float3(texture, float2(uvw.position.x, uvw.position.y)) - 0.5) * (factor * 2.0); + return ::math::normalize(uvw.tangent_u * lookup.x + uvw.tangent_v * lookup.y + ::state::normal()); +} + +export material Chalk_Paint_Pebbles( + uniform bool infinite_tiling = true [[ + ::anno::description("Enables infinite tiling feature which removes repeating texture patterns. Note that depending on the material this feature changes the appearance of the material slightly."), + ::anno::in_group("Appearance") + ]], + float patch_size = 0.9f [[ + ::anno::description("Determines the size of the sampled area in the texture. Larger values sample smaller areas, resulting in a more fragmented look of the source texture. Tweak the value so that the appearance of the infinite tiling looks good to you."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + color paint_color = color(0.1042f, 0.32314f, 0.031327f) [[ + ::anno::description("Sets the diffuse color of the paint material."), + ::anno::in_group("Appearance") + ]], + float paint_brightness = 0.737f [[ + ::anno::description("Adjusts the brightness of the paint."), + ::anno::display_name("Paint Brightness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + float paint_roughness = 0.9f [[ + ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), + ::anno::display_name("Paint Roughness"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + float bump_strength = 1.f [[ + ::anno::description("Specifies the strength of the bump."), + ::anno::display_name("Bump Strength"), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float2 texture_translate = 0.f [[ + ::anno::description("Controls the position of the texture."), + ::anno::display_name("Translate"), + ::anno::in_group("Transform") + ]], + uniform float texture_rotate = 0.f [[ + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::display_name("Rotate"), + ::anno::in_group("Transform") + ]], + uniform float2 texture_scale = 1.f [[ + ::anno::description("Larger numbers increase the size."), + ::anno::display_name("Scale"), + ::nvidia::core_definitions::dimension(float2(1.0, 1.0)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::description("Use selected UV space for material."), + ::anno::display_name("UV Space Index"), + ::anno::in_group("Advanced") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Extra White"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "white", "light", "neutral")) +]] + = + let { + bool tmp0 = false; + float2 corrected_texture_scale = texture_scale * 0.5; + + material_surface tmp1( + ::df::custom_curve_layer(0.02f, 1.f, 5.f, histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.50999999f, 0.501999974f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[2], 0.266000003f, 0.180000007f), ::df::microfacet_beckmann_smith_bsdf(histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.51f, 0.502f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] * float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.50999999f, 0.501999974f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 0.985000074f, ::math::lerp(0.36f, 0.09f, paint_roughness)), histogram_scan_big(float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.50999999f, 0.501999974f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1] * float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.50999999f, 0.501999974f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[1], 0.985000074f, ::math::lerp(0.36f, 0.09f, paint_roughness)), color(1.f, 1.f, 1.f), ::state::texture_tangent_u(0), ::df::scatter_reflect, ""), ::df::diffuse_reflection_bsdf(::nvidia::core_definitions::blend_colors(::nvidia::core_definitions::blend_colors(paint_color, color(float3(infinite_tiling ? endless_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.824000001f, 0.50999999f, 0.501999974f), ::math::lerp(60.f, 0.1f, patch_size), true) : ::base::file_texture(texture_2d("./Chalk_Paint_Pebbles_multi_R_diff_G_rough_B_height.jpg", ::tex::gamma_linear), color(0.f, 0.f, 0.f), color(1.f, 1.f, 1.f), ::base::mono_alpha, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), float2(0.f, 1.f), float2(0.f, 1.f), ::tex::wrap_repeat, ::tex::wrap_repeat, false).tint)[0]), ::base::color_layer_multiply, 0.8f).tint, color(0.f, 0.f, 0.f), ::base::color_layer_multiply, ::math::lerp(0.400000006f, 0.f, paint_brightness)).tint, 0.f, ""), ::state::normal()), + material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + material_surface tmp2 = material_surface(scattering: bsdf(), emission: material_emission(emission: edf(), intensity: color(0.f, 0.f, 0.f), mode: intensity_radiant_exitance)); + color tmp3 = color(1.f, 1.f, 1.f); + material_volume tmp4 = material_volume(scattering: vdf(), absorption_coefficient: color(0.f, 0.f, 0.f), scattering_coefficient: color(0.f, 0.f, 0.f)); + material_geometry tmp5( + float3(0.f), + 1.f, + infinite_tiling ? endless_normal(texture_2d("./Chalk_Paint_Pebbles_norm.jpg", ::tex::gamma_linear), bump_strength, false, false, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index), ::math::lerp(60.f, 0.1f, patch_size), float3(0.5f, 0.5f, 1.f), ::math::lerp(60.f, 0.1f, patch_size)) : normalmap_normal(texture_2d("./Chalk_Paint_Pebbles_norm.jpg", ::tex::gamma_linear), bump_strength, vmat_transform(texture_translate, texture_rotate, corrected_texture_scale, ::base::texture_coordinate_uvw, uv_space_index))); + } in + material( + thin_walled: tmp0, + surface: tmp1, + backface: tmp2, + ior: tmp3, + volume: tmp4, + geometry: tmp5); + + + +export material Chalk_Paint_Pebbles_Origami(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Origami"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Origami.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "white", "light", "neutral", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.684843f, 0.684843f, 0.634958f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Rose_Ash(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Rose Ash"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Rose_Ash.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "rose", "pink", "light", "warm", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.684843f, 0.664642f, 0.620393f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Moonlight(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Moonlight"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Moonlight.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "light", "neutral")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.674701f, 0.674701f, 0.674701f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Elation(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Elation"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Elation.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "lilac", "light", "desaturated")) +]] += Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.664642f, 0.659643f, 0.700210f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Misty(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Misty"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Misty.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "green", "light", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.568561f, 0.610786f, 0.596528f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Moonstone(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Moonstone"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Moonstone.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "gray", "neutral")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.506143f, 0.510471f, 0.489035f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Roses(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Roses"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Roses.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "rose", "red", "light", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.644771f, 0.506143f, 0.472246f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + + +export material Chalk_Paint_Pebbles_Felted_Wool(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Felted Wool"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Felted_Wool.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "brown", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.356441f, 0.331956f, 0.279539f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Bark(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Bark"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Bark.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "brown")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.215402f, 0.204714f, 0.174419f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Morning_Dew(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Morning Dew"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Morning_Dew.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "green", "desturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.292183f, 0.370860f, 0.349348f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + + +export material Chalk_Paint_Pebbles_Contemplation(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Contemplation"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Contemplation.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "teal", "cool", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.210021f, 0.288993f, 0.311724f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Distance(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Distance"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Distance.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "blue", "cool", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.174419f, 0.231992f, 0.273331f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Deep_Emerald(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Deep Emerald"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Deep_Emerald.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "blue", "cool", "dark")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.077511f, 0.160259f, 0.176843f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Night_Watch(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Night Watch"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Night_Watch.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "dark", "blue", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.106357f, 0.151181f, 0.146750f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Wine(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Wine"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Wine.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "red", "dark", "warm", "desaturated")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.212702f, 0.129743f, 0.144562f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Black_Bean(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Black Bean"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Black_Bean.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "brown", "dark")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.117733f, 0.097356f, 0.090467f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Dark_Forest(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Dark Forest"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Dark_Forest.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "gray", "dark", "neutral")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.123658f, 0.140238f, 0.146750f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Charcoal_Blue(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Charcoal Blue"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Charcoal_Blue.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "charcoal", "cool", "dark")) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.111966f, 0.123658f, 0.148957f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); + + + +export material Chalk_Paint_Pebbles_Summernight(*) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Chalk Paint Pebbles - Summernight"), + ::anno::description(DESCRIPTION), + ::anno::copyright_notice(COPYRIGHT), + ::anno::thumbnail("./.thumbs/Chalk_Paint_Pebbles.Chalk_Paint_Pebbles_Summernight.png"), + ::anno::key_words(string[]("paint", "chalk", "wall", "bumped", "rough", "design", "new", "infinite tiling", "architecture", "decorative", "blue", "dark", "desaturated" )) +]] + = Chalk_Paint_Pebbles( + infinite_tiling: true, + patch_size: 0.9f, + paint_color: color(0.069965f, 0.102704f, 0.115793f), + paint_brightness: 0.7f, + paint_roughness: 0.9f, + bump_strength: 0.7f, + texture_translate: 0.f, + texture_rotate: 0.f, + texture_scale: 1.0f, + uv_space_index: 0 +); diff --git a/Assets/Material/material_0560/Wood_Tiles_Ash.mdl b/Assets/Material/material_0560/Wood_Tiles_Ash.mdl new file mode 100644 index 0000000000000000000000000000000000000000..e4b07dc140bf75e1ba6e7480c40a5b2b6a916a4f --- /dev/null +++ b/Assets/Material/material_0560/Wood_Tiles_Ash.mdl @@ -0,0 +1,2879 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A wooden tile material with adjustments to produce a rich variety of wooden floor styles ranging from new to worn"; + + +// ---------------------------------------------------------------------------------------------------------------------- + + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +// ********** Randomization functions -I- ********** + +int random(int seed = 0, int modulus = 65536, int multiplier = 1664525, int increment = 1013904223) +{ + return (multiplier * seed + increment) % modulus; +} + + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + ::anno::hidden() +]] +{ + return + n.x* float3(::state::texture_tangent_u(0).x,::state::texture_tangent_v(0).x,::state::normal().x)+ + n.y* float3(::state::texture_tangent_u(0).y,::state::texture_tangent_v(0).y,::state::normal().y)+ + n.z* float3(::state::texture_tangent_u(0).z,::state::texture_tangent_v(0).z,::state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + ::anno::hidden() +]] +{ + return ::state::texture_tangent_u(0) * n.x + + ::state::texture_tangent_v(0) * n.y + + ::state::normal() * n.z ; +} + + + +// Returns a normal by adding a detail normal to a global normal. +// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded +// correctly with ::tex::gamma_linear +float3 add_detail_normal(float3 nd = ::state::normal(), float3 n = ::state::normal()) +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + + n = n_t*::math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + +::base::texture_coordinate_info transform_coordinate_2( + float4x4 transform + [[ ::anno::description("A transformation to be applied to the source coordinates. rotation_translation_scale() is a suggested means to compute the transformation matrix.") ]], + ::base::texture_coordinate_info coordinate = ::base::texture_coordinate_info() + [[ ::anno::description("Coordinate, typically sourced from coordinate_source or coordinate_projection.") ]] +) [[ + ::anno::description("Transform a texture coordinate by a matrix.") , + ::anno::noinline() + ]] +{ + // Version 2 + float4 r_position = transform * float4(coordinate.position.x,coordinate.position.y,coordinate.position.z,1); + + float4 u = transform[0]; + float3 ru = ::math::normalize(float3(u.x,u.y,u.z)); + float cos = ru.x; + float sin = -ru.y; + + return ::base::texture_coordinate_info( + float3(r_position.x,r_position.y,r_position.z), + ::math::normalize(cos * coordinate.tangent_u - sin * coordinate.tangent_v), + ::math::normalize(cos * coordinate.tangent_v + sin * coordinate.tangent_u)); +} + + +// Takes the standard input that every material has. It combines a couple of +// functions in one convenience function. +::base::texture_coordinate_info vmat_transform( + float2 translation = float2(0.0, 0.0), + float rotation = 0.0, // rotation in degrees + float2 scaling = float2(1.0, 1.0), + uniform ::base::texture_coordinate_system system = ::base::texture_coordinate_uvw, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float4x4 scale = + float4x4(1.0 /scaling.x, 0. , 0. , 0., + 0. , 1.0 /scaling.y , 0. , 0., + 0. , 0. , 1.0, 0., + translation.x , translation.y , 0.0, 1.); + + float s = ::math::sin(rotation_rad); + float c = ::math::cos(rotation_rad); + float4x4 rotate = + float4x4( c , -s , 0.0 , 0.0, + s , c , 0.0 , 0.0, + 0.0, 0.0 , 1.0 , 0.0, + 0. , 0.0 , 0.0 , 1.); + + return transform_coordinate_2(scale*rotate, ::base::coordinate_source(system, uv_space)); +} + + +// Returns 4 random IDs for a given pattern +// TODO: Describe how the whole things exactly works +float4 rand_tile_id( + ::base::texture_coordinate_info uvw, + ::base::texture_return id_offset_map // map containing the ID in r channel + //and the cell offset in g channel. + ) +[[ + ::anno::noinline() +]] +{ + float4 ret_val; + int offset_x, offset_y; + + + float3 id_offset_map_2 = float3(id_offset_map.tint); + float offset_id = id_offset_map_2.y; + int rand_id = int(id_offset_map_2.x * 254.f); // the more logical value of 255 causes sometimes rendering artifacts + // with the random number generator. Setting it to 254 apparently fixes it + + // Offset of overlapping tiles stored in G-channel + // [0 - 0.25[ : ( 0/ 0) Grayscale value: 0.1 + // [0.25 - 0.5 [ : (-1/ 0) Grayscale value: 0.37 + // [0.5 - 0.75[ : (-1/-1) Grayscale value: 0.62 + // [0.75 - 1.0 [ : ( 0/-1) Grayscale value: 0.87 + + offset_x = offset_id < 0.25f ? 0 : (offset_id < .75f) ? 1 : 0; + offset_y = offset_id < 0.5 ? 0 : 1; + + int2 cell_id = int2(int(::math::floor(uvw.position.x) - offset_x), int(::math::floor(uvw.position.y) - offset_y)); + + /* // ORIGINAL + int rand_val_1 = triple32(rand_id + triple32(cell_id.x + triple32(cell_id.y))); + int rand_val_2 = triple32(rand_val_1); + int rand_val_3 = triple32(rand_val_2); + int rand_val_4 = triple32(rand_val_3); + + ret_val = float4(uint2float(rand_val_1), + uint2float(rand_val_2), + uint2float(rand_val_3), + uint2float(rand_val_4)); + + return float4(ret_val/4294967296.f); + */ + + /* Simplified Version */ + int rand_val_1 = random(rand_id + random(cell_id.x + random(cell_id.y))); + int rand_val_2 = random(rand_val_1); + int rand_val_3 = random(rand_val_2); + int rand_val_4 = random(rand_val_3); + + ret_val = float4(rand_val_1, rand_val_2, rand_val_3, rand_val_4); + + return float4(ret_val/65535.0f); +} + + +// ****************************************************************************************************** + +export material Wood_Tiles_Ash( + color wood_color = color(0.4f, 0.3f, 0.16f) [[ + ::anno::display_name("Wood Color"), + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + float age_dirt = 0.4f [[ + ::anno::display_name("Age Dirt"), + ::anno::description("Adds dark dirt spots on top of the surface to create the appearance of a somewhat aged surface."), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float wood_bump_strength = 0.05f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.42f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Randomly darkens the tiles of the floor."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.1f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.1f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + + + uniform float tiles_bump_strength = 0.31f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.15f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.1f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.03f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.45f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]], + +// WOOD Highlights (Not accessible to regular users) + uniform bool preview_wood_highlights = false + [[ + ::anno::display_name("Preview Wood Specular"), + ::anno::description("Enables previewing of the wood specular highlights for tweaking."), + ::anno::in_group("Advanced", "Wood Highlight") + ]], // just previews the highlights of the wood material + float isotropic_roughness = 0.324f // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values.") + [[ + ::anno::display_name("Isotropic Roughness"), + ::anno::description("Sets the roughness of the isotropic component of the wood reflection."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_roughness_range = 0.741f // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + [[ + ::anno::display_name("Isotropic Roughness Range"), + ::anno::description("Sets the degree roughness variation around the isotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_specular_brightness = 0.833f // Sets how strong the isotropic specular highlight appears + [[ + ::anno::display_name("Isotropic Highlight Brightness"), + ::anno::description("Sets the brightness of the isotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float wood_specular_level = 1.f // Adjusts the specular level (PBR Style) + [[ + ::anno::display_name("Wood Specular Level"), + ::anno::description("Adjusts the falloff of the wood highlights."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_attenuation = 0.546f //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + [[ + ::anno::display_name("Anisotropic Attenuation"), + ::anno::description("Breaks up the reflection of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_width = 0.287f //Controls the width of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Width"), + ::anno::description("Adjusts the width of the anisotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_height = 0.917f //Controls the height of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Height"), + ::anno::description("Adjusts the height of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float anisotropic_isotropic_balance = 0.222f // Balances the Anisotropic vs. the isotropic wood highlight" + [[ + ::anno::display_name("Anisotropic - Isotropic Balance"), + ::anno::description("Blends between the contribution of isotropic and anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + +// TEXTURES (Not accessible to regular users) + uniform texture_2d tex_srgb_wood_color = texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb) // Diffuse + [[ + ::anno::display_name("Diffuse Wood Texture"), + ::anno::description("The diffuse wood texture used to cover the tiles (srgb)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear) // Anisotropic Roughness AKA "Rough Detail" + [[ + ::anno::display_name("Anisotropic Variation Texture"), + ::anno::description("Texture to add variation to the anisotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear) // Isotropic Roughness AKA "Rough Grain" + [[ + ::anno::display_name("Isotropic Variation Texture"), + ::anno::description("Texture to add variation to the isotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear) // Wood detail Normal - Grain & Structure + [[ + ::anno::display_name("Wood Normal Texture"), + ::anno::description("Tangent Space Normal texture for defining the bumpiness of the wood."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear) // Tiles ID, Offset & Rotation + [[ + ::anno::display_name("Tiles ID - Offset - Rotation Texture"), + ::anno::description("Texture that holds information about the wood tiles needed to create the wood tiles effect. R - Tiles ID, G - Tiles offset, B - Tiles Rotation (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear) // Edgewear, Gaps(AO), Gaps Roughnesss + [[ + ::anno::display_name("Edgewear - Gaps - Gap Rough"), + ::anno::description("Texture that holds maps for the edgewear roughness, the tile gaps and the gaps roughness (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_tiles_normal = texture_2d("./brickbond_norm.png", ::tex::gamma_linear) // Tiles Normal (Grout and Bend) + [[ + ::anno::display_name("Tiles Normal Texture"), + ::anno::description("Texture that holds the normal map for the tiles (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear) // Tiles Roughness, Dents and Spots + [[ + ::anno::display_name("Tiles Rough - Dents - Spots"), + ::anno::description("Texture that contains maps for the tiles roughness, dents and spots which is a roughness effect applied to the wood coating layer (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + uniform texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) // Tiles orange Peel + [[ + ::anno::display_name("Tiles Orange Peel"), + ::anno::description("Tangent Space Normal texture for the orange peel which is applied to the coating of the tiles."), + ::anno::in_group("Advanced", "Textures") + ]] + +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Brick Bond Master"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::hidden() +]] + = + let { +/* + texture_2d tex_srgb_wood_color = texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb); // Diffuse + texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear); // Anisotropic Roughness AKA "Rough Detail" + texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear); // Isotropic Roughness AKA "Rough Grain" + texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear); // Wood detail Normal - Grain & Structure + texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear); // Tiles ID, Offset & Rotation + texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear); // Edgewear, Gaps(AO), Gaps Roughnesss + texture_2d tex_lin_tiles_normal = texture_2d("./brickbond_norm.png", ::tex::gamma_linear); // Tiles Normal (Grout and Bend) + texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear); // Tiles Roughness, Dents and Spots + texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear); // Tiles orange Peel +*/ +/* + // Wood Highlight tweaks + bool preview_wood_highlights = false; // just previews the highlights of the wood material + float wood_specular_level = 1.f; // Adjusts the specular level (PBR Style) + float isotropic_specular_brightness = 1.0f; // Sets how strong the isotropic specular highlight appears + float aniso_attenuation = 0.5f; //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + float anisotropic_isotropic_balance = 0.467f; // Balances the Anisotropic vs. the isotropic wood highlight" + float isotropic_roughness_range = 0.66f; // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + float isotropic_roughness = 0.34f; // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values."), + + float aniso_bsdf_width = 0.36f; //Controls the width of the anisotropic highlight" + float aniso_bsdf_height = 0.50f; //Controls the height of the anisotropic highlight"), +*/ + + // Prepare the UV coordinates for regular texture lookups + ::base::texture_coordinate_info base_uvw = vmat_transform( + translation:texture_translate, + rotation: texture_rotate, + scaling: texture_scale, + system: ::base::texture_coordinate_uvw, + uv_space: uv_space_index + ); + + + // Random tile transform + // R: tile_id + // G: tile_offset + // B: tile_rotation + + ::base::texture_return rand_id_offset_lookup = ::base::file_texture( + texture: tex_lin_tiles_id_offset_rotation, + uvw: base_uvw, + mono_source: ::base::mono_alpha + ); + + + float4 rand_vals = rand_tile_id( + uvw: base_uvw, + id_offset_map: rand_id_offset_lookup + ); + + float2 rand_translation = float2(rand_vals.x, rand_vals.y); + float rand_rotation = (float3(rand_id_offset_lookup.tint).z + (rand_vals.z - 0.5) * wood_random_rotation) * 360; + float2 rand_scale = float2(wood_scale/(1.0 - wood_scale_variation * 0.5 * rand_vals.x)) * texture_scale; + +// *** TILE UV *** - The randomized UV lookup for the tiles + ::base::texture_coordinate_info tile_uvw = vmat_transform( + translation:rand_translation, + rotation: rand_rotation, + scaling: rand_scale, + system: ::base::texture_coordinate_uvw, + uv_space: uv_space_index + ); + + + // Tiling Lookups and compositing + // R: Edgewear + // G: Gaps + // B: Gaps Damage Roughness + float3 egdewear_gaps_gapsrough_lookup = float3( ::base::file_texture( + texture: tex_lin_tiles_edgewear_gaps_gapsrough, + uvw: base_uvw, + mono_source: ::base::mono_alpha + ).tint); + + // R: Coat Base Roughness (Footsteps, Grain, Wipe) + // G: Dents (Dirt/Ao) + // B: Spots (Liquid-alike) + float3 rough_dents_spots_lookup = float3( ::base::file_texture( + texture: tex_lin_tiles_rough_dents_spots, + uvw: base_uvw, + mono_source: ::base::mono_alpha + ).tint); + + float dirt_and_spots_amount_remap = dirt_and_spots_amount * 0.5; + + float coat_roughness = egdewear_gaps_gapsrough_lookup.x * edgewear_roughness_amount + // edgewear + egdewear_gaps_gapsrough_lookup.z * dirt_and_spots_amount_remap + // Gaps Damage + histogram_range(rough_dents_spots_lookup.x, base_roughness_range, tiles_base_roughness) + // base roughness + rough_dents_spots_lookup.z * dirt_and_spots_amount + // Spots (rough) + (1.0 - rough_dents_spots_lookup.y) * dirt_and_spots_amount; // Dents + + float coat_roughness_squared = coat_roughness*coat_roughness; // roughness squared + + bsdf coating_bsdf = ::df::microfacet_ggx_smith_bsdf( + roughness_u: coat_roughness_squared, + roughness_v: coat_roughness_squared, + tint: color(1.0f), + mode: ::df::scatter_reflect + ); + +// ******** NORMALS ******** + + // Tiles normal + float3 tiles_normal = ::base::tangent_space_normal_texture( + texture: tex_lin_tiles_normal, + factor: tiles_bump_strength, + uvw: base_uvw + ); + + float3 wood_detail_normal = ::base::tangent_space_normal_texture( + texture: tex_lin_wood_detail_norm, + factor: wood_bump_strength, + uvw: tile_uvw + ); + + float3 orange_peel_normal = ::base::tangent_space_normal_texture( + texture: tex_lin_tiles_orange_peel, + factor: tiles_orange_peel_bump_factor * 0.1f, + uvw: base_uvw + ); + + // Randomized Tiles normals - This needs to be probably rotated with the normal of the uv-tiles + float slope_amount = 0.07 * tiles_random_slope_orientation; + float3 slope = ::math::normalize( + ::state::texture_tangent_u(uv_space_index) * (rand_vals.y - 0.5) * slope_amount + + ::state::texture_tangent_v(uv_space_index) * (rand_vals.z - 0.5) * slope_amount + + ::state::normal() * ((1.0f - slope_amount) + 1.0f) + ); + + float3 tiles_slope_normal = add_detail_normal( + n: slope, + nd: tiles_normal + ); + + float3 tiles_slope_detail_normal = add_detail_normal( + n: tiles_slope_normal, + nd: wood_detail_normal + ); + + float3 normal_final = add_detail_normal( + n: tiles_slope_detail_normal, + nd: orange_peel_normal + ); + +// ******** Anisotropic Highlight ******** + // Lookup for anisotropic brightness variation + ::base::texture_coordinate_info aniso_brightnessvar_lookup_uvw = vmat_transform( + translation: texture_translate, + rotation: texture_rotate, + scaling: texture_scale * 0.6, + system: ::base::texture_coordinate_uvw + ); + + ::base::texture_return aniso_brightnessvar_lookup = ::base::file_texture( + texture: tex_lin_wood_rough_detail, + uvw: aniso_brightnessvar_lookup_uvw, + mono_source: ::base::mono_average + ); + + float aniso_brightnessvar = histogram_scan_big( + input: aniso_brightnessvar_lookup.mono, + width: 0.911, + position: aniso_attenuation + ); + + ::base::texture_return aniso_mod_lookup = ::base::file_texture( + texture: tex_lin_wood_rough_detail, + uvw: tile_uvw, + mono_source: ::base::mono_average + ); + + float aniso_detail_u = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_width); + float aniso_detail_v = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_height); + + bsdf wood_highlight_aniso = ::df::weighted_layer( + layer: ::df::microfacet_ggx_smith_bsdf( + roughness_u: aniso_detail_u * aniso_detail_u, + roughness_v: aniso_detail_v * aniso_detail_v, + tint: color(aniso_brightnessvar), + tangent_u: tile_uvw.tangent_u, + mode: ::df::scatter_reflect + ), + weight: 1.0f, + normal: tiles_slope_normal + ); + +// ******** Isotropic Highlight ******** + ::base::texture_return iso_mod_lookup = ::base::file_texture( + texture: tex_lin_wood_rough_grain, + uvw: tile_uvw, + mono_source: ::base::mono_average + ); + + float iso_mod = histogram_range( + input: iso_mod_lookup.mono, + range: isotropic_roughness_range, + position: isotropic_roughness + ); + + float iso_mod_squared = iso_mod * iso_mod; + + bsdf wood_highlight_isotropic = ::df::microfacet_ggx_smith_bsdf( + roughness_u: iso_mod_squared, + roughness_v: iso_mod_squared, + tint: color(isotropic_specular_brightness), + mode: ::df::scatter_reflect + ); + +// ******** Comping Anisotropic and Isotropic Highlight ******** + + bsdf wood_highlight_isotropic_bumped = ::df::weighted_layer( + layer: wood_highlight_isotropic, + base: wood_highlight_aniso, + weight: anisotropic_isotropic_balance, + normal: tiles_slope_detail_normal + ); + + +// ******** Diffuse Comping ******** + + float floor_brightness_remap = ::math::lerp( + a: 0.3f, + b: 1.0f, + l: floor_brightness); + + color diffuse_attenuation = ::math::lerp( + a: gaps_brightness, + b: floor_brightness_remap, + l: egdewear_gaps_gapsrough_lookup.y); + + ::base::texture_return diffuse_lookup = ::base::file_texture( + texture: tex_srgb_wood_color, + uvw: tile_uvw, + mono_source: ::base::mono_alpha, + color_scale: diffuse_attenuation + ); + + float rand_tile_brightness = ::math::lerp( + a: ::math::lerp(a: 1.0f, // range of maximum wood brightness variation + b: 0.73, /*max rand wood darkening */ + l: wood_brightness_variation), + b: 1.0f, + l: rand_vals.z // random value + ); + + // adding the darkening of the dents texture channel + float rand_tile_brightness_dents = rand_tile_brightness * ::math::lerp(1.0f, rough_dents_spots_lookup.y, age_dirt); + + + ::base::texture_return tiles_rand_brightness = ::nvidia::core_definitions::blend_colors( + color_1: diffuse_lookup.tint, + color_2: color(::math::pow( a: rand_tile_brightness_dents, b: 2.2)), // do gamma compensation + mode: ::base::color_layer_multiply, + weight: 1.0f + ); + + ::base::texture_return tiles_rand_brightness_tint = ::nvidia::core_definitions::blend_colors( + color_1: tiles_rand_brightness.tint, + color_2: wood_color, + mode: ::base::color_layer_overlay, + weight: .95f + ); + + bsdf diffuse = ::df::weighted_layer( + layer: ::df::diffuse_reflection_bsdf( + tint: tiles_rand_brightness_tint.tint + ), + normal: tiles_slope_detail_normal, + weight: 1.0 + ); + +// Diffuse + Highlights BSDF + + bsdf diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped, + base: diffuse + ); + +// DEBUG + bsdf debug_diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped + ); + +// Coating Layer + // separate controls for the reflectivity of the gaps and the general reflectivity of the coat + // Note that "gaps_brightness" also controls the diffuse texture (saving an additional parameter here) + float coating_weight = ::math::lerp( + a: gaps_brightness, + b: coating_reflectivity, + l: egdewear_gaps_gapsrough_lookup.y + ); + + // apply the coating layer + bsdf coated_wood_tiles_bsdf = ::df::custom_curve_layer( + normal_reflectivity: 0.03, //may as well be made adjustable (0.08 * specular_level) + grazing_reflectivity: 1.0f, + layer: coating_bsdf, + weight: coating_weight, + base: diffuse_and_highlights_bsdf, + normal: normal_final + ); + + +// ******** Round Corners ******** + float3 round_normal = round_corners ? + ::state::rounded_corner_normal( + radius: roundcorner_radius_mm * 0.001, // is in mm + across_materials: across_materials + ) : ::state::normal(); + +} in material( + surface: material_surface( + scattering: preview_wood_highlights ? debug_diffuse_and_highlights_bsdf : coated_wood_tiles_bsdf + ), + geometry: material_geometry( + normal: round_normal + ) +); + + +// ****************************************************************************************************** +// 01 + +export material Wood_Tiles_Ash_Brickbond( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Brick Bond"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "brick bond", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Brickbond.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./brickbond_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 02 + +export material Wood_Tiles_Ash_Chantilly( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Chantilly"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "chantilly", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Chantilly.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./chantilly_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./chantilly_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./chantilly_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + +// ****************************************************************************************************** +// 03 + +export material Wood_Tiles_Ash_Chevron( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Chevron"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "chevron", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Chevron.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./chevron_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./chevron_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./chevron_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 04 + +export material Wood_Tiles_Ash_Cubes( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Cubes"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "cubes", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Cubes.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./cubes_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./cubes_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./cubes_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 05 + +export material Wood_Tiles_Ash_Diagonal( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Diagonal"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "diagonal", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Diagonal.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./diagonal_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./diagonal_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./diagonal_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 06 + +export material Wood_Tiles_Ash_Herringbone( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Herringbone"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "herringbone", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Herringbone.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./herringbone_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./herringbone_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./herringbone_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 07 + +export material Wood_Tiles_Ash_Mosaic( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Mosaic"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "herringbone", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Mosaic.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./mosaic_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./mosaic_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./mosaic_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + +// ****************************************************************************************************** +// 08 + +export material Wood_Tiles_Ash_Stackbond( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Stack Bond"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "stack bond", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Stackbond.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./stackbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./stackbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./stackbond_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 09 + +export material Wood_Tiles_Ash_Versailles( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Versailles"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "stack bond", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Versailles.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./versailles_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./versailles_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./versailles_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); + + +// ****************************************************************************************************** +// 10 + +export material Wood_Tiles_Ash_Woodstrip( + color wood_color = color(0.5f) [[ + ::anno::description("Applies an overlay color to tint the wood. The color is used using the 'overlay' mode as known " + "from paint programs. A gray value of 0.5 has no effect, brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Wood Color"), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Floor Brightness"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.1f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = float2(.2f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Tiles") + ]], + float wood_scale_variation = 0.f [[ + ::anno::description("Adds random variation to size of the wood in each tile."), + ::anno::display_name("Wood Scale Variation"), + ::anno::in_group("Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Gaps Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Wood Strip"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "ash", "tiles", "tiled", "floor", "pattern", "decorative", "multimaterial", "organic", "natural", "coated", "infinite tiling", "strip", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash.Wood_Tiles_Ash_Woodstrip.png"), + ::anno::copyright_notice(COPYRIGHT) +]] = Wood_Tiles_Ash( + wood_color: wood_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: wood_random_rotation, + wood_scale: wood_scale, + wood_scale_variation: wood_scale_variation, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./woodstrip_R_id_G_offs_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./woodstrip_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./woodstrip_norm.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + +); \ No newline at end of file diff --git a/Assets/Material/material_0561/Wood_Tiles_Ash_Multicolor.mdl b/Assets/Material/material_0561/Wood_Tiles_Ash_Multicolor.mdl new file mode 100644 index 0000000000000000000000000000000000000000..31be73bb0542ea6200b11023064e435d68de7e24 --- /dev/null +++ b/Assets/Material/material_0561/Wood_Tiles_Ash_Multicolor.mdl @@ -0,0 +1,1594 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A wooden tile material with adjustments to produce a rich variety of wooden floor styles ranging from new to worn."; + +annotation preview_scale( float f); + + +struct vm_coordinates{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color"), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + // Translation before or after rotation? + return uv; +} + +vm_coordinates vm_coord_post_scale( + vm_coordinates uv = vm_coord(), + float2 scale = 1.0f +) +{ + uv.uv /= scale; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f)) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +float3 vm_tex_normal_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + float strength = 1.0f +) +{ + float rot = uv.rotation; + // Lookup and convert normal texture to -1 ... 1 range + float3 norm = (::tex::lookup_float3(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(strength, strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(rot) * norm.x - ::math::sin(rot) * norm.y, + ::math::sin(rot) * norm.x + ::math::cos(rot) * norm.y, + norm.z); + return norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); +} + + +// ---------------------------------------------------------------------------------------------------------------------- + + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +// ********** Randomization functions -I- ********** + +int random(int seed = 0, int modulus = 65536, int multiplier = 1664525, int increment = 1013904223) +{ + return (multiplier * seed + increment) % modulus; +} + + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + ::anno::hidden() +]] +{ + return + n.x* float3(::state::texture_tangent_u(0).x,::state::texture_tangent_v(0).x,::state::normal().x)+ + n.y* float3(::state::texture_tangent_u(0).y,::state::texture_tangent_v(0).y,::state::normal().y)+ + n.z* float3(::state::texture_tangent_u(0).z,::state::texture_tangent_v(0).z,::state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + ::anno::hidden() +]] +{ + return ::state::texture_tangent_u(0) * n.x + + ::state::texture_tangent_v(0) * n.y + + ::state::normal() * n.z ; +} + + + +// Returns a normal by adding a detail normal to a global normal. +// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded +// correctly with ::tex::gamma_linear +float3 add_detail_normal(float3 nd = ::state::normal(), float3 n = ::state::normal()) +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + + n = n_t*::math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + + +// For the rotated tangent I just used the code for the rotation of the tangent vector +// asselmbled from the former 'vmat_transform' and 'transform_coordinate_2' functions +float3 rotated_tangent( + float rotation = 0, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float sin = ::math::sin(rotation_rad); + float cos = ::math::cos(rotation_rad); + + ::base::texture_coordinate_info coord = ::base::coordinate_source(::base::texture_coordinate_uvw, uv_space); + + return ::math::normalize(cos * coord.tangent_u - sin * coord.tangent_v); +} + + +// Returns 4 random IDs for a given pattern +float4 rand_tile_id( + vm_coordinates uv, + ::base::texture_return id_offset_map, // map containing the ID in r channel + //and the cell offset in g channel. + int seed = 0 + ) +[[ + ::anno::noinline() +]] +{ + float4 ret_val; + int offset_x, offset_y; + + + float3 id_offset_map_2 = float3(id_offset_map.tint); + float offset_id = id_offset_map_2.y; + int rand_id = int(id_offset_map_2.x * 254.f); // the more logical value of 255 causes sometimes rendering artifacts + // with the random number generator. Setting it to 254 apparently fixes it + + // Offset of overlapping tiles stored in G-channel + // [0 - 0.25[ : ( 0/ 0) Grayscale value: 0.1 + // [0.25 - 0.5 [ : (-1/ 0) Grayscale value: 0.37 + // [0.5 - 0.75[ : (-1/-1) Grayscale value: 0.62 + // [0.75 - 1.0 [ : ( 0/-1) Grayscale value: 0.87 + + offset_x = offset_id < 0.25f ? 0 : (offset_id < .75f) ? 1 : 0; + offset_y = offset_id < 0.5 ? 0 : 1; + + int2 cell_id = int2(int(::math::floor(uv.uv.x) - offset_x), int(::math::floor(uv.uv.y) - offset_y)); + + /* Using Linear congruential generator for pseudorandom numbers which is good enough */ + int rand_val_0 = random(seed); + int rand_val_1 = random(rand_val_0 + rand_id + random(cell_id.x + random(cell_id.y))); + int rand_val_2 = random(rand_val_1); + int rand_val_3 = random(rand_val_2); + int rand_val_4 = random(rand_val_3); + + ret_val = float4(rand_val_1, rand_val_2, rand_val_3, rand_val_4); + + return float4(ret_val/65535.0f); +} + + +// ****************************************************************************************************** +// Variation of the wood material which features another texture thats masks a secondary color +// Also the map includes a mask that prevents random color variations +export material Wood_Tiles_Ash_Multicolor( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(.47725f, .91036f, .97011f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.95402f, 0.84346f, 0.01097f) [[ + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Secondary Color Tint"), + ::anno::in_group("Appearance") + ]], + float age_dirt = 0.4f [[ + ::anno::display_name("Age Dirt"), + ::anno::description("Adds dark dirt spots on top of the surface to create the appearance of a somewhat aged surface."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.1f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Wood Brightness"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.7f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Randomly darkens the tiles of the floor."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.006f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = 1.0f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + + + uniform float tiles_bump_strength = 0.31f [[ + ::anno::display_name("Tiles Bump Strength"), + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.15f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.03f [[ + ::anno::display_name("Coating Roughness"), + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.1f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.45f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::preview_scale(0.25f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]], + +// WOOD Highlights (Not accessible to regular users) + uniform bool preview_wood_highlights = false + [[ + ::anno::display_name("Preview Wood Specular"), + ::anno::description("Enables previewing of the wood specular highlights for tweaking."), + ::anno::in_group("Advanced", "Wood Highlight") + ]], // just previews the highlights of the wood material + float isotropic_roughness = 0.324f // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values.") + [[ + ::anno::display_name("Isotropic Roughness"), + ::anno::description("Sets the roughness of the isotropic component of the wood reflection."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_roughness_range = 0.741f // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + [[ + ::anno::display_name("Isotropic Roughness Range"), + ::anno::description("Sets the degree roughness variation around the isotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_specular_brightness = 0.833f // Sets how strong the isotropic specular highlight appears + [[ + ::anno::display_name("Isotropic Highlight Brightness"), + ::anno::description("Sets the brightness of the isotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float wood_specular_level = 1.f // Adjusts the specular level (PBR Style) + [[ + ::anno::display_name("Wood Specular Level"), + ::anno::description("Adjusts the falloff of the wood highlights."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_attenuation = 0.546f //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + [[ + ::anno::display_name("Anisotropic Attenuation"), + ::anno::description("Breaks up the reflection of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_width = 0.287f //Controls the width of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Width"), + ::anno::description("Adjusts the width of the anisotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_height = 0.917f //Controls the height of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Height"), + ::anno::description("Adjusts the height of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float anisotropic_isotropic_balance = 0.222f // Balances the Anisotropic vs. the isotropic wood highlight" + [[ + ::anno::display_name("Anisotropic - Isotropic Balance"), + ::anno::description("Blends between the contribution of isotropic and anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + +// ------------------ TEXTURES (Not accessible to regular users) ------------------ + // Diffuse + uniform texture_2d tex_srgb_wood_color = texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb) + [[ + ::anno::display_name("Diffuse Wood Texture"), + ::anno::description("The diffuse wood texture used to cover the tiles (srgb)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Anisotropic Roughness AKA "Rough Detail" + uniform texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Anisotropic Variation Texture"), + ::anno::description("Texture to add variation to the anisotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Isotropic Roughness AKA "Rough Grain" + uniform texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Isotropic Variation Texture"), + ::anno::description("Texture to add variation to the isotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Wood detail Normal - Grain & Structure + uniform texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Wood Normal Texture"), + ::anno::description("Tangent Space Normal texture for defining the bumpiness of the wood."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles ID, Offset & Rotation + uniform texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles ID - Offset - Rotation Texture"), + ::anno::description("Texture that holds information about the wood tiles needed to create the wood tiles effect. R - Tiles ID, G - Tiles offset, B - Tiles Rotation (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Edgewear, Gaps(AO), Gaps Roughnesss + uniform texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Edgewear - Gaps - Gap Rough"), + ::anno::description("Texture that holds maps for the edgewear roughness, the tile gaps and the gaps roughness (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Normal (Grout and Bend) + uniform texture_2d tex_lin_tiles_normal = texture_2d("./melbury_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Normal Texture"), + ::anno::description("Texture that holds the normal map for the tiles (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Secondary color (grayscale) mask, randomization mask + uniform texture_2d tex_lin_tiles_R_2nd_col_G_randmask = texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear) + [[ + ::anno::display_name("2nd Color - Random Mask"), + ::anno::description("Texture that holds maps for blending with the secondary color and a color randomization mask that specifies in which area brightness randomization should occur (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Roughness, Dents and Spots + uniform texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Rough - Dents - Spots"), + ::anno::description("Texture that contains maps for the tiles roughness, dents and spots which is a roughness effect applied to the wood coating layer (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles orange Peel + uniform texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Orange Peel"), + ::anno::description("Tangent Space Normal texture for the orange peel which is applied to the coating of the tiles."), + ::anno::in_group("Advanced", "Textures") + ]] + +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Multicolor Master"), + ::anno::description("Master template material. This material should be hidden." + "If you see this material, the integration is not hiding it correctly."), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash_Multicolor.Wood_Tiles_Ash_Multicolor.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::hidden() +]] + = + let { +/* + texture_2d tex_srgb_wood_color = texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb); // Diffuse + texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear); // Anisotropic Roughness AKA "Rough Detail" + texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear); // Isotropic Roughness AKA "Rough Grain" + texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear); // Wood detail Normal - Grain & Structure + texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear); // Tiles ID, Offset & Rotation + texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear); // Edgewear, Gaps(AO), Gaps Roughnesss + texture_2d tex_lin_tiles_normal = texture_2d("./brickbond_norm.png", ::tex::gamma_linear); // Tiles Normal (Grout and Bend) + texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear); // Tiles Roughness, Dents and Spots + texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear); // Tiles orange Peel +*/ +/* + // Wood Highlight tweaks + bool preview_wood_highlights = false; // just previews the highlights of the wood material + float wood_specular_level = 1.f; // Adjusts the specular level (PBR Style) + float isotropic_specular_brightness = 1.0f; // Sets how strong the isotropic specular highlight appears + float aniso_attenuation = 0.5f; //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + float anisotropic_isotropic_balance = 0.467f; // Balances the Anisotropic vs. the isotropic wood highlight" + float isotropic_roughness_range = 0.66f; // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + float isotropic_roughness = 0.34f; // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values."), + + float aniso_bsdf_width = 0.36f; //Controls the width of the anisotropic highlight" + float aniso_bsdf_height = 0.50f; //Controls the height of the anisotropic highlight"), +*/ + float wood_scale_variation = 0.1f; + + // Prepare the UV coordinates for regular texture lookups + vm_coordinates base_uv = vm_coord( + translation:texture_translate, + rotation: texture_rotate, + scaling: texture_scale, + uv_space: uv_space_index + ); + + // Random tile transform + // R: tile_id + // G: tile_offset + // B: tile_rotation + // A: secondary color blend weight + + ::base::texture_return rand_id_offset_lookup = vm_tex_lookup( + tex: tex_lin_tiles_id_offset_rotation, + uv: base_uv, + mono_source: mono_a + ); + + float3 R_2nd_col_G_randmask = ::tex::lookup_float3(tex_lin_tiles_R_2nd_col_G_randmask, base_uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) ; + + + + float4 rand_vals = rand_tile_id( + uv: base_uv, + id_offset_map: rand_id_offset_lookup, + seed: seed + ); + + float2 rand_translation = float2(rand_vals.x, rand_vals.y); + float rand_rotation = texture_rotate + (float3(rand_id_offset_lookup.tint).z + (rand_vals.z - 0.5) * wood_random_rotation) * 360; + float2 rand_scale = float2(wood_scale/(1.0 - wood_scale_variation * 0.5 * rand_vals.x)) * texture_scale; + +// *** TILE UV *** - The randomized UV lookup for the tiles + + + vm_coordinates tile_uv = vm_coord( + translation:rand_translation, + rotation: rand_rotation, + scaling: rand_scale, + uv_space: uv_space_index + ); + + + // Tiling Lookups and compositing + // R: Edgewear + // G: Gaps + // B: Gaps Damage Roughness + float3 egdewear_gaps_gapsrough_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_edgewear_gaps_gapsrough, + uv: base_uv, + mono_source: mono_a + ).tint); + + // R: Coat Base Roughness (Footsteps, Grain, Wipe) + // G: Dents (Dirt/Ao) + // B: Spots (Liquid-alike) + float3 rough_dents_spots_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_rough_dents_spots, + uv: base_uv, + mono_source: mono_a + ).tint); + + float dirt_and_spots_amount_remap = dirt_and_spots_amount * 0.5; + + float coat_roughness = egdewear_gaps_gapsrough_lookup.x * edgewear_roughness_amount + // edgewear + egdewear_gaps_gapsrough_lookup.z * dirt_and_spots_amount_remap + // Gaps Damage + histogram_range(rough_dents_spots_lookup.x, base_roughness_range, tiles_base_roughness) + // base roughness + rough_dents_spots_lookup.z * dirt_and_spots_amount + // Spots (rough) + (1.0 - rough_dents_spots_lookup.y) * dirt_and_spots_amount; // Dents + + float coat_roughness_squared = coat_roughness*coat_roughness; // roughness squared + + bsdf coating_bsdf = ::df::microfacet_ggx_smith_bsdf( + roughness_u: coat_roughness_squared, + roughness_v: coat_roughness_squared, + tint: color(1.0f), + mode: ::df::scatter_reflect + ); + +// ******** NORMALS ******** + + // Tiles normal + + + float3 tiles_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_normal, + strength: tiles_bump_strength, + uv: base_uv + ); + + float3 wood_detail_normal = vm_tex_normal_lookup( + tex: tex_lin_wood_detail_norm, + strength: wood_bump_strength, + uv: tile_uv + ); + + float3 orange_peel_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_orange_peel, + strength: tiles_orange_peel_bump_factor * 0.1f, + uv: base_uv + ); + + // Randomized Tiles normals - This needs to be probably rotated with the normal of the uv-tiles + float slope_amount = 0.07 * tiles_random_slope_orientation; + float3 slope = ::math::normalize( + ::state::texture_tangent_u(uv_space_index) * (rand_vals.y - 0.5) * slope_amount + + ::state::texture_tangent_v(uv_space_index) * (rand_vals.z - 0.5) * slope_amount + + ::state::normal() * ((1.0f - slope_amount) + 1.0f) + ); + + float3 tiles_slope_normal = add_detail_normal( + n: slope, + nd: tiles_normal + ); + + float3 tiles_slope_detail_normal = add_detail_normal( + n: tiles_slope_normal, + nd: wood_detail_normal + ); + + float3 normal_final = add_detail_normal( + n: tiles_slope_detail_normal, + nd: orange_peel_normal + ); + +// ******** Anisotropic Highlight ******** + // Lookup for anisotropic brightness variation + vm_coordinates aniso_brightnessvar_lookup_uv = vm_coord_post_scale( + uv: base_uv, + scale: texture_scale * 0.6 + ); + + ::base::texture_return aniso_brightnessvar_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: aniso_brightnessvar_lookup_uv, + mono_source: mono_average + ); + + float aniso_brightnessvar = histogram_scan_big( + input: aniso_brightnessvar_lookup.mono, + width: 0.911, + position: aniso_attenuation + ); + + ::base::texture_return aniso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: tile_uv, + mono_source: mono_average + ); + + float aniso_detail_u = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_width); + float aniso_detail_v = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_height); + + bsdf wood_highlight_aniso = ::df::weighted_layer( + layer: ::df::microfacet_ggx_smith_bsdf( + roughness_u: aniso_detail_u * aniso_detail_u, + roughness_v: aniso_detail_v * aniso_detail_v, + tint: color(aniso_brightnessvar), + tangent_u: rotated_tangent(texture_rotate, uv_space_index), + mode: ::df::scatter_reflect + ), + weight: 1.0f, + normal: tiles_slope_normal + ); + +// ******** Isotropic Highlight ******** + ::base::texture_return iso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_grain, + uv: tile_uv, + mono_source: mono_average + ); + + float iso_mod = histogram_range( + input: iso_mod_lookup.mono, + range: isotropic_roughness_range, + position: isotropic_roughness + ); + + float iso_mod_squared = iso_mod * iso_mod; + + bsdf wood_highlight_isotropic = ::df::microfacet_ggx_smith_bsdf( + roughness_u: iso_mod_squared, + roughness_v: iso_mod_squared, + tint: color(isotropic_specular_brightness), + mode: ::df::scatter_reflect + ); + +// ******** Comping Anisotropic and Isotropic Highlight ******** + + bsdf wood_highlight_isotropic_bumped = ::df::weighted_layer( + layer: wood_highlight_isotropic, + base: wood_highlight_aniso, + weight: anisotropic_isotropic_balance, + normal: tiles_slope_detail_normal + ); + + +// ******** Diffuse Comping ******** + + // Linear interpolation magic to keep brightness appear the same across different values for + // 'floor_brightness' and 'wood_brightness_variation' + + float floor_brightness_fix = ::math::lerp( + ::math::lerp(0.0f, 0.3f, floor_brightness), + ::math::lerp(0.42f, 1.0f, floor_brightness), + wood_brightness_variation); + + float floor_brightness_remap = floor_brightness_fix * 0.7f + 0.3f; // remapping from 0.3 to 0.7 + + + float4 diffuse_attenuation = float4(::math::lerp( + a: gaps_brightness, + b: floor_brightness_remap, + l: egdewear_gaps_gapsrough_lookup.y)); + + + ::base::texture_return diffuse_lookup = vm_tex_lookup( + tex: tex_srgb_wood_color, + uv: tile_uv, + mono_source: mono_a, + scale: diffuse_attenuation + ); + + // Randomly varies brightness from 0.73 - 1.0 which is a simplification from the two nested lerp calls used in a previous version + float rand_tile_brightness = 1.0f - 0.27 * wood_brightness_variation + 0.27 * wood_brightness_variation * rand_vals.z * R_2nd_col_G_randmask.y; + // float rand_tile_brightness = R_2nd_col_G_randmask.x; + + // adding the darkening of the dents texture channel + float rand_tile_brightness_dents = rand_tile_brightness * ::math::lerp(1.0f, rough_dents_spots_lookup.y, age_dirt); + + + ::base::texture_return tiles_rand_brightness = ::nvidia::core_definitions::blend_colors( + color_1: diffuse_lookup.tint, + color_2: color(::math::pow( a: rand_tile_brightness_dents, b: 2.2)), // do gamma compensation + mode: ::base::color_layer_multiply, + weight: 1.0f + ); + + // blend wood color and wood secondary color based on maps + ::base::texture_return wood_2_colored = ::nvidia::core_definitions::blend_colors( + color_1: wood_color, + color_2: wood_secondary_color, + mode: ::base::color_layer_blend, + weight: R_2nd_col_G_randmask.x + ); + + ::base::texture_return tiles_rand_brightness_tint = ::nvidia::core_definitions::blend_colors( + color_1: tiles_rand_brightness.tint, + color_2: wood_2_colored.tint, + mode: ::base::color_layer_overlay, + weight: .95f + ); + + bsdf diffuse = ::df::weighted_layer( + layer: ::df::diffuse_reflection_bsdf( + tint: tiles_rand_brightness_tint.tint + ), + normal: tiles_slope_detail_normal, + weight: 1.0 + ); + +// Diffuse + Highlights BSDF + + bsdf diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped, + base: diffuse + ); + +// DEBUG + bsdf debug_diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped + ); + +// Coating Layer + // separate controls for the reflectivity of the gaps and the general reflectivity of the coat + // Note that "gaps_brightness" also controls the diffuse texture (saving an additional parameter here) + float coating_weight = ::math::lerp( + a: gaps_brightness, + b: coating_reflectivity, + l: egdewear_gaps_gapsrough_lookup.y + ); + + // apply the coating layer + bsdf coated_wood_tiles_bsdf = ::df::custom_curve_layer( + normal_reflectivity: 0.03, //may as well be made adjustable (0.08 * specular_level) + grazing_reflectivity: 1.0f, + layer: coating_bsdf, + weight: coating_weight, + base: diffuse_and_highlights_bsdf, + normal: normal_final + ); + + +// ******** Round Corners ******** + float3 round_normal = round_corners ? + ::state::rounded_corner_normal( + radius: roundcorner_radius_mm * 0.001, // is in mm + across_materials: across_materials + ) : ::state::normal(); + +} in material( + surface: material_surface( + scattering: preview_wood_highlights ? debug_diffuse_and_highlights_bsdf : coated_wood_tiles_bsdf + ), + geometry: material_geometry( + normal: round_normal + ) +); + + +// ****************************************************************************************************** +// 01 + +export material Wood_Tiles_Ash_Melbury( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(.47725f, .91036f, .97011f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.95402f, 0.84346f, 0.01097f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.1f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.7f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = float2(.55f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.04f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.0f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.0f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(.5f, .5f)), + ::preview_scale(0.25f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Multicolor Melbury"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "melbury", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash_Multicolor.Wood_Tiles_Ash_Melbury.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Ash_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.006f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./melbury_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 02 + +export material Wood_Tiles_Ash_Large_Star( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(.47725f, .91036f, .97011f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.95402f, 0.84346f, 0.01097f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 1.0f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.5f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 1.0f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = float2(.5f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 1.0f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.2f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.6f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.4f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(.3333f, 0.3333f)), + ::preview_scale(0.25f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Multicolor Large Star"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash_Multicolor.Wood_Tiles_Ash_Large_Star.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Ash_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.005f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./star_large_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./star_large_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./star_large_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./star_large_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 03 + +export material Wood_Tiles_Ash_Stars( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(.47725f, .91036f, .97011f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.95402f, 0.84346f, 0.01097f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 1.0f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.1f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 1.0f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = float2(.4f) [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 1.0f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.2f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.6f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.4f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::preview_scale(0.25f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Ash - Multicolor Stars"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "master", "ash", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "stars", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Ash_Multicolor.Wood_Tiles_Ash_Stars.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Ash_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.0f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.324f, + isotropic_roughness_range: 0.741f, + isotropic_specular_brightness: 0.833f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.546f, + aniso_bsdf_width: 0.287f, + aniso_bsdf_height: 0.917f, + anisotropic_isotropic_balance: 0.222f, + + tex_srgb_wood_color: texture_2d("./wood_ash_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_ash_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_ash_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_ash_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./stars_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./stars_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./stars_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./stars_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); diff --git a/Assets/Material/material_0567/Wood_Tiles_Oak_Mountain_Multicolor.mdl b/Assets/Material/material_0567/Wood_Tiles_Oak_Mountain_Multicolor.mdl new file mode 100644 index 0000000000000000000000000000000000000000..f8716013cd8f4477cec8da905896fbc8383cdb4e --- /dev/null +++ b/Assets/Material/material_0567/Wood_Tiles_Oak_Mountain_Multicolor.mdl @@ -0,0 +1,1591 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A wooden tile material with adjustments to produce a rich variety of wooden floor styles ranging from new to worn."; + +annotation preview_scale( float f); + +struct vm_coordinates{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color."), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + // Translation before or after rotation? + return uv; +} + +vm_coordinates vm_coord_post_scale( + vm_coordinates uv = vm_coord(), + float2 scale = 1.0f +) +{ + uv.uv /= scale; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f)) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +float3 vm_tex_normal_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + float strength = 1.0f +) +{ + float rot = uv.rotation; + // Lookup and convert normal texture to -1 ... 1 range + float3 norm = (::tex::lookup_float3(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(strength, strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(rot) * norm.x - ::math::sin(rot) * norm.y, + ::math::sin(rot) * norm.x + ::math::cos(rot) * norm.y, + norm.z); + return norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); +} + + +// ---------------------------------------------------------------------------------------------------------------------- + + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +// ********** Randomization functions -I- ********** + +int random(int seed = 0, int modulus = 65536, int multiplier = 1664525, int increment = 1013904223) +{ + return (multiplier * seed + increment) % modulus; +} + + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + ::anno::hidden() +]] +{ + return + n.x* float3(::state::texture_tangent_u(0).x,::state::texture_tangent_v(0).x,::state::normal().x)+ + n.y* float3(::state::texture_tangent_u(0).y,::state::texture_tangent_v(0).y,::state::normal().y)+ + n.z* float3(::state::texture_tangent_u(0).z,::state::texture_tangent_v(0).z,::state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + ::anno::hidden() +]] +{ + return ::state::texture_tangent_u(0) * n.x + + ::state::texture_tangent_v(0) * n.y + + ::state::normal() * n.z ; +} + + + +// Returns a normal by adding a detail normal to a global normal. +// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded +// correctly with ::tex::gamma_linear +float3 add_detail_normal(float3 nd = ::state::normal(), float3 n = ::state::normal()) +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + + n = n_t*::math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + + +// For the rotated tangent I just used the code for the rotation of the tangent vector +// asselmbled from the former 'vmat_transform' and 'transform_coordinate_2' functions +float3 rotated_tangent( + float rotation = 0, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float sin = ::math::sin(rotation_rad); + float cos = ::math::cos(rotation_rad); + + ::base::texture_coordinate_info coord = ::base::coordinate_source(::base::texture_coordinate_uvw, uv_space); + + return ::math::normalize(cos * coord.tangent_u - sin * coord.tangent_v); +} + + +// Returns 4 random IDs for a given pattern +float4 rand_tile_id( + vm_coordinates uv, + ::base::texture_return id_offset_map, // map containing the ID in r channel + //and the cell offset in g channel. + int seed = 0 + ) +[[ + ::anno::noinline() +]] +{ + float4 ret_val; + int offset_x, offset_y; + + + float3 id_offset_map_2 = float3(id_offset_map.tint); + float offset_id = id_offset_map_2.y; + int rand_id = int(id_offset_map_2.x * 254.f); // the more logical value of 255 causes sometimes rendering artifacts + // with the random number generator. Setting it to 254 apparently fixes it + + // Offset of overlapping tiles stored in G-channel + // [0 - 0.25[ : ( 0/ 0) Grayscale value: 0.1 + // [0.25 - 0.5 [ : (-1/ 0) Grayscale value: 0.37 + // [0.5 - 0.75[ : (-1/-1) Grayscale value: 0.62 + // [0.75 - 1.0 [ : ( 0/-1) Grayscale value: 0.87 + + offset_x = offset_id < 0.25f ? 0 : (offset_id < .75f) ? 1 : 0; + offset_y = offset_id < 0.5 ? 0 : 1; + + int2 cell_id = int2(int(::math::floor(uv.uv.x) - offset_x), int(::math::floor(uv.uv.y) - offset_y)); + + /* Using Linear congruential generator for pseudorandom numbers which is good enough */ + int rand_val_0 = random(seed); + int rand_val_1 = random(rand_val_0 + rand_id + random(cell_id.x + random(cell_id.y))); + int rand_val_2 = random(rand_val_1); + int rand_val_3 = random(rand_val_2); + int rand_val_4 = random(rand_val_3); + + ret_val = float4(rand_val_1, rand_val_2, rand_val_3, rand_val_4); + + return float4(ret_val/65535.0f); +} + + +// ****************************************************************************************************** +// Variation of the wood material which features another texture thats masks a secondary color +// Also the map includes a mask that prevents random color variations +export material Wood_Tiles_Oak_Mountain_Multicolor( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.81449f,0.82989f, 0.39873f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.90805f, 0.85376f, 0.0334f) [[ + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Secondary Color Tint"), + ::anno::in_group("Appearance") + ]], + float age_dirt = 0.4f [[ + ::anno::display_name("Age Dirt"), + ::anno::description("Adds dark dirt spots on top of the surface to create the appearance of a somewhat aged surface."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float wood_bump_strength = 0.05f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.8f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Wood Brightness"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.5f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Randomly darkens the tiles of the floor."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = 1.0f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + + + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.15f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.14f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.1f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]], + +// WOOD Highlights (Not accessible to regular users) + uniform bool preview_wood_highlights = false + [[ + ::anno::display_name("Preview Wood Specular"), + ::anno::description("Enables previewing of the wood specular highlights for tweaking."), + ::anno::in_group("Advanced", "Wood Highlight") + ]], // just previews the highlights of the wood material + float isotropic_roughness = 0.377f // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values.") + [[ + ::anno::display_name("Isotropic Roughness"), + ::anno::description("Sets the roughness of the isotropic component of the wood reflection."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_roughness_range = 0.689f // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + [[ + ::anno::display_name("Isotropic Roughness Range"), + ::anno::description("Sets the degree roughness variation around the isotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_specular_brightness = 1.0f // Sets how strong the isotropic specular highlight appears + [[ + ::anno::display_name("Isotropic Highlight Brightness"), + ::anno::description("Sets the brightness of the isotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float wood_specular_level = 1.f // Adjusts the specular level (PBR Style) + [[ + ::anno::display_name("Wood Specular Level"), + ::anno::description("Adjusts the falloff of the wood highlights."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_attenuation = 0.393f //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + [[ + ::anno::display_name("Anisotropic Attenuation"), + ::anno::description("Breaks up the reflection of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_width = 0.459f //Controls the width of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Width"), + ::anno::description("Adjusts the width of the anisotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_height = 0.680f //Controls the height of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Height"), + ::anno::description("Adjusts the height of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float anisotropic_isotropic_balance = 0.607f // Balances the Anisotropic vs. the isotropic wood highlight" + [[ + ::anno::display_name("Anisotropic - Isotropic Balance"), + ::anno::description("Blends between the contribution of isotropic and anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + +// ------------------ TEXTURES (Not accessible to regular users) ------------------ + // Diffuse + uniform texture_2d tex_srgb_wood_color = texture_2d("./wood_oak_mountain_diff.jpg", ::tex::gamma_srgb) + [[ + ::anno::display_name("Diffuse Wood Texture"), + ::anno::description("The diffuse wood texture used to cover the tiles (srgb)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Anisotropic Roughness AKA "Rough Detail" + uniform texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_oak_mountain_rough_detail.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Anisotropic Variation Texture"), + ::anno::description("Texture to add variation to the anisotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Isotropic Roughness AKA "Rough Grain" + uniform texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_oak_mountain_rough_grain.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Isotropic Variation Texture"), + ::anno::description("Texture to add variation to the isotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Wood detail Normal - Grain & Structure + uniform texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_oak_mountain_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Wood Normal Texture"), + ::anno::description("Tangent Space Normal texture for defining the bumpiness of the wood."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles ID, Offset & Rotation + uniform texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles ID - Offset - Rotation Texture"), + ::anno::description("Texture that holds information about the wood tiles needed to create the wood tiles effect. R - Tiles ID, G - Tiles offset, B - Tiles Rotation (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Edgewear, Gaps(AO), Gaps Roughnesss + uniform texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Edgewear - Gaps - Gap Rough"), + ::anno::description("Texture that holds maps for the edgewear roughness, the tile gaps and the gaps roughness (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Normal (Grout and Bend) + uniform texture_2d tex_lin_tiles_normal = texture_2d("./melbury_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Normal Texture"), + ::anno::description("Texture that holds the normal map for the tiles (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Secondary color (grayscale) mask, randomization mask + uniform texture_2d tex_lin_tiles_R_2nd_col_G_randmask = texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear) + [[ + ::anno::display_name("2nd Color - Random Mask"), + ::anno::description("Texture that holds maps for blending with the secondary color and a color randomization mask that specifies in which area brightness randomization should occur (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Roughness, Dents and Spots + uniform texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Rough - Dents - Spots"), + ::anno::description("Texture that contains maps for the tiles roughness, dents and spots which is a roughness effect applied to the wood coating layer (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles orange Peel + uniform texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Orange Peel"), + ::anno::description("Tangent Space Normal texture for the orange peel which is applied to the coating of the tiles."), + ::anno::in_group("Advanced", "Textures") + ]] + +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Oak Mountain - Multicolor Master"), + ::anno::description("Master template material. This material should be hidden." + "If you see this material, the integration is not hiding it correctly."), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "oak", "master", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Oak_Mountain_Multicolor.Wood_Tiles_Oak_Mountain_Multicolor.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::hidden() +]] + = + let { +/* + texture_2d tex_srgb_wood_color = texture_2d("./wood_oak_mountain_diff.jpg", ::tex::gamma_srgb); // Diffuse + texture_2d tex_lin_wood_rough_detail = texture_2d("./wood_oak_mountain_rough_detail.jpg", ::tex::gamma_linear); // Anisotropic Roughness AKA "Rough Detail" + texture_2d tex_lin_wood_rough_grain = texture_2d("./wood_oak_mountain_rough_grain.jpg", ::tex::gamma_linear); // Isotropic Roughness AKA "Rough Grain" + texture_2d tex_lin_wood_detail_norm = texture_2d("./wood_oak_mountain_norm.jpg", ::tex::gamma_linear); // Wood detail Normal - Grain & Structure + texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear); // Tiles ID, Offset & Rotation + texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear); // Edgewear, Gaps(AO), Gaps Roughnesss + texture_2d tex_lin_tiles_normal = texture_2d("./brickbond_norm.png", ::tex::gamma_linear); // Tiles Normal (Grout and Bend) + texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear); // Tiles Roughness, Dents and Spots + texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear); // Tiles orange Peel +*/ +/* + // Wood Highlight tweaks + bool preview_wood_highlights = false; // just previews the highlights of the wood material + float wood_specular_level = 1.f; // Adjusts the specular level (PBR Style) + float isotropic_specular_brightness = 1.0f; // Sets how strong the isotropic specular highlight appears + float aniso_attenuation = 0.5f; //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + float anisotropic_isotropic_balance = 0.467f; // Balances the Anisotropic vs. the isotropic wood highlight" + float isotropic_roughness_range = 0.66f; // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + float isotropic_roughness = 0.34f; // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values."), + + float aniso_bsdf_width = 0.36f; //Controls the width of the anisotropic highlight" + float aniso_bsdf_height = 0.50f; //Controls the height of the anisotropic highlight"), +*/ + float wood_scale_variation = 0.1f; + + // Prepare the UV coordinates for regular texture lookups + vm_coordinates base_uv = vm_coord( + translation:texture_translate, + rotation: texture_rotate, + scaling: texture_scale, + uv_space: uv_space_index + ); + + // Random tile transform + // R: tile_id + // G: tile_offset + // B: tile_rotation + // A: secondary color blend weight + + ::base::texture_return rand_id_offset_lookup = vm_tex_lookup( + tex: tex_lin_tiles_id_offset_rotation, + uv: base_uv, + mono_source: mono_a + ); + + float3 R_2nd_col_G_randmask = ::tex::lookup_float3(tex_lin_tiles_R_2nd_col_G_randmask, base_uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) ; + + + + float4 rand_vals = rand_tile_id( + uv: base_uv, + id_offset_map: rand_id_offset_lookup, + seed: seed + ); + + float2 rand_translation = float2(rand_vals.x, rand_vals.y); + float rand_rotation = texture_rotate + (float3(rand_id_offset_lookup.tint).z + (rand_vals.z - 0.5) * wood_random_rotation) * 360; + float2 rand_scale = float2(wood_scale/(1.0 - wood_scale_variation * 0.5 * rand_vals.x)) * texture_scale; + +// *** TILE UV *** - The randomized UV lookup for the tiles + + + vm_coordinates tile_uv = vm_coord( + translation:rand_translation, + rotation: rand_rotation, + scaling: rand_scale, + uv_space: uv_space_index + ); + + + // Tiling Lookups and compositing + // R: Edgewear + // G: Gaps + // B: Gaps Damage Roughness + float3 egdewear_gaps_gapsrough_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_edgewear_gaps_gapsrough, + uv: base_uv, + mono_source: mono_a + ).tint); + + // R: Coat Base Roughness (Footsteps, Grain, Wipe) + // G: Dents (Dirt/Ao) + // B: Spots (Liquid-alike) + float3 rough_dents_spots_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_rough_dents_spots, + uv: base_uv, + mono_source: mono_a + ).tint); + + float dirt_and_spots_amount_remap = dirt_and_spots_amount * 0.5; + + float coat_roughness = egdewear_gaps_gapsrough_lookup.x * edgewear_roughness_amount + // edgewear + egdewear_gaps_gapsrough_lookup.z * dirt_and_spots_amount_remap + // Gaps Damage + histogram_range(rough_dents_spots_lookup.x, base_roughness_range, tiles_base_roughness) + // base roughness + rough_dents_spots_lookup.z * dirt_and_spots_amount + // Spots (rough) + (1.0 - rough_dents_spots_lookup.y) * dirt_and_spots_amount; // Dents + + float coat_roughness_squared = coat_roughness*coat_roughness; // roughness squared + + bsdf coating_bsdf = ::df::microfacet_ggx_smith_bsdf( + roughness_u: coat_roughness_squared, + roughness_v: coat_roughness_squared, + tint: color(1.0f), + mode: ::df::scatter_reflect + ); + +// ******** NORMALS ******** + + // Tiles normal + + + float3 tiles_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_normal, + strength: tiles_bump_strength, + uv: base_uv + ); + + float3 wood_detail_normal = vm_tex_normal_lookup( + tex: tex_lin_wood_detail_norm, + strength: wood_bump_strength, + uv: tile_uv + ); + + float3 orange_peel_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_orange_peel, + strength: tiles_orange_peel_bump_factor * 0.1f, + uv: base_uv + ); + + // Randomized Tiles normals - This needs to be probably rotated with the normal of the uv-tiles + float slope_amount = 0.07 * tiles_random_slope_orientation; + float3 slope = ::math::normalize( + ::state::texture_tangent_u(uv_space_index) * (rand_vals.y - 0.5) * slope_amount + + ::state::texture_tangent_v(uv_space_index) * (rand_vals.z - 0.5) * slope_amount + + ::state::normal() * ((1.0f - slope_amount) + 1.0f) + ); + + float3 tiles_slope_normal = add_detail_normal( + n: slope, + nd: tiles_normal + ); + + float3 tiles_slope_detail_normal = add_detail_normal( + n: tiles_slope_normal, + nd: wood_detail_normal + ); + + float3 normal_final = add_detail_normal( + n: tiles_slope_detail_normal, + nd: orange_peel_normal + ); + +// ******** Anisotropic Highlight ******** + // Lookup for anisotropic brightness variation + vm_coordinates aniso_brightnessvar_lookup_uv = vm_coord_post_scale( + uv: base_uv, + scale: texture_scale * 0.6 + ); + + ::base::texture_return aniso_brightnessvar_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: aniso_brightnessvar_lookup_uv, + mono_source: mono_average + ); + + float aniso_brightnessvar = histogram_scan_big( + input: aniso_brightnessvar_lookup.mono, + width: 0.911, + position: aniso_attenuation + ); + + ::base::texture_return aniso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: tile_uv, + mono_source: mono_average + ); + + float aniso_detail_u = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_width); + float aniso_detail_v = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_height); + + bsdf wood_highlight_aniso = ::df::weighted_layer( + layer: ::df::microfacet_ggx_smith_bsdf( + roughness_u: aniso_detail_u * aniso_detail_u, + roughness_v: aniso_detail_v * aniso_detail_v, + tint: color(aniso_brightnessvar), + tangent_u: rotated_tangent(texture_rotate, uv_space_index), + mode: ::df::scatter_reflect + ), + weight: 1.0f, + normal: tiles_slope_normal + ); + +// ******** Isotropic Highlight ******** + ::base::texture_return iso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_grain, + uv: tile_uv, + mono_source: mono_average + ); + + float iso_mod = histogram_range( + input: iso_mod_lookup.mono, + range: isotropic_roughness_range, + position: isotropic_roughness + ); + + float iso_mod_squared = iso_mod * iso_mod; + + bsdf wood_highlight_isotropic = ::df::microfacet_ggx_smith_bsdf( + roughness_u: iso_mod_squared, + roughness_v: iso_mod_squared, + tint: color(isotropic_specular_brightness), + mode: ::df::scatter_reflect + ); + +// ******** Comping Anisotropic and Isotropic Highlight ******** + + bsdf wood_highlight_isotropic_bumped = ::df::weighted_layer( + layer: wood_highlight_isotropic, + base: wood_highlight_aniso, + weight: anisotropic_isotropic_balance, + normal: tiles_slope_detail_normal + ); + + +// ******** Diffuse Comping ******** + + // Linear interpolation magic to keep brightness appear the same across different values for + // 'floor_brightness' and 'wood_brightness_variation' + + float floor_brightness_fix = ::math::lerp( + ::math::lerp(0.0f, 0.3f, floor_brightness), + ::math::lerp(0.42f, 1.0f, floor_brightness), + wood_brightness_variation); + + float floor_brightness_remap = floor_brightness_fix * 0.7f + 0.3f; // remapping from 0.3 to 0.7 + + + float4 diffuse_attenuation = float4(::math::lerp( + a: gaps_brightness, + b: floor_brightness_remap, + l: egdewear_gaps_gapsrough_lookup.y)); + + + ::base::texture_return diffuse_lookup = vm_tex_lookup( + tex: tex_srgb_wood_color, + uv: tile_uv, + mono_source: mono_a, + scale: diffuse_attenuation + ); + + // Randomly varies brightness from 0.73 - 1.0 which is a simplification from the two nested lerp calls used in a previous version + float rand_tile_brightness = 1.0f - 0.27 * wood_brightness_variation + 0.27 * wood_brightness_variation * rand_vals.z * R_2nd_col_G_randmask.y; + // float rand_tile_brightness = R_2nd_col_G_randmask.x; + + // adding the darkening of the dents texture channel + float rand_tile_brightness_dents = rand_tile_brightness * ::math::lerp(1.0f, rough_dents_spots_lookup.y, age_dirt); + + + ::base::texture_return tiles_rand_brightness = ::nvidia::core_definitions::blend_colors( + color_1: diffuse_lookup.tint, + color_2: color(::math::pow( a: rand_tile_brightness_dents, b: 2.2)), // do gamma compensation + mode: ::base::color_layer_multiply, + weight: 1.0f + ); + + // blend wood color and wood secondary color based on maps + ::base::texture_return wood_2_colored = ::nvidia::core_definitions::blend_colors( + color_1: wood_color, + color_2: wood_secondary_color, + mode: ::base::color_layer_blend, + weight: R_2nd_col_G_randmask.x + ); + + ::base::texture_return tiles_rand_brightness_tint = ::nvidia::core_definitions::blend_colors( + color_1: tiles_rand_brightness.tint, + color_2: wood_2_colored.tint, + mode: ::base::color_layer_overlay, + weight: .95f + ); + + bsdf diffuse = ::df::weighted_layer( + layer: ::df::diffuse_reflection_bsdf( + tint: tiles_rand_brightness_tint.tint + ), + normal: tiles_slope_detail_normal, + weight: 1.0 + ); + +// Diffuse + Highlights BSDF + + bsdf diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped, + base: diffuse + ); + +// DEBUG + bsdf debug_diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped + ); + +// Coating Layer + // separate controls for the reflectivity of the gaps and the general reflectivity of the coat + // Note that "gaps_brightness" also controls the diffuse texture (saving an additional parameter here) + float coating_weight = ::math::lerp( + a: gaps_brightness, + b: coating_reflectivity, + l: egdewear_gaps_gapsrough_lookup.y + ); + + // apply the coating layer + bsdf coated_wood_tiles_bsdf = ::df::custom_curve_layer( + normal_reflectivity: 0.03, //may as well be made adjustable (0.08 * specular_level) + grazing_reflectivity: 1.0f, + layer: coating_bsdf, + weight: coating_weight, + base: diffuse_and_highlights_bsdf, + normal: normal_final + ); + + +// ******** Round Corners ******** + float3 round_normal = round_corners ? + ::state::rounded_corner_normal( + radius: roundcorner_radius_mm * 0.001, // is in mm + across_materials: across_materials + ) : ::state::normal(); + +} in material( + surface: material_surface( + scattering: preview_wood_highlights ? debug_diffuse_and_highlights_bsdf : coated_wood_tiles_bsdf + ), + geometry: material_geometry( + normal: round_normal + ) +); + + +// ****************************************************************************************************** +// 01 + +export material Wood_Tiles_Oak_Mountain_Melbury( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.81449f,0.82989f, 0.39873f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.90805f, 0.85376f, 0.0334f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.1f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.8f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.5f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 2.0f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.f, 2.f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.14f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(.5f, .5f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Oak Mountain - Multicolor Melbury"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "oak", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "melbury", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Oak_Mountain_Multicolor.Wood_Tiles_Oak_Mountain_Melbury.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Oak_Mountain_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.006f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.377f, + isotropic_roughness_range: 0.689f, + isotropic_specular_brightness: 1.0f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.393f, + aniso_bsdf_width: 0.459f, + aniso_bsdf_height: 0.680f, + anisotropic_isotropic_balance: 0.607f, + + tex_srgb_wood_color: texture_2d("./wood_oak_mountain_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_oak_mountain_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_oak_mountain_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_oak_mountain_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./melbury_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 02 + +export material Wood_Tiles_Oak_Mountain_Large_Star( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.81449f,0.82989f, 0.39873f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.90805f, 0.85376f, 0.0334f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 1.0f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.8f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = .4f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 2.0f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.14f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(0.3333f, 0.3333f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Oak Mountain - Multicolor Large Star"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "oak", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Oak_Mountain_Multicolor.Wood_Tiles_Oak_Mountain_Large_Star.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Oak_Mountain_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.005f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.377f, + isotropic_roughness_range: 0.689f, + isotropic_specular_brightness: 1.0f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.393f, + aniso_bsdf_width: 0.459f, + aniso_bsdf_height: 0.680f, + anisotropic_isotropic_balance: 0.607f, + + tex_srgb_wood_color: texture_2d("./wood_oak_mountain_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_oak_mountain_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_oak_mountain_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_oak_mountain_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./star_large_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./star_large_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./star_large_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./star_large_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 03 + +export material Wood_Tiles_Oak_Mountain_Stars( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.81449f,0.82989f, 0.39873f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.90805f, 0.85376f, 0.0334f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 1.0f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.8f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = .35f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 1.5f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.14f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(0.5f, 0.5f)), + ::preview_scale(0.33f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Oak Mountain - Multicolor Stars"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "oak", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "stars", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Oak_Mountain_Multicolor.Wood_Tiles_Oak_Mountain_Stars.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Oak_Mountain_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.00f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.377f, + isotropic_roughness_range: 0.689f, + isotropic_specular_brightness: 1.0f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.393f, + aniso_bsdf_width: 0.459f, + aniso_bsdf_height: 0.680f, + anisotropic_isotropic_balance: 0.607f, + + tex_srgb_wood_color: texture_2d("./wood_oak_mountain_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./wood_oak_mountain_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./wood_oak_mountain_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./wood_oak_mountain_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./stars_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./stars_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./stars_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./stars_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); diff --git a/Assets/Material/material_0571/Wood_Tiles_Poplar_Multicolor.mdl b/Assets/Material/material_0571/Wood_Tiles_Poplar_Multicolor.mdl new file mode 100644 index 0000000000000000000000000000000000000000..221d7734f81af9c6246a32410bda5b8c4b9d6c68 --- /dev/null +++ b/Assets/Material/material_0571/Wood_Tiles_Poplar_Multicolor.mdl @@ -0,0 +1,1590 @@ +/****************************************************************************** + * Copyright 2024 NVIDIA Corporation. All rights reserved. + ****************************************************************************** + +Permission is hereby granted by NVIDIA Corporation ("NVIDIA"), free of charge, +to any person obtaining a copy of the sample definition code that uses our +Material Definition Language (the "MDL Materials"), to reproduce and distribute +the MDL Materials, including without limitation the rights to use, copy, merge, +publish, distribute, and sell modified and unmodified copies of the MDL +Materials, and to permit persons to whom the MDL Materials is furnished to do +so, in all cases solely for use with NVIDIA's Material Definition Language, +subject to the following further conditions: + +1. The above copyright notices, this list of conditions, and the disclaimer +that follows shall be retained in all copies of one or more of the MDL +Materials, including in any software with which the MDL Materials are bundled, +redistributed, and/or sold, and included either as stand-alone text files, +human-readable headers or in the appropriate machine-readable metadata fields +within text or binary files as long as those fields can be easily viewed by the +user, as applicable. +2. The name of NVIDIA shall not be used to promote, endorse or advertise any +Modified Version without specific prior written permission, except a) to comply + with the notice requirements otherwise contained herein; or b) to acknowledge +the contribution(s) of NVIDIA. + +THE MDL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR +ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, +INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE +THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS. +*/ + + +mdl 1.5; + +import ::anno::*; +import ::base::*; +import ::df::*; +import ::math::*; +import ::state::*; +import ::tex::*; +import ::nvidia::core_definitions::blend_colors; +import ::nvidia::core_definitions::dimension; + + +const string COPYRIGHT = +" Copyright 2024 NVIDIA Corporation. All rights reserved.\n" +" MDL MATERIALS ARE PROVIDED PURSUANT TO AN END USER LICENSE AGREEMENT,\n" +" WHICH WAS ACCEPTED IN ORDER TO GAIN ACCESS TO THIS FILE. IN PARTICULAR,\n" +" THE MDL MATERIALS ARE PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n" +" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF\n" +" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF\n" +" COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL NVIDIA\n" +" CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY\n" +" GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN\n" +" AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR\n" +" INABILITY TO USE THE MDL MATERIALS OR FROM OTHER DEALINGS IN THE MDL MATERIALS.\n"; + +const string DESCRIPTION = "A wooden tile material with adjustments to produce a rich variety of wooden floor styles ranging from new to worn."; + +annotation preview_scale( float f); + +struct vm_coordinates{ + float2 uv; + float rotation; + int uv_space_index; + float4 carry; +}; + +enum vm_mono_select +[[ + anno::description("Modes for the creation of a gray-scale value from a color."), + anno::hidden() +]] +{ + mono_r = 0, + mono_g = 1, + mono_b = 2, + mono_a = 3, + mono_average = 4 +}; + +vm_coordinates vm_coord +( + float2 translation = float2(0.0f, 0.0) [[ + ::anno::display_name("Translation"), + ::anno::description("Translates the coordinates.") + ]], + float rotation = 0.0f [[ + ::anno::display_name("Rotation"), + ::anno::description("Rotates the coordinates in degrees.") + ]], + float2 scaling = float2(1.0f, 1.0f) [[ + ::anno::display_name("Scaling"), + ::anno::description("Scales the coordinates.") + ]], + uniform int uv_space = 0 [[ + ::anno::display_name("UV Space"), + ::anno::description("Chose the UV space.") + ]] +) +[[ + ::anno::display_name("vm Transform"), + ::anno::description("Generates coordinates to be used in vm_lookup functions.") +]] +{ + vm_coordinates uv; + ::base::texture_coordinate_info info = ::base::coordinate_source( ::base::texture_coordinate_uvw, uv_space); + uv.rotation = (rotation * 3.1415926535897932384626433832f) / 180.f; + uv.uv = float2(info.position.x, info.position.y); + float sine = ::math::sin(uv.rotation); + float cosine = ::math::cos(uv.rotation); + float2x2 rot = float2x2(cosine, -sine, sine, cosine); + uv.uv = rot * uv.uv; + uv.uv /= scaling; + uv.uv += translation; + // Translation before or after rotation? + return uv; +} + +vm_coordinates vm_coord_post_scale( + vm_coordinates uv = vm_coord(), + float2 scale = 1.0f +) +{ + uv.uv /= scale; + return uv; +} + +::base::texture_return vm_tex_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + uniform vm_mono_select mono_source = mono_a, + float4 scale = float4(1.0f)) +{ + float mono; + float4 lookup = ::tex::lookup_float4(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) * scale; + switch( mono_source ) { + case mono_r: mono = lookup.x; + break; + case mono_g: mono = lookup.y; + break; + case mono_b: mono = lookup.z; + break; + case mono_a: mono = lookup.w; + break; + case mono_average: mono = ::math::average(float3(lookup.x, lookup.y, lookup.z)); + break; + } + return ::base::texture_return(color(lookup.x, lookup.y, lookup.z), mono); +} + +float3 vm_tex_normal_lookup( + uniform texture_2d tex, + vm_coordinates uv = vm_coord(), + float strength = 1.0f +) +{ + float rot = uv.rotation; + // Lookup and convert normal texture to -1 ... 1 range + float3 norm = (::tex::lookup_float3(tex, uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) - float3(.5f)) * 2.0f; + norm = ::math::normalize(norm * float3(strength, strength, 1.0)); + // if any rotation happened prior to the lookup, compensate for it + norm = float3(::math::cos(rot) * norm.x - ::math::sin(rot) * norm.y, + ::math::sin(rot) * norm.x + ::math::cos(rot) * norm.y, + norm.z); + return norm.x * ::state::texture_tangent_u(uv.uv_space_index) + + norm.y * ::state::texture_tangent_v(uv.uv_space_index) + + norm.z * ::state::normal(); +} + + +// ---------------------------------------------------------------------------------------------------------------------- + + +float histogram_range(float input, float range = 1.0f, float position = 0.5f) +{ + float low = ::math::clamp(1.0 - ::math::min(((1.0 - position) + range * 0.5), (1.0 - position) * 2), 0.0, 1.0); + float high = ::math::clamp(::math::min((position + range * 0.5 ), position * 2.0), 0.0, 1.0); + return ::math::lerp(low, high, input); +} + +float remap_xy_to_0_1(float input, float x, float y) +{ + return (input - x)/(y - x); +} + +float histogram_scan_big(float input, float width, float position) +{ + return ::math::clamp( + remap_xy_to_0_1(input, + ::math::lerp(-width, 1.0, position), + ::math::lerp(0.0, 1.0 + width, position)), + 0.0, + 1.0); +} + +// ********** Randomization functions -I- ********** + +int random(int seed = 0, int modulus = 65536, int multiplier = 1664525, int increment = 1013904223) +{ + return (multiplier * seed + increment) % modulus; +} + + +// Returns the normal n in tangent space, given n is in internal space. +float3 transform_internal_to_tangent(float3 n) +[[ + ::anno::hidden() +]] +{ + return + n.x* float3(::state::texture_tangent_u(0).x,::state::texture_tangent_v(0).x,::state::normal().x)+ + n.y* float3(::state::texture_tangent_u(0).y,::state::texture_tangent_v(0).y,::state::normal().y)+ + n.z* float3(::state::texture_tangent_u(0).z,::state::texture_tangent_v(0).z,::state::normal().z); +} + +// Returns the normal n in internal space, given n is in tangent space. +float3 transform_tangent_to_internal(float3 n) +[[ + ::anno::hidden() +]] +{ + return ::state::texture_tangent_u(0) * n.x + + ::state::texture_tangent_v(0) * n.y + + ::state::normal() * n.z ; +} + + + +// Returns a normal by adding a detail normal to a global normal. +// If detail blending of two normal maps gives visual artifacts, check if texture_2d are loaded +// correctly with ::tex::gamma_linear +float3 add_detail_normal(float3 nd = ::state::normal(), float3 n = ::state::normal()) +{ + // http://blog.selfshadow.com/publications/blending-in-detail/ + float3 n_t = transform_internal_to_tangent(n); + float3 nd_t = transform_internal_to_tangent(nd); + + n_t=n_t + float3(0.,0.,1.); + nd_t = nd_t * float3(-1.,-1.,1.); + + n = n_t*::math::dot(n_t, nd_t)/n_t.z - nd_t; + return ::math::normalize(transform_tangent_to_internal(n)); +} + + +// For the rotated tangent I just used the code for the rotation of the tangent vector +// asselmbled from the former 'vmat_transform' and 'transform_coordinate_2' functions +float3 rotated_tangent( + float rotation = 0, + uniform int uv_space = 0 +) +{ + float rotation_rad = (rotation * 3.1415926535897932384626433832f) / 180.f; + float sin = ::math::sin(rotation_rad); + float cos = ::math::cos(rotation_rad); + + ::base::texture_coordinate_info coord = ::base::coordinate_source(::base::texture_coordinate_uvw, uv_space); + + return ::math::normalize(cos * coord.tangent_u - sin * coord.tangent_v); +} + + +// Returns 4 random IDs for a given pattern +float4 rand_tile_id( + vm_coordinates uv, + ::base::texture_return id_offset_map, // map containing the ID in r channel + //and the cell offset in g channel. + int seed = 0 + ) +[[ + ::anno::noinline() +]] +{ + float4 ret_val; + int offset_x, offset_y; + + + float3 id_offset_map_2 = float3(id_offset_map.tint); + float offset_id = id_offset_map_2.y; + int rand_id = int(id_offset_map_2.x * 254.f); // the more logical value of 255 causes sometimes rendering artifacts + // with the random number generator. Setting it to 254 apparently fixes it + + // Offset of overlapping tiles stored in G-channel + // [0 - 0.25[ : ( 0/ 0) Grayscale value: 0.1 + // [0.25 - 0.5 [ : (-1/ 0) Grayscale value: 0.37 + // [0.5 - 0.75[ : (-1/-1) Grayscale value: 0.62 + // [0.75 - 1.0 [ : ( 0/-1) Grayscale value: 0.87 + + offset_x = offset_id < 0.25f ? 0 : (offset_id < .75f) ? 1 : 0; + offset_y = offset_id < 0.5 ? 0 : 1; + + int2 cell_id = int2(int(::math::floor(uv.uv.x) - offset_x), int(::math::floor(uv.uv.y) - offset_y)); + + /* Using Linear congruential generator for pseudorandom numbers which is good enough */ + int rand_val_0 = random(seed); + int rand_val_1 = random(rand_val_0 + rand_id + random(cell_id.x + random(cell_id.y))); + int rand_val_2 = random(rand_val_1); + int rand_val_3 = random(rand_val_2); + int rand_val_4 = random(rand_val_3); + + ret_val = float4(rand_val_1, rand_val_2, rand_val_3, rand_val_4); + + return float4(ret_val/65535.0f); +} + + +// ****************************************************************************************************** +// Variation of the wood material which features another texture thats masks a secondary color +// Also the map includes a mask that prevents random color variations +export material Wood_Tiles_Poplar_Multicolor( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.50345f, 0.00926f, 0.00926f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.92874f, 0.64808f, 0.09821f) [[ + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::display_name("Secondary Color Tint"), + ::anno::in_group("Appearance") + ]], + float age_dirt = 0.4f [[ + ::anno::display_name("Age Dirt"), + ::anno::description("Adds dark dirt spots on top of the surface to create the appearance of a somewhat aged surface."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float wood_bump_strength = 0.3f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.6f [[ + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::display_name("Wood Brightness"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.6f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Randomly darkens the tiles of the floor."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_random_rotation = 0.015f [[ + ::anno::display_name("Wood Random Rotation"), + ::anno::description("Adds a random rotation around the main wood tile alignment direction."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + + float2 wood_scale = 1.4f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.15f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.06f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.1f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(1.0f, 1.0f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]], + +// WOOD Highlights (Not accessible to regular users) + uniform bool preview_wood_highlights = false + [[ + ::anno::display_name("Preview Wood Specular"), + ::anno::description("Enables previewing of the wood specular highlights for tweaking."), + ::anno::in_group("Advanced", "Wood Highlight") + ]], // just previews the highlights of the wood material + float isotropic_roughness = 0.336f // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values.") + [[ + ::anno::display_name("Isotropic Roughness"), + ::anno::description("Sets the roughness of the isotropic component of the wood reflection."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_roughness_range = 0.918f // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + [[ + ::anno::display_name("Isotropic Roughness Range"), + ::anno::description("Sets the degree roughness variation around the isotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float isotropic_specular_brightness = 0.787f // Sets how strong the isotropic specular highlight appears + [[ + ::anno::display_name("Isotropic Highlight Brightness"), + ::anno::description("Sets the brightness of the isotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float wood_specular_level = 1.f // Adjusts the specular level (PBR Style) + [[ + ::anno::display_name("Wood Specular Level"), + ::anno::description("Adjusts the falloff of the wood highlights."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_attenuation = 0.484f //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + [[ + ::anno::display_name("Anisotropic Attenuation"), + ::anno::description("Breaks up the reflection of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_width = 0.443f //Controls the width of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Width"), + ::anno::description("Adjusts the width of the anisotropic wood highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float aniso_bsdf_height = 0.631f //Controls the height of the anisotropic highlight" + [[ + ::anno::display_name("Anisotropic Height"), + ::anno::description("Adjusts the height of the anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + float anisotropic_isotropic_balance = 0.434f // Balances the Anisotropic vs. the isotropic wood highlight" + [[ + ::anno::display_name("Anisotropic - Isotropic Balance"), + ::anno::description("Blends between the contribution of isotropic and anisotropic highlight."), + ::anno::hard_range(0.f, 1.f), + ::anno::in_group("Advanced", "Wood Highlight") + ]], + +// ------------------ TEXTURES (Not accessible to regular users) ------------------ + // Diffuse + uniform texture_2d tex_srgb_wood_color = texture_2d("./poplar_diff.jpg", ::tex::gamma_srgb) + [[ + ::anno::display_name("Diffuse Wood Texture"), + ::anno::description("The diffuse wood texture used to cover the tiles (srgb)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Anisotropic Roughness AKA "Rough Detail" + uniform texture_2d tex_lin_wood_rough_detail = texture_2d("./poplar_rough_detail.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Anisotropic Variation Texture"), + ::anno::description("Texture to add variation to the anisotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Isotropic Roughness AKA "Rough Grain" + uniform texture_2d tex_lin_wood_rough_grain = texture_2d("./poplar_rough_grain.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Isotropic Variation Texture"), + ::anno::description("Texture to add variation to the isotropic reflections of the wood (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Wood detail Normal - Grain & Structure + uniform texture_2d tex_lin_wood_detail_norm = texture_2d("./poplar_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Wood Normal Texture"), + ::anno::description("Tangent Space Normal texture for defining the bumpiness of the wood."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles ID, Offset & Rotation + uniform texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles ID - Offset - Rotation Texture"), + ::anno::description("Texture that holds information about the wood tiles needed to create the wood tiles effect. R - Tiles ID, G - Tiles offset, B - Tiles Rotation (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Edgewear, Gaps(AO), Gaps Roughnesss + uniform texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Edgewear - Gaps - Gap Rough"), + ::anno::description("Texture that holds maps for the edgewear roughness, the tile gaps and the gaps roughness (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Normal (Grout and Bend) + uniform texture_2d tex_lin_tiles_normal = texture_2d("./melbury_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Normal Texture"), + ::anno::description("Texture that holds the normal map for the tiles (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Secondary color (grayscale) mask, randomization mask + uniform texture_2d tex_lin_tiles_R_2nd_col_G_randmask = texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear) + [[ + ::anno::display_name("2nd Color - Random Mask"), + ::anno::description("Texture that holds maps for blending with the secondary color and a color randomization mask that specifies in which area brightness randomization should occur (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles Roughness, Dents and Spots + uniform texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Rough - Dents - Spots"), + ::anno::description("Texture that contains maps for the tiles roughness, dents and spots which is a roughness effect applied to the wood coating layer (linear space)."), + ::anno::in_group("Advanced", "Textures") + ]], + // Tiles orange Peel + uniform texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) + [[ + ::anno::display_name("Tiles Orange Peel"), + ::anno::description("Tangent Space Normal texture for the orange peel which is applied to the coating of the tiles."), + ::anno::in_group("Advanced", "Textures") + ]] + +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Poplar - Multicolor Master"), + ::anno::description("Master template material. This material should be hidden." + "If you see this material, the integration is not hiding it correctly."), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "poplar", "master", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Poplar_Multicolor.Wood_Tiles_Poplar_Multicolor.png"), + ::anno::copyright_notice(COPYRIGHT), + ::anno::hidden() +]] + = + let { +/* + texture_2d tex_srgb_wood_color = texture_2d("./poplar_diff.jpg", ::tex::gamma_srgb); // Diffuse + texture_2d tex_lin_wood_rough_detail = texture_2d("./poplar_rough_detail.jpg", ::tex::gamma_linear); // Anisotropic Roughness AKA "Rough Detail" + texture_2d tex_lin_wood_rough_grain = texture_2d("./poplar_rough_grain.jpg", ::tex::gamma_linear); // Isotropic Roughness AKA "Rough Grain" + texture_2d tex_lin_wood_detail_norm = texture_2d("./poplar_norm.jpg", ::tex::gamma_linear); // Wood detail Normal - Grain & Structure + texture_2d tex_lin_tiles_id_offset_rotation = texture_2d("./brickbond_R_id_G_offs_B_rotation.png", ::tex::gamma_linear); // Tiles ID, Offset & Rotation + texture_2d tex_lin_tiles_edgewear_gaps_gapsrough= texture_2d("./brickbond_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear); // Edgewear, Gaps(AO), Gaps Roughnesss + texture_2d tex_lin_tiles_normal = texture_2d("./brickbond_norm.png", ::tex::gamma_linear); // Tiles Normal (Grout and Bend) + texture_2d tex_lin_tiles_rough_dents_spots = texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear); // Tiles Roughness, Dents and Spots + texture_2d tex_lin_tiles_orange_peel = texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear); // Tiles orange Peel +*/ +/* + // Wood Highlight tweaks + bool preview_wood_highlights = false; // just previews the highlights of the wood material + float wood_specular_level = 1.f; // Adjusts the specular level (PBR Style) + float isotropic_specular_brightness = 1.0f; // Sets how strong the isotropic specular highlight appears + float aniso_attenuation = 0.5f; //Attenuates the the anisotropic highlight using a texture. Use the preview for exclusively previewing the wood hightligghts for properly adjusting this term" + float anisotropic_isotropic_balance = 0.467f; // Balances the Anisotropic vs. the isotropic wood highlight" + float isotropic_roughness_range = 0.66f; // Adjusts the range of variation being applied to the isotropic highlight, a value of zero has no effect at all whereas 1 produces the most variation") + float isotropic_roughness = 0.34f; // The average roughness value of the isotropic highlight. When roughness variation is applied, the variation will go above and below those values."), + + float aniso_bsdf_width = 0.36f; //Controls the width of the anisotropic highlight" + float aniso_bsdf_height = 0.50f; //Controls the height of the anisotropic highlight"), +*/ + float wood_scale_variation = 0.1f; + + // Prepare the UV coordinates for regular texture lookups + vm_coordinates base_uv = vm_coord( + translation:texture_translate, + rotation: texture_rotate, + scaling: texture_scale, + uv_space: uv_space_index + ); + + // Random tile transform + // R: tile_id + // G: tile_offset + // B: tile_rotation + // A: secondary color blend weight + + ::base::texture_return rand_id_offset_lookup = vm_tex_lookup( + tex: tex_lin_tiles_id_offset_rotation, + uv: base_uv, + mono_source: mono_a + ); + + float3 R_2nd_col_G_randmask = ::tex::lookup_float3(tex_lin_tiles_R_2nd_col_G_randmask, base_uv.uv, ::tex::wrap_repeat, ::tex::wrap_repeat) ; + + + + float4 rand_vals = rand_tile_id( + uv: base_uv, + id_offset_map: rand_id_offset_lookup, + seed: seed + ); + + float2 rand_translation = float2(rand_vals.x, rand_vals.y); + float rand_rotation = texture_rotate + (float3(rand_id_offset_lookup.tint).z + (rand_vals.z - 0.5) * wood_random_rotation) * 360; + float2 rand_scale = float2(wood_scale/(1.0 - wood_scale_variation * 0.5 * rand_vals.x)) * texture_scale; + +// *** TILE UV *** - The randomized UV lookup for the tiles + + + vm_coordinates tile_uv = vm_coord( + translation:rand_translation, + rotation: rand_rotation, + scaling: rand_scale, + uv_space: uv_space_index + ); + + + // Tiling Lookups and compositing + // R: Edgewear + // G: Gaps + // B: Gaps Damage Roughness + float3 egdewear_gaps_gapsrough_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_edgewear_gaps_gapsrough, + uv: base_uv, + mono_source: mono_a + ).tint); + + // R: Coat Base Roughness (Footsteps, Grain, Wipe) + // G: Dents (Dirt/Ao) + // B: Spots (Liquid-alike) + float3 rough_dents_spots_lookup = float3( vm_tex_lookup( + tex: tex_lin_tiles_rough_dents_spots, + uv: base_uv, + mono_source: mono_a + ).tint); + + float dirt_and_spots_amount_remap = dirt_and_spots_amount * 0.5; + + float coat_roughness = egdewear_gaps_gapsrough_lookup.x * edgewear_roughness_amount + // edgewear + egdewear_gaps_gapsrough_lookup.z * dirt_and_spots_amount_remap + // Gaps Damage + histogram_range(rough_dents_spots_lookup.x, base_roughness_range, tiles_base_roughness) + // base roughness + rough_dents_spots_lookup.z * dirt_and_spots_amount + // Spots (rough) + (1.0 - rough_dents_spots_lookup.y) * dirt_and_spots_amount; // Dents + + float coat_roughness_squared = coat_roughness*coat_roughness; // roughness squared + + bsdf coating_bsdf = ::df::microfacet_ggx_smith_bsdf( + roughness_u: coat_roughness_squared, + roughness_v: coat_roughness_squared, + tint: color(1.0f), + mode: ::df::scatter_reflect + ); + +// ******** NORMALS ******** + + // Tiles normal + + + float3 tiles_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_normal, + strength: tiles_bump_strength, + uv: base_uv + ); + + float3 wood_detail_normal = vm_tex_normal_lookup( + tex: tex_lin_wood_detail_norm, + strength: wood_bump_strength, + uv: tile_uv + ); + + float3 orange_peel_normal = vm_tex_normal_lookup( + tex: tex_lin_tiles_orange_peel, + strength: tiles_orange_peel_bump_factor * 0.1f, + uv: base_uv + ); + + // Randomized Tiles normals - This needs to be probably rotated with the normal of the uv-tiles + float slope_amount = 0.07 * tiles_random_slope_orientation; + float3 slope = ::math::normalize( + ::state::texture_tangent_u(uv_space_index) * (rand_vals.y - 0.5) * slope_amount + + ::state::texture_tangent_v(uv_space_index) * (rand_vals.z - 0.5) * slope_amount + + ::state::normal() * ((1.0f - slope_amount) + 1.0f) + ); + + float3 tiles_slope_normal = add_detail_normal( + n: slope, + nd: tiles_normal + ); + + float3 tiles_slope_detail_normal = add_detail_normal( + n: tiles_slope_normal, + nd: wood_detail_normal + ); + + float3 normal_final = add_detail_normal( + n: tiles_slope_detail_normal, + nd: orange_peel_normal + ); + +// ******** Anisotropic Highlight ******** + // Lookup for anisotropic brightness variation + vm_coordinates aniso_brightnessvar_lookup_uv = vm_coord_post_scale( + uv: base_uv, + scale: texture_scale * 0.6 + ); + + ::base::texture_return aniso_brightnessvar_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: aniso_brightnessvar_lookup_uv, + mono_source: mono_average + ); + + float aniso_brightnessvar = histogram_scan_big( + input: aniso_brightnessvar_lookup.mono, + width: 0.911, + position: aniso_attenuation + ); + + ::base::texture_return aniso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_detail, + uv: tile_uv, + mono_source: mono_average + ); + + float aniso_detail_u = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_width); + float aniso_detail_v = histogram_range(aniso_mod_lookup.mono, 1.0, aniso_bsdf_height); + + bsdf wood_highlight_aniso = ::df::weighted_layer( + layer: ::df::microfacet_ggx_smith_bsdf( + roughness_u: aniso_detail_u * aniso_detail_u, + roughness_v: aniso_detail_v * aniso_detail_v, + tint: color(aniso_brightnessvar), + tangent_u: rotated_tangent(texture_rotate, uv_space_index), + mode: ::df::scatter_reflect + ), + weight: 1.0f, + normal: tiles_slope_normal + ); + +// ******** Isotropic Highlight ******** + ::base::texture_return iso_mod_lookup = vm_tex_lookup( + tex: tex_lin_wood_rough_grain, + uv: tile_uv, + mono_source: mono_average + ); + + float iso_mod = histogram_range( + input: iso_mod_lookup.mono, + range: isotropic_roughness_range, + position: isotropic_roughness + ); + + float iso_mod_squared = iso_mod * iso_mod; + + bsdf wood_highlight_isotropic = ::df::microfacet_ggx_smith_bsdf( + roughness_u: iso_mod_squared, + roughness_v: iso_mod_squared, + tint: color(isotropic_specular_brightness), + mode: ::df::scatter_reflect + ); + +// ******** Comping Anisotropic and Isotropic Highlight ******** + + bsdf wood_highlight_isotropic_bumped = ::df::weighted_layer( + layer: wood_highlight_isotropic, + base: wood_highlight_aniso, + weight: anisotropic_isotropic_balance, + normal: tiles_slope_detail_normal + ); + + +// ******** Diffuse Comping ******** + + // Linear interpolation magic to keep brightness appear the same across different values for + // 'floor_brightness' and 'wood_brightness_variation' + + float floor_brightness_fix = ::math::lerp( + ::math::lerp(0.0f, 0.3f, floor_brightness), + ::math::lerp(0.42f, 1.0f, floor_brightness), + wood_brightness_variation); + + float floor_brightness_remap = floor_brightness_fix * 0.7f + 0.3f; // remapping from 0.3 to 0.7 + + + float4 diffuse_attenuation = float4(::math::lerp( + a: gaps_brightness, + b: floor_brightness_remap, + l: egdewear_gaps_gapsrough_lookup.y)); + + + ::base::texture_return diffuse_lookup = vm_tex_lookup( + tex: tex_srgb_wood_color, + uv: tile_uv, + mono_source: mono_a, + scale: diffuse_attenuation + ); + + // Randomly varies brightness from 0.73 - 1.0 which is a simplification from the two nested lerp calls used in a previous version + float rand_tile_brightness = 1.0f - 0.27 * wood_brightness_variation + 0.27 * wood_brightness_variation * rand_vals.z * R_2nd_col_G_randmask.y; + // float rand_tile_brightness = R_2nd_col_G_randmask.x; + + // adding the darkening of the dents texture channel + float rand_tile_brightness_dents = rand_tile_brightness * ::math::lerp(1.0f, rough_dents_spots_lookup.y, age_dirt); + + + ::base::texture_return tiles_rand_brightness = ::nvidia::core_definitions::blend_colors( + color_1: diffuse_lookup.tint, + color_2: color(::math::pow( a: rand_tile_brightness_dents, b: 2.2)), // do gamma compensation + mode: ::base::color_layer_multiply, + weight: 1.0f + ); + + // blend wood color and wood secondary color based on maps + ::base::texture_return wood_2_colored = ::nvidia::core_definitions::blend_colors( + color_1: wood_color, + color_2: wood_secondary_color, + mode: ::base::color_layer_blend, + weight: R_2nd_col_G_randmask.x + ); + + ::base::texture_return tiles_rand_brightness_tint = ::nvidia::core_definitions::blend_colors( + color_1: tiles_rand_brightness.tint, + color_2: wood_2_colored.tint, + mode: ::base::color_layer_overlay, + weight: .95f + ); + + bsdf diffuse = ::df::weighted_layer( + layer: ::df::diffuse_reflection_bsdf( + tint: tiles_rand_brightness_tint.tint + ), + normal: tiles_slope_detail_normal, + weight: 1.0 + ); + +// Diffuse + Highlights BSDF + + bsdf diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped, + base: diffuse + ); + +// DEBUG + bsdf debug_diffuse_and_highlights_bsdf = ::df::custom_curve_layer( + normal_reflectivity: wood_specular_level * 0.08, + grazing_reflectivity: 1.0f, + weight: aniso_brightnessvar , + layer: wood_highlight_isotropic_bumped + ); + +// Coating Layer + // separate controls for the reflectivity of the gaps and the general reflectivity of the coat + // Note that "gaps_brightness" also controls the diffuse texture (saving an additional parameter here) + float coating_weight = ::math::lerp( + a: gaps_brightness, + b: coating_reflectivity, + l: egdewear_gaps_gapsrough_lookup.y + ); + + // apply the coating layer + bsdf coated_wood_tiles_bsdf = ::df::custom_curve_layer( + normal_reflectivity: 0.03, //may as well be made adjustable (0.08 * specular_level) + grazing_reflectivity: 1.0f, + layer: coating_bsdf, + weight: coating_weight, + base: diffuse_and_highlights_bsdf, + normal: normal_final + ); + + +// ******** Round Corners ******** + float3 round_normal = round_corners ? + ::state::rounded_corner_normal( + radius: roundcorner_radius_mm * 0.001, // is in mm + across_materials: across_materials + ) : ::state::normal(); + +} in material( + surface: material_surface( + scattering: preview_wood_highlights ? debug_diffuse_and_highlights_bsdf : coated_wood_tiles_bsdf + ), + geometry: material_geometry( + normal: round_normal + ) +); + + +// ****************************************************************************************************** +// 01 + +export material Wood_Tiles_Poplar_Melbury( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.50345f, 0.00926f, 0.00926f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.92874f, 0.64808f, 0.09821f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.3f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.6f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = 0.5f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 1.5f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.4f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.05f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.3f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.06f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 0.6f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.0f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(.5f, .5f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Poplar - Multicolor Melbury"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "poplar", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "melbury", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Poplar_Multicolor.Wood_Tiles_Poplar_Melbury.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Poplar_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.006f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.336f, + isotropic_roughness_range: 0.918f, + isotropic_specular_brightness: 0.787f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.484f, + aniso_bsdf_width: 0.443f, + aniso_bsdf_height: 0.631f, + anisotropic_isotropic_balance: 0.434f, + + tex_srgb_wood_color: texture_2d("./poplar_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./poplar_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./poplar_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./poplar_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./melbury_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./melbury_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./melbury_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./melbury_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 02 + +export material Wood_Tiles_Poplar_Large_Star( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.50345f, 0.00926f, 0.00926f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.92874f, 0.64808f, 0.09821f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.3f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.6f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = .5f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 1.5f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.06f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(0.3333f, 0.3333f)), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Poplar - Multicolor Large Star"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "poplar", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Poplar_Multicolor.Wood_Tiles_Poplar_Large_Star.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Poplar_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.005f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.336f, + isotropic_roughness_range: 0.918f, + isotropic_specular_brightness: 0.787f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.484f, + aniso_bsdf_width: 0.443f, + aniso_bsdf_height: 0.631f, + anisotropic_isotropic_balance: 0.434f, + + tex_srgb_wood_color: texture_2d("./poplar_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./poplar_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./poplar_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./poplar_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./star_large_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./star_large_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./star_large_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./star_large_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); + + + +// 03 + +export material Wood_Tiles_Poplar_Stars( + int seed = 0 [[ + ::anno::display_name("Randomization Seed"), + ::anno::description("Different seed values while causes different patterns of randomization on the tiles."), + ::anno::in_group("Randomization") + ]], + color wood_color = color(0.50345f, 0.00926f, 0.00926f) [[ + ::anno::display_name("Color Tint"), + ::anno::description("Applies an overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + color wood_secondary_color = color(0.92874f, 0.64808f, 0.09821f) [[ + ::anno::display_name("Secondary Color Tint"), + ::anno::description("Choose the secondary overlay color to tint the wood. A grayscale value of 0.5 has no effect, " + "brighter values brighten it while darker colors will have a darkening effect."), + ::anno::in_group("Appearance") + ]], + uniform float wood_bump_strength = 0.3f // Determines the degree of bumpiness"), + [[ + ::anno::display_name("Wood Bump Strength"), + ::anno::description("Adjusts the strength of the wood bump map."), + ::anno::in_group("Appearance"), + ::anno::hard_range(0.f, 2.f) + ]], + float floor_brightness = 0.6f [[ + ::anno::display_name("Wood Brightness"), + ::anno::description("Adjusts the general brightness of the wood."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float wood_brightness_variation = .6f [[ + ::anno::display_name("Wood Brightness Variation"), + ::anno::description("Adds a random brightness variation to the wooden tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float2 wood_scale = 1.4f [[ + ::anno::description("Sets the size of the wood relative to the tiles pattern. Larger numbers increase the size of the wood texture within the tiles."), + ::anno::display_name("Wood Scale"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::soft_range(0.0f, 2.0f) + ]], + uniform float tiles_bump_strength = 0.3f [[ + ::anno::description("Determines the degree of bumpiness of the tiles texture (grooves and bent tiles)."), + ::anno::display_name("Tiles Bump Strength"), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_random_slope_orientation = 0.4f [[ + ::anno::display_name("Tiles Random Slope Orientation"), + ::anno::description("Makes tiles individual tiles to appear tilted in random directions. Good for old floors and to take away too perfect appearing tiled floors."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float gaps_brightness = 0.0f [[ + ::anno::display_name("Grout Brightness"), + ::anno::description("Adjusts the brightness and roughness of the gaps between the tiles."), + ::anno::in_group("Appearance", "Tiles"), + ::anno::hard_range(0.f, 1.f) + ]], + float tiles_base_roughness = 0.06f [[ + ::anno::description("Adjusts the roughness of the coating. Higher value leading to blurrier and softer reflections."), + ::anno::display_name("Coating Roughness"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float base_roughness_range = 1.0f [[ + ::anno::description("Applies roughness variation to the coating, introducing signs of wear such as footprints and smudges."), + ::anno::display_name("Coating Roughness Variation"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + uniform float tiles_orange_peel_bump_factor = 0.3f [[ + ::anno::display_name("Coating Unevenness"), + ::anno::description("Applies an unevenness to the clear coat layer akin to orange peel."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float coating_reflectivity = 1.f [[ + ::anno::display_name("Coating Reflectivity"), + ::anno::description("The overall reflectivity of the clearcoat layer. Note that other parameters will show no effect when the clearcoat reflectivity is 0."), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::hard_range(0.f, 1.f) + ]], + float dirt_and_spots_amount = 0.3f [[ + ::anno::description("Adds random dirt and spots on top of the surface which adds variation to the clearcoat roughness."), + ::anno::display_name("Dirt and Spots"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + float edgewear_roughness_amount = 0.2f [[ + ::anno::description("Adds edgewear around the tile borders which results in a more worn and rough look of the clearcoat."), + ::anno::display_name("Edgewear Roughness Amount"), + ::anno::in_group("Appearance", "Tiles", "Coating"), + ::anno::enable_if("coating_reflectivity > 0.0f"), + ::anno::hard_range(0.f, 1.f) + ]], + + //----------------------------------------------- + + float2 texture_translate = 0.f [[ + ::anno::display_name("Texture Translate"), + ::anno::description("Controls the position of the texture."), + ::anno::in_group("Transform") + ]], + float texture_rotate = 0.f [[ + ::anno::display_name("Texture Rotate"), + ::anno::description("Rotates angle of the texture in degrees."), + ::anno::in_group("Transform") + ]], + float2 texture_scale = 1.0f [[ + ::anno::display_name("Texture Scale"), + ::anno::description("Larger numbers increase the size."), + ::nvidia::core_definitions::dimension(float2(0.5f, 0.5f)), + ::preview_scale(0.33f), + ::anno::in_group("Transform") + ]], + uniform int uv_space_index = 0 [[ + ::anno::display_name("UV Space Index"), + ::anno::description("Uses selected UV space for material."), + ::anno::in_group("Transform") + ]], + uniform bool round_corners = false [[ + ::anno::display_name("Round Corners"), + ::anno::description("Enables the round corner effect. Comes at a slight performance cost as additional raytracing calls are required to evaluate the round corner effect."), + ::anno::in_group("Round Corners") + ]], + uniform float roundcorner_radius_mm = 1.5f [[ + ::anno::display_name("Radius (mm)"), + ::anno::description("Radius of the rounded corners in millimeters."), + ::anno::in_group("Round Corners"), + ::anno::soft_range(0.f, 10.f) + ]], + uniform bool across_materials = false [[ + ::anno::display_name("Across Materials"), + ::anno::description("Applies the round corner effect across different materials when enabled."), + ::anno::in_group("Round Corners") + ]] +) +[[ + ::anno::author("NVIDIA vMaterials"), + ::anno::display_name("Wood Tiles Poplar - Multicolor Stars"), + ::anno::description(DESCRIPTION), + // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic + ::anno::key_words(string[]("wood", "poplar", "tiles", "tiled", "pattern", "decorative", "multimaterial", "multicolor", "organic", "natural", "coated", "infinite tiling", "star", "stars", "architecture", "interior")), + ::anno::thumbnail("./.thumbs/Wood_Tiles_Poplar_Multicolor.Wood_Tiles_Poplar_Stars.png"), + ::anno::copyright_notice(COPYRIGHT) + //::anno::hidden() +]] += Wood_Tiles_Poplar_Multicolor( + seed: seed, + wood_color: wood_color, + wood_secondary_color: wood_secondary_color, + wood_bump_strength: wood_bump_strength, + floor_brightness: floor_brightness, + wood_brightness_variation: wood_brightness_variation, + wood_random_rotation: 0.00f, + wood_scale: wood_scale, + + tiles_bump_strength: tiles_bump_strength, + tiles_random_slope_orientation: tiles_random_slope_orientation, + gaps_brightness: gaps_brightness, + tiles_orange_peel_bump_factor: tiles_orange_peel_bump_factor, + coating_reflectivity: coating_reflectivity, + tiles_base_roughness: tiles_base_roughness, + base_roughness_range: base_roughness_range, + dirt_and_spots_amount: dirt_and_spots_amount, + edgewear_roughness_amount: edgewear_roughness_amount, + + texture_translate: texture_translate, + texture_rotate: texture_rotate, + texture_scale: texture_scale, + uv_space_index: uv_space_index, + + round_corners: round_corners, + roundcorner_radius_mm: roundcorner_radius_mm, + across_materials: across_materials, + + preview_wood_highlights: false, + isotropic_roughness: 0.336f, + isotropic_roughness_range: 0.918f, + isotropic_specular_brightness: 0.787f, + wood_specular_level: 1.0f, + aniso_attenuation: 0.484f, + aniso_bsdf_width: 0.443f, + aniso_bsdf_height: 0.631f, + anisotropic_isotropic_balance: 0.434f, + + tex_srgb_wood_color: texture_2d("./poplar_diff.jpg", ::tex::gamma_srgb), + tex_lin_wood_rough_detail: texture_2d("./poplar_rough_detail.jpg", ::tex::gamma_linear), + tex_lin_wood_rough_grain: texture_2d("./poplar_rough_grain.jpg", ::tex::gamma_linear), + tex_lin_wood_detail_norm: texture_2d("./poplar_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_id_offset_rotation: texture_2d("./stars_R_id_G_offset_B_rotation.png", ::tex::gamma_linear), + tex_lin_tiles_edgewear_gaps_gapsrough: texture_2d("./stars_R_edgewear_G_gaps_B_gaps_rough.jpg", ::tex::gamma_linear), + tex_lin_tiles_normal: texture_2d("./stars_norm.jpg", ::tex::gamma_linear), + tex_lin_tiles_R_2nd_col_G_randmask: texture_2d("./stars_R_2ndcol_G_randmask.png", ::tex::gamma_linear), + tex_lin_tiles_rough_dents_spots: texture_2d("./tiles_wood_R_rough_G_dents_B_spots.jpg", ::tex::gamma_linear), + tex_lin_tiles_orange_peel: texture_2d("./tiles_wood_orangepeel_norm.jpg", ::tex::gamma_linear) +); diff --git a/Assets/Robots/franka/.thumbs/256x256/franka_instanceable.usd.png b/Assets/Robots/franka/.thumbs/256x256/franka_instanceable.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..d86fd49f75d6997a3890ae4dd8d47526850423fa --- /dev/null +++ b/Assets/Robots/franka/.thumbs/256x256/franka_instanceable.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fbb91b18d2b226e45c159afd5dcae0dbbf8ed1e072594018851b7eac05e3217f +size 15246 diff --git a/Assets/Robots/franka/.thumbs/256x256/panda_instanceable.usd.png b/Assets/Robots/franka/.thumbs/256x256/panda_instanceable.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..60c4452983f70918f34ef48aa299b95c54a6b2a9 --- /dev/null +++ b/Assets/Robots/franka/.thumbs/256x256/panda_instanceable.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:441838fc160ab9142d8ea15db08841b6a74221fff1ac2fd22b20ab6d9f6ef854 +size 63001 diff --git a/Assets/Robots/franka/Materials/.thumbs/256x256/Materials.usd.png b/Assets/Robots/franka/Materials/.thumbs/256x256/Materials.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..6a7e8fbcdb83823dc2137f919d3eb2a784bd75f1 --- /dev/null +++ b/Assets/Robots/franka/Materials/.thumbs/256x256/Materials.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:357c0cc0bdb17fa4352d13a316417183b2a38e86e33c2768324d1262f4d73928 +size 10703 diff --git a/Assets/Robots/franka/Props/.thumbs/256x256/instanceable_collision_meshes.usd.png b/Assets/Robots/franka/Props/.thumbs/256x256/instanceable_collision_meshes.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..0ab342d9aa4996126845aff33cadc42dcca620cd --- /dev/null +++ b/Assets/Robots/franka/Props/.thumbs/256x256/instanceable_collision_meshes.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:506c56a842d6d1c0e6753b5551848f82251dbaec55a7de333d3411fdbf38ec6f +size 857 diff --git a/Assets/Robots/franka/Props/.thumbs/256x256/panda_link0.usd.png b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link0.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..21f4e749df0ee422601fedb860f79962095a86a0 --- /dev/null +++ b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link0.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7600e7a81c090c54e9efb89e2e51c53f7d892fb458173205049049daf77f3d73 +size 55633 diff --git a/Assets/Robots/franka/Props/.thumbs/256x256/panda_link2.usd.png b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link2.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..19af19dc26baae645959ee453ff666c90b88e10e --- /dev/null +++ b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link2.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:976944c659ad09d14d44693d0ac4371163b2a55a365fa1bef2c829739d98422c +size 52288 diff --git a/Assets/Robots/franka/Props/.thumbs/256x256/panda_link4.usd.png b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link4.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..2780ae843a49303d63c78f56c266a495389957b0 --- /dev/null +++ b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link4.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6e2d722335d479df8fb3cb45eff10960085895cc7a2283adc1c6c61dbfea592b +size 58388 diff --git a/Assets/Robots/franka/Props/.thumbs/256x256/panda_link7.usd.png b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link7.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..e482c690328cb793d6e983918bcb1fdc1d1684b7 --- /dev/null +++ b/Assets/Robots/franka/Props/.thumbs/256x256/panda_link7.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bda0c66c3696117480475025940cbf382d7ff671d8b12c43783efc4bf27fcba8 +size 56909 diff --git a/Assets/Robots/franka/Props/instanceable_collision_meshes.usd b/Assets/Robots/franka/Props/instanceable_collision_meshes.usd new file mode 100644 index 0000000000000000000000000000000000000000..db655d4c646b1948c2b514903c8a267ce99020ec --- /dev/null +++ b/Assets/Robots/franka/Props/instanceable_collision_meshes.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e2d053fdd789ea000f04c243d2323167038a4aa0883a9e418c92d936c771417e +size 117851 diff --git a/Assets/Robots/franka/Props/panda_hand.usd b/Assets/Robots/franka/Props/panda_hand.usd new file mode 100644 index 0000000000000000000000000000000000000000..b54aab63055c3d661cb76709c899e301e2681832 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_hand.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bead1ccc72d702d333074ae30e5352f4328290e7e64dbf072696f052ba12a90 +size 686170 diff --git a/Assets/Robots/franka/Props/panda_link0.usd b/Assets/Robots/franka/Props/panda_link0.usd new file mode 100644 index 0000000000000000000000000000000000000000..9dd6a8ac27426d50f1b5269272b3cfe6bc1d7534 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link0.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b46e614cf37f745ef5f8212137ac6af06aaef34b3858ae02f2f67d2f2c988a7 +size 2153139 diff --git a/Assets/Robots/franka/Props/panda_link1.usd b/Assets/Robots/franka/Props/panda_link1.usd new file mode 100644 index 0000000000000000000000000000000000000000..721a1e000615978af2f46dbd7eb855753c623dfd --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link1.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f3f8b7d980865d2023ead815fd2faed9727af533959077b5700e28f6242187b +size 500792 diff --git a/Assets/Robots/franka/Props/panda_link2.usd b/Assets/Robots/franka/Props/panda_link2.usd new file mode 100644 index 0000000000000000000000000000000000000000..de75e61fbb3a90c0632d552bcaeaf0a2f80ec1e9 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link2.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f05fd2f8ce2533f06bb6b5bf916a0e8e8b151e5d1f58e270ce5617507590b27e +size 500827 diff --git a/Assets/Robots/franka/Props/panda_link3.usd b/Assets/Robots/franka/Props/panda_link3.usd new file mode 100644 index 0000000000000000000000000000000000000000..44a041562f333d3d8cde327ceffb4fde2e19da64 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link3.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf5b30913f51811cd7f772651d25ead0f48ed37d994a25c9fbccb38c8479dbf8 +size 866703 diff --git a/Assets/Robots/franka/Props/panda_link4.usd b/Assets/Robots/franka/Props/panda_link4.usd new file mode 100644 index 0000000000000000000000000000000000000000..46463c2df0bb711f7c0edad65fb235d37fedef65 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link4.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9dc792ca5a4fc5506cec8b7be83332d121727c0f32e3b133ad5a8478ab6a10e0 +size 866704 diff --git a/Assets/Robots/franka/Props/panda_link5.usd b/Assets/Robots/franka/Props/panda_link5.usd new file mode 100644 index 0000000000000000000000000000000000000000..c205892bcf0ebf2c54c487cde8118b9ee0473533 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link5.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b67be8b886c6705455b389ce6be7d710c75187397a8607381f1515c7b1e626c +size 778056 diff --git a/Assets/Robots/franka/Props/panda_link6.usd b/Assets/Robots/franka/Props/panda_link6.usd new file mode 100644 index 0000000000000000000000000000000000000000..0fc67170f45be0b67b69b8d1ecd8ee9e385dae47 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link6.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ca05c47f20b3711dea3a36aa27c70d9047ce8fbdf5945eb2fbdb4069cd76308c +size 2271655 diff --git a/Assets/Robots/franka/Props/panda_link7.usd b/Assets/Robots/franka/Props/panda_link7.usd new file mode 100644 index 0000000000000000000000000000000000000000..4c9b6500ecd4868ba4b13d554a3f313523204ca8 --- /dev/null +++ b/Assets/Robots/franka/Props/panda_link7.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f18324e59305650cf650d24d37e5bbe04e8f7e781da6e309105f6ec99840e0f +size 1253697 diff --git a/Assets/Sensor/Camera/.thumbs/256x256/kinect.usd.png b/Assets/Sensor/Camera/.thumbs/256x256/kinect.usd.png new file mode 100644 index 0000000000000000000000000000000000000000..39cbcf46bcd4e0680e41e316d015b7e54cfd2eb5 --- /dev/null +++ b/Assets/Sensor/Camera/.thumbs/256x256/kinect.usd.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b84af20b4bc69fe97f899f3c5b051ed0fbd054afddfaa52da09727e3801185e3 +size 14710 diff --git a/Assets/Sensor/Camera/d435/configuration/d435_base.usd b/Assets/Sensor/Camera/d435/configuration/d435_base.usd new file mode 100644 index 0000000000000000000000000000000000000000..897e6dcc052122f484d92df353272171c64592a6 --- /dev/null +++ b/Assets/Sensor/Camera/d435/configuration/d435_base.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae411320e9dfee5a9105802ba82fcdb4ab62d4c36912fc55ae33f488a0c97107 +size 16722445 diff --git a/Assets/Sensor/Camera/kinect.usd b/Assets/Sensor/Camera/kinect.usd new file mode 100644 index 0000000000000000000000000000000000000000..69cb5afe729101345e4d0813ba83c5faea62a890 --- /dev/null +++ b/Assets/Sensor/Camera/kinect.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eef0dbe023189bd36454d9bc28eaeb9a72a0e03438ae5af67453cc580498df64 +size 6296680 diff --git a/Assets/Sensor/Camera/realsense.usd b/Assets/Sensor/Camera/realsense.usd new file mode 100644 index 0000000000000000000000000000000000000000..cb4723b8b25eee281b69dd1ec8b3f97e3e694ce2 --- /dev/null +++ b/Assets/Sensor/Camera/realsense.usd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:faa959e07afe6acfb53e2330cc5aca5643ab6e950503ce782c1304552d393594 +size 4452170