| /****************************************************************************** |
| * 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 stone surface material"; |
| |
| float uint2float(int x) |
| { |
| return float(x & 0x7FFFFFFF) + (x < 0 ? 2147483648.0 : 0.0); |
| } |
| |
| 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]); |
| } |
|
|
| 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; |
| } |
| |
|
|
| float remap_invert_exponential_range(float input, float steepness = 10.0f) |
| { |
| return 1.0 / ((input*steepness)+ 0.000001)*(input-1.0)*(input-1.0); |
| } |
| |
| 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 remap(float input, float low, float high) |
| { |
| //return low + input * (high - low); |
| return ::math::lerp(low, high, input); |
| } |
| |
| |
| |
| 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 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(input, |
| low, |
| high, |
| 0.0, |
| 1.0), |
| 0.0, |
| 1.0); |
| } |
| |
| struct volume_info |
| [[ |
| ::anno::hidden() |
| ]] |
| { |
| color absorption_coefficient; |
| color scattering_coefficient; |
| }; |
| |
| 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); |
| } |
| |
|
|
|
|
| struct vm_col_norm{ |
| float3 value; |
| float3 norm; |
| }; |
| |
| 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; |
| // Translation before or after rotation? |
| return uv; |
| } |
| |
| vm_coordinates vm_coord_post_scale( |
| vm_coordinates uv = vm_coord(), |
| float2 scale = float2(1.0f) |
| ) |
| { |
| uv.uv /= scale; |
| return uv; |
| } |
| |
| 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_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); |
| } |
| |
| 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; |
| } |
| |
| ::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); |
| } |
| |
|
|
| export material Star_Galaxy( |
| 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) |
| ]], |
| float diffuse_brightness = 0.5f [[ |
| ::anno::description("Adjusts the lightness of the material."), |
| ::anno::display_name("Brightness"), |
| ::anno::in_group("Appearance"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(1) |
| ]], |
| float reflection_roughness = 0.6f [[ |
| ::anno::description("Higher roughness values lead to bigger highlights and blurrier reflections."), |
| ::anno::display_name("Roughness"), |
| ::anno::in_group("Appearance", "Reflection"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(2) |
| ]], |
| float reflection_scale = 1.f [[ |
| ::anno::description("This slider scales the dust, scratches and smudges reflection layer."), |
| ::anno::display_name("Imperfection Scale"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(3) |
| ]], |
| float reflection_roughness_sprinkles = 0.08f [[ |
| ::anno::description("Applies a roughness layer of sprinkled dirt."), |
| ::anno::display_name("Sprinkles"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(4) |
| ]], |
| float sprinkles_darken = 0.35f [[ |
| ::anno::description("Adjusts the brightness of the sprinkles."), |
| ::anno::display_name("Sprinkles Darkening"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(5) |
| ]], |
| float reflection_roughness_scratches = 0.09f [[ |
| ::anno::description("Applies a roughness layer of scratches."), |
| ::anno::display_name("Scratches"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(6) |
| ]], |
| float scratches_darken = 0.04f [[ |
| ::anno::description("Adjusts the brightness of the scratches."), |
| ::anno::display_name("Scratches Darkening"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(7) |
| ]], |
| float reflection_roughness_smudges = 0.1f [[ |
| ::anno::description("Applies a roughness layer of smudges."), |
| ::anno::display_name("Smudges"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(8) |
| ]], |
| float smudge_darken = 0.05f [[ |
| ::anno::description("Adjusts the brightness of the smudges."), |
| ::anno::display_name("Smudge Darkening"), |
| ::anno::in_group("Appearance", "Reflection", "Imperfections"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(9) |
| ]], |
| float bump_strength = 0.5f [[ |
| ::anno::description("Specifies the strength of the bump."), |
| ::anno::display_name("Bump Strength"), |
| ::anno::in_group("Appearance"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(10) |
| ]], |
| 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("Advanced"), |
| ::anno::ui_order(11) |
| ]], |
| uniform float translucency_amount = 0.5f [[ |
| ::anno::description("Describes how far light passes through the material."), |
| ::anno::display_name("Translucency Amount"), |
| ::anno::in_group("Advanced"), |
| ::anno::soft_range(0.f, 1.f), |
| ::anno::hard_range(0.f, 1.f), |
| ::anno::ui_order(12) |
| ]], |
| float2 texture_translate = float2(0.f) [[ |
| ::anno::description("Controls the position of the texture."), |
| ::anno::display_name("Texture Translate"), |
| ::anno::in_group("Transform"), |
| ::anno::ui_order(13) |
| ]], |
| 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(14) |
| ]], |
| float2 texture_scale = float2(1.f) [[ |
| ::anno::description("Larger numbers increase the size."), |
| ::anno::display_name("Texture Scale"), |
| ::anno::in_group("Transform"), |
| ::anno::ui_order(15) |
| ]], |
| 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(16) |
| ]], |
| 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("Round Corners"), |
| ::anno::in_group("Round Corners"), |
| ::anno::ui_order(17) |
| ]], |
| 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(18) |
| ]], |
| 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(19) |
| ]]) |
| [[ |
| ::anno::display_name("Star Galaxy - Natural"), |
| ::anno::description(DESCRIPTION), |
| ::anno::author("NVIDIA vMaterials"), |
| // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic |
| ::anno::key_words(string[]("stone", "rock", "star", "galaxy", "wall", "floor", "natural", "infinite tiling", "sanitary", "kitchen", "architecture", "interior", "exterior")), |
| ::anno::thumbnail("./.thumbs/Star_Galaxy.Star_Galaxy.png"), |
| ::anno::contributor("Maik Rohland"), |
| ::anno::contributor("Ruediger Raab"), |
| ::anno::copyright_notice(COPYRIGHT) |
| ]] |
| = |
| let { |
| bool tmp0 = false; |
| float global_scale = 8.0; |
| |
| 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 ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[0], 1.f, 0.50999999f) * reflection_roughness_sprinkles, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[1], 1.f, 0.50999999f) * remap(reflection_roughness_scratches, 0.f, 4.f)), histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[2], 1.f, 0.550000012f) * remap(reflection_roughness_smudges, 0.f, 3.f)) + histogram_range(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.733332992f, 0.517647028f, 0.733333111f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint)[0], 2.20000005f), 1.f, reflection_roughness)) * (::math::max(::math::max(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[0], 1.f, 0.50999999f) * reflection_roughness_sprinkles, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[1], 1.f, 0.50999999f) * remap(reflection_roughness_scratches, 0.f, 4.f)), histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[2], 1.f, 0.550000012f) * remap(reflection_roughness_smudges, 0.f, 3.f)) + histogram_range(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.733332992f, 0.517647028f, 0.733333111f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint)[0], 2.20000005f), 1.f, reflection_roughness)), (::math::max(::math::max(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[0], 1.f, 0.50999999f) * reflection_roughness_sprinkles, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[1], 1.f, 0.50999999f) * remap(reflection_roughness_scratches, 0.f, 4.f)), histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[2], 1.f, 0.550000012f) * remap(reflection_roughness_smudges, 0.f, 3.f)) + histogram_range(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.733332992f, 0.517647028f, 0.733333111f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint)[0], 2.20000005f), 1.f, reflection_roughness)) * (::math::max(::math::max(histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[0], 1.f, 0.50999999f) * reflection_roughness_sprinkles, histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[1], 1.f, 0.50999999f) * remap(reflection_roughness_scratches, 0.f, 4.f)), histogram_range(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[2], 1.f, 0.550000012f) * remap(reflection_roughness_smudges, 0.f, 3.f)) + histogram_range(::math::pow(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.733332992f, 0.517647028f, 0.733333111f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/star_galaxy_multi_R_rough_G_height_B_ao.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint)[0], 2.20000005f), 1.f, reflection_roughness)), color(1.f, 1.f, 1.f), color(0.f, 0.f, 0.f), ::state::texture_tangent_u(0), ::df::scatter_reflect), ::df::weighted_layer(translucency_amount * 0.5f, ::df::diffuse_transmission_bsdf(nvidia::core_definitions::blend_colors(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/star_galaxy_SSS.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.294117987f), 1.f, true, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/star_galaxy_SSS.jpg", ::tex::gamma_srgb), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint, color(0.900943995f, 0.831785977f, 0.727770984f), ::base::color_layer_blend, 0.200000003f, true).tint), ::df::diffuse_reflection_bsdf(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(nvidia::core_definitions::blend_colors(infinite_tiling ? color(vm_tex_infinite_color_normal(texture_2d("./textures/star_galaxy_diff.jpg", ::tex::gamma_linear), texture_2d("./textures/star_galaxy_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.270588011f, 0.274509996f, 0.278430998f), float3(0.494118005f, 0.494118005f, 0.992156982f), 1.f, true, 2.20000005f, remap(bump_strength, 0.f, 2.f)).value) : vm_tex_lookup(texture_2d("./textures/star_galaxy_diff.jpg", ::tex::gamma_srgb), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), mono_a, float4(1.f)).tint, color(0.f, 0.f, 0.f), ::base::color_layer_multiply, ::math::lerp(0.870000005f, -7.f, diffuse_brightness), true).tint, color(::math::clamp(remap_invert_exponential_range(histogram_scan(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[1], 0.310000002f, 1.f), 10.f), 0.f, 1.f)), ::base::color_layer_multiply, remap(scratches_darken, 0.f, 0.849999964f), true).tint, color(::math::clamp(remap_invert_exponential_range(histogram_scan(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[2], 0.310000002f, 0.519999981f), 10.f), 0.f, 1.f)), ::base::color_layer_multiply, remap(smudge_darken, 0.f, 0.800000012f), true).tint, color(::math::clamp(remap_invert_exponential_range(histogram_scan(float3(infinite_tiling ? color(vm_tex_infinite(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), float3(0.119000003f, 0.171000004f, 0.307999998f), global_scale, false, 2.20000005f)) : vm_tex_lookup(texture_2d("./textures/multi_R_dust_G_scratches_B_smudges.jpg", ::tex::gamma_linear), vm_coord_post_scale(vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float2(reflection_scale * 4.f)), mono_a, float4(1.f)).tint)[0], 0.f, 1.f), 10.f), 0.f, 1.f)), ::base::color_layer_multiply, sprinkles_darken, true).tint, 0.5f), infinite_tiling ? vm_tex_infinite_color_normal(texture_2d("./textures/star_galaxy_diff.jpg", ::tex::gamma_linear), texture_2d("./textures/star_galaxy_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.270588011f, 0.274509996f, 0.278430998f), float3(0.494118005f, 0.494118005f, 0.992156982f), 1.f, true, 2.20000005f, remap(bump_strength, 0.f, 2.f)).norm : vm_tex_normal_lookup(texture_2d("./textures/star_galaxy_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), remap(bump_strength, 0.f, 2.f))), infinite_tiling ? vm_tex_infinite_color_normal(texture_2d("./textures/star_galaxy_diff.jpg", ::tex::gamma_linear), texture_2d("./textures/star_galaxy_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), float3(0.270588011f, 0.274509996f, 0.278430998f), float3(0.494118005f, 0.494118005f, 0.992156982f), 1.f, true, 2.20000005f, remap(bump_strength, 0.f, 2.f)).norm : vm_tex_normal_lookup(texture_2d("./textures/star_galaxy_norm.jpg", ::tex::gamma_linear), vm_coord(texture_translate, texture_rotate, texture_scale * 0.5f, uv_space_index), remap(bump_strength, 0.f, 2.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 = subsurface_scattering ? material_volume(vdf(), volume_transmittance_albedo(16.f, color(0.0764949992f, 0.112805001f, 0.0711930022f), color(0.787411988f, 0.787411988f, 0.787411988f)).absorption_coefficient, volume_transmittance_albedo(16.f, color(0.0764949992f, 0.112805001f, 0.0711930022f), color(0.787411988f, 0.787411988f, 0.787411988f)).scattering_coefficient, color(0.f, 0.f, 0.f)) : material_volume(vdf(), volume_transmittance_albedo(16.f, color(0.0764949992f, 0.112805001f, 0.0711930022f), color(0.f, 0.f, 0.f)).absorption_coefficient, volume_transmittance_albedo(16.f, color(0.0764949992f, 0.112805001f, 0.0711930022f), 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 * 0.00100000005f, across_materials, 1.f) : ::state::normal()); |
| } in |
| material( |
| thin_walled: tmp0, |
| surface: tmp1, |
| backface: tmp2, |
| ior: tmp3, |
| volume: tmp4, |
| geometry: tmp5); |
| |
| // 2 |
| export material Star_Galaxy_Dark(*) |
| [[ |
| ::anno::display_name("Star Galaxy - Dark"), |
| ::anno::description(DESCRIPTION), |
| ::anno::author("NVIDIA vMaterials"), |
| // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic |
| ::anno::key_words(string[]("stone", "rock", "star", "galaxy", "wall", "floor", "natural", "infinite tiling", "sanitary", "kitchen", "architecture", "interior", "exterior", "dark", "neutral", "dark")), |
| ::anno::thumbnail("./.thumbs/Star_Galaxy.Star_Galaxy_Dark.png"), |
| ::anno::contributor("Maik Rohland"), |
| ::anno::contributor("Ruediger Raab"), |
| ::anno::copyright_notice(COPYRIGHT) |
| ]] = Star_Galaxy( |
| infinite_tiling: false, |
| diffuse_brightness: 0.05f, |
| bump_strength: 1.0f, |
| //Reflection |
| reflection_roughness: 0.25f, |
| reflection_scale: 1.0f, |
| reflection_roughness_sprinkles: 0.0f, |
| sprinkles_darken: 0.0f, |
| reflection_roughness_scratches: 0.1f, |
| scratches_darken: 0.0f, |
| reflection_roughness_smudges: 0.2f, |
| smudge_darken: 0.f, |
| subsurface_scattering: false, |
| translucency_amount: 0.5f, |
| |
| texture_translate: float2(0.0f), |
| texture_rotate: 0.0f, |
| texture_scale: float2(1.0f), |
| uv_space_index: 0, |
| |
| enable_round_corners: false, |
| radius: 0.5f, |
| across_materials: false |
| ); |
| |
| |
| // 3 |
| export material Star_Galaxy_Polished(*) |
| [[ |
| ::anno::display_name("Star Galaxy - Polished"), |
| ::anno::description(DESCRIPTION), |
| ::anno::author("NVIDIA vMaterials"), |
| // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic |
| ::anno::key_words(string[]("stone", "rock", "star", "galaxy", "wall", "floor", "infinite tiling", "sanitary", "kitchen", "architecture", "interior", "polished", "exterior", "new", "dark", "neutral", "dark")), |
| ::anno::thumbnail("./.thumbs/Star_Galaxy.Star_Galaxy_Polished.png"), |
| ::anno::contributor("Maik Rohland"), |
| ::anno::contributor("Ruediger Raab"), |
| ::anno::copyright_notice(COPYRIGHT) |
| ]] = Star_Galaxy( |
| // Appearance |
| infinite_tiling: false, |
| diffuse_brightness: 0.2f, |
| bump_strength: 0.1f, |
| //Reflection |
| reflection_roughness: 0.0f, |
| reflection_scale: 1.0f, |
| reflection_roughness_sprinkles: 0.0f, |
| sprinkles_darken: 0.0f, |
| reflection_roughness_scratches: 0.0f, |
| scratches_darken: 0.0f, |
| reflection_roughness_smudges: 0.0f, |
| smudge_darken: 0.0f, |
| subsurface_scattering: false, |
| translucency_amount: 0.5f, |
| |
| texture_translate: float2(0.0f), |
| texture_rotate: 0.0f, |
| texture_scale: float2(1.0f), |
| uv_space_index: 0, |
| |
| enable_round_corners: false, |
| radius: 0.5f, |
| across_materials: false |
| ); |
| |
| // 4 |
| export material Star_Galaxy_Ice(*) |
| [[ |
| ::anno::display_name("Star Galaxy - Ice"), |
| ::anno::description(DESCRIPTION), |
| ::anno::author("NVIDIA vMaterials"), |
| // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic |
| ::anno::key_words(string[]("stone", "rock", "star", "bright", "galaxy", "wall", "floor", "infinite tiling", "sanitary", "kitchen", "architecture", "interior", "exterior", "new", "polished", "light", "neutral")), |
| ::anno::thumbnail("./.thumbs/Star_Galaxy.Star_Galaxy_Ice.png"), |
| ::anno::contributor("Maik Rohland"), |
| ::anno::contributor("Ruediger Raab"), |
| ::anno::copyright_notice(COPYRIGHT) |
| ]] = Star_Galaxy( |
| // Appearance |
| infinite_tiling: false, |
| diffuse_brightness: 1.0f, |
| bump_strength: 0.0f, |
| //Reflection |
| reflection_roughness: 0.0f, |
| reflection_scale: 0.2f, |
| reflection_roughness_sprinkles: 1.0f, |
| sprinkles_darken: 0.0f, |
| reflection_roughness_scratches: 0.0f, |
| scratches_darken: 0.0f, |
| reflection_roughness_smudges: 0.0f, |
| smudge_darken: 0.0f, |
| subsurface_scattering: false, |
| translucency_amount: 0.5f, |
| |
| texture_translate: float2(0.0f), |
| texture_rotate: 0.0f, |
| texture_scale: float2(1.0f), |
| uv_space_index: 0, |
| |
| enable_round_corners: false, |
| radius: 0.5f, |
| across_materials: false |
| ); |
| |
| |
| // 5 |
| export material Star_Galaxy_Used(*) |
| [[ |
| ::anno::display_name("Star Galaxy - Used"), |
| ::anno::description(DESCRIPTION), |
| ::anno::author("NVIDIA vMaterials"), |
| // reflective, varnished, bumped, matte, natural, stained, exterior, new, aged, decayed, abstract, modern, classic |
| ::anno::key_words(string[]("stone", "rock", "star", "galaxy", "wall", "floor", "natural", "infinite tiling", "sanitary", "kitchen", "architecture", "interior", "exterior", "smudges", "smudged", "worn", "used", "neutral", "dark")), |
| ::anno::thumbnail("./.thumbs/Star_Galaxy.Star_Galaxy_Used.png"), |
| ::anno::contributor("Maik Rohland"), |
| ::anno::contributor("Ruediger Raab"), |
| ::anno::copyright_notice(COPYRIGHT) |
| ]] = Star_Galaxy( |
| // Appearance |
| infinite_tiling: false, |
| diffuse_brightness: 0.35f, |
| bump_strength: 1.0f, |
| //Reflection |
| reflection_roughness: 0.3f, |
| reflection_scale: 1.0f, |
| reflection_roughness_sprinkles: 1.0f, |
| sprinkles_darken: 0.1f, |
| reflection_roughness_scratches: 0.25f, |
| scratches_darken: 0.4f, |
| reflection_roughness_smudges: 0.4f, |
| smudge_darken: 0.3f, |
| subsurface_scattering: false, |
| translucency_amount: 0.5f, |
| |
| texture_translate: float2(0.0f), |
| texture_rotate: 0.0f, |
| texture_scale: float2(1.0f), |
| uv_space_index: 0, |
| |
| enable_round_corners: false, |
| radius: 0.5f, |
| across_materials: false |
| ); |
| |
|
|
|
|