Here are the general base Phenomena currently implemented in the layering package.
This Phenomenon mixes a glossy and diffuse reflection, both using the same tint color.
declare phenomenon color
"mila_mix_reflective" (
color "tint" default 0.7 0.7 0.7 1.0,
# Glossy
scalar "glossy_weight" default 0.5, #: min 0 max 1
scalar "glossy_roughness" default 0.4, #: min 0 max 1
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon layers a glossy on top of a diffuse reflection, both using the same tint color. The glossy layer is directionally weighted using a fresnel ior to determine the directionally-dependent weight.
declare phenomenon color
"mila_layer_reflective" (
color "tint" default 0.7 0.7 0.7 1.0,
# Glossy
scalar "glossy_weight" default 0.5, #: min 0 max 1
scalar "glossy_roughness" default 0.4, #: min 0 max 1
scalar "ior" default 1.4, #: min 1 max 20 softmax 2
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon mixes a glossy with a diffuse reflection, both using the same tint color. Adds anisotropic controls and diffuse roughness beyond the glossy roughness.
declare phenomenon color
"mila_mix_reflective_aniso" (
color "tint" default 0.7 0.7 0.7 1.0,
# Glossy
scalar "glossy_weight" default 0.5, #: min 0 max 1
scalar "glossy_roughness" default 0.4, #: min 0 max 1
# Additional Glossy
scalar "anisotropy" default 1.0,
scalar "aniso_angle" default 0.0,
integer "aniso_channel" default -1,
# Diffuse
scalar "diffuse_roughness" default 0.0, #: min 0 max 1
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon layers a glossy on top of a diffuse reflection, both using the same tint color. The glossy layer is directionally weighted using a fresnel ior to determine the directionally-dependent weight. Adds anisotropic control for the glossy reflection, and roughness for diffuse.
declare phenomenon color
"mila_layer_reflective_aniso" (
color "tint" default 0.7 0.7 0.7 1.0,
# Glossy
scalar "glossy_weight" default 0.5, #: min 0 max 1
scalar "glossy_roughness" default 0.4, #: min 0 max 1
scalar "ior" default 1.4, #: min 1 max 20 softmax 2
# Additional Glossy
scalar "anisotropy" default 1.0,
scalar "aniso_angle" default 0.0,
integer "aniso_channel" default -1,
# Diffuse
scalar "diffuse_roughness" default 0.0, #: min 0 max 1
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon layers a glossy on top of a diffuse reflection, but only the diffuse uses the tint color. The glossy layer is directionally weighted using a fresnel ior to determine the directionally-dependent weight.
declare phenomenon color
"mila_layer_reflective_plastic" (
color "tint" default 0.7 0.7 0.7 1.0,
# Glossy
scalar "glossy_weight" default 0.5, #: min 0 max 1
scalar "glossy_roughness" default 0.4, #: min 0 max 1
scalar "ior" default 1.4, #: min 1 max 20 softmax 2
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon provides a base painted layer for car paint type materials. It layers a glossy with flakes on top of a diffuse reflection that can change color at the edges. Layer as many clear coats as desired, using glossy or specular reflection components over this base.
declare phenomenon color
color "mila_layer_reflective_paint"
(
color "tint" default 0.8 0.1 0, #diffuse color
scalar "edge_weight" default 0.0,
color "edge_color" default 0 0 0, #diffuse color at grazing angles
scalar "edge_color_bias" default 1.0,
scalar "glossy_weight" default 0.2,
color "glossy_color" default 0.8 0.1 0,
scalar "glossy_roughness" default 0.6,
scalar "flake_weight" default 1.0,
color "flake_color" default 1 1 1,
scalar "flake_roughness" default 0.4,
scalar "flake_scale" default 0.05,
scalar "flake_density" default 0.8,
scalar "flake_strength" default 0.2,
integer "flake_type" default 3, #: enum "distortion1:distortion2:distortion3:cellular1:cellular2:cellular3"
integer "flake_cell_style" default 0, #: enum "edgy:circular"
scalar "flake_circle_size" default 0.3,
scalar "direct" default 1.0,
scalar "indirect" default 1.0
)
...
version 1
end declare
This Phenomenon layers an anisotropic glossy reflection on top of a glossy transmission, both using the same tint color. The glossy reflection layer is directionally weighted using a fresnel index of refraction (ior) to determine the directionally-dependent weight. Adds anisotropic control for both the glossy reflection and transmission, and uses the same ior for transmission redirection (refraction).
declare phenomenon color
"mila_layer_transmissive" (
color "tint" default 1.0 1.0 1.0 1.0,
# Glossy
scalar "reflective_weight" default 1.0, #: min 0 max 1
scalar "roughness" default 0.4, #: min 0 max 1
scalar "ior" default 1.5, #: min 0 softmin 1 max 10 softmax 2
# Additional Glossy
scalar "anisotropy" default 1.0,
scalar "aniso_angle" default 0.0,
integer "aniso_channel" default -1,
# Transmission reuses ior, roughness, anisotropy
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon layers a glossy reflection on top of a glossy transmission, using the tint color for the max distance color when specifying absorption with max distance. The glossy reflection layer is directionally weighted using a fresnel index of refraction (ior) to determine the directionally-dependent weight.
declare phenomenon color
"mila_layer_transmissive_distance" (
color "tint" default 1.0 1.0 1.0 1.0,
scalar "max_dist" default 2.0, #: min 0 softmax 5
# Glossy
scalar "reflective_weight" default 1.0, #: min 0 max 1
scalar "roughness" default 0.4, #: min 0 max 1
scalar "ior" default 1.5, #: min 0 softmin 1 max 10 softmax 2
# Transmission reuses ior, roughness, anisotropy
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon layers a specular reflection on top of a specular transmission, both using the tint color. The specular reflection layer is directionally weighted using a fresnel index of refraction (ior) to determine the directionally-dependent weight. The same ior is used to determine the transmission re-direction (refraction).
declare phenomenon color
"mila_layer_transmissive_clear" (
color "tint" default 1.0 1.0 1.0 1.0,
# Specular
scalar "reflective_weight" default 1.0, #: min 0 max 1
scalar "ior" default 1.5, #: min 0 softmin 1 max 10 softmax 2
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon combines diffuse reflection with subsurface scattering, and simplifies the control of the subsurface scattering. The tint color applies to the diffuse as well as the front and back scatter tint colors. The front and back colors apply to how the light is scattered. The scale_conversion can affect the distance the scatter color uses. The default values for distance is 20 units, and scale conversion affects that distance..
declare phenomenon color
"mila_mix_subsurface_scatter" (
# diffuse
color "tint" default 0.7 0.7 0.7 1.0,
scalar "roughness" default 0.0,
scalar "diffuse_weight" default 0.1, #: min 0 max 1
# scatter
scalar "front_weight" default 1.0,
color "front_color" default 1.0 0.5 0.25,
scalar "back_weight" default 1.0,
color "back_color" default 1.0 0.5 0.25,
scalar "back_depth", # unassigned (zero) means "same as radius"
scalar "sampling_dist_mult" default 2.0,
scalar "scale_conversion" default 1.0,
integer "resolution" default 1,
#
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon combines diffuse reflection with diffuse transmission. The tint color applies to both the reflection and the transmission..
declare phenomenon color
"mila_mix_translucent" (
color "tint" default 0.7 0.7 0.7 1.0,
scalar "roughness" default 0.0, #: min 0 max 1
scalar "diffuse_weight" default 0.1, #: min 0 max 1
#
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon combines three glossy reflection components. The tint color applies to all the reflection components. Each component has a weight and a roughness separate from the others.
declare phenomenon color
"mila_mix_glossy_reflection" (
color "tint" default 1.0 1.0 1.0 1.0,
#
scalar "weight1" default 0.3, #: min 0 max 1
scalar "roughness1" default 0.3, #: min 0 max 1 #
scalar "weight2" default 0.3, #: min 0 max 1
scalar "roughness2" default 0.4, #: min 0 max 1 #
scalar "weight3" default 0.4, #: min 0 max 1
scalar "roughness3" default 0.5, #: min 0 max 1 #
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare
This Phenomenon models hair as it combines a glossy reflection, transmission/transparency, and another set of glossy reflection components to model the primary reflection (R), the transmission (TT), and the secondary reflection (TRT) in hair. The tint color applies to the color coming out of the secondary reflection, as that component models the light going into a hair strand bouncing off the inside surface and transmitting back out of the hair. The half distance calculation for that color (sqrt) is used for the transmission color. The primary reflection is not tinted. The primary and secondary reflections are spread by the shift representing the normal shift applied to those components.
declare phenomenon color "mila_layer_hair" (
color "tint" default 0.6 0.4 0.1,
scalar "shift" default 0.15,
scalar "r_weight" default 1.0, # multiplied by 1.55 ior directional
scalar "tt_weight" default 0.4,
scalar "glint_weight" default 0.6,
scalar "direct" default 1.0, #: min 0 max 1
scalar "indirect" default 1.0 #: min 0 max 1
)
...
version 1
end declare