Reflective Shader

From Terragen Documentation from Planetside Software
Revision as of 07:18, 26 February 2021 by Matt (talk | contribs) (Updated index of refraction)
Jump to: navigation, search
Reflective Shader


The Reflective Shader provides a reflectivity effect for surfaces which can simulate wet, smooth, and otherwise shiny surfaces. Control is provided over the strength of the reflectivity, the reflection tint, transparency, index of refraction, and whether reflections are Ray Traced.


    • Enable: When checked, the node is active and the settings below will affect the surface. When unchecked, the node is ignored.

Main Tab[edit]

Main Tab

    • Reflectivity: This setting controls how reflective the surface is. Higher values are more reflective. While you can change the colour of the reflectivity via the Colour picker to the right of the slider, it’s recommended that you use the “Reflection tint” to change the colour. This allows you to separately adjust the brightness and the colour of the reflectivity.
      Reflectivity = 0.25
      Reflectivity = 0.5
      Reflectivity = 1.0

    • Reflection tint: This setting allows you to tint the reflected colours by the color chosen via the Colour picker to the right of the slider.
      Reflection tint = sRGB 229,50,50, Reflectivity = 0.25
      Reflection tint = sRGB 229,50,50, Reflectivity = 0.5
      Reflection tint = sRGB 229,50,50, Reflectivity = 1.0

    • Index of refraction: Index of refraction (IOR) is a property of real world materials which affects light refracted into it from another medium. Despite its name it also affects the amount of light reflected off the surface for a given angle; in other words it changes the reflectivity curve which is calculated using the Fresnel equations. In the Reflective Shader the IOR setting must be >= 1. When IOR is exactly 1 there is no reflection. When IOR is greater than 1 some amount of reflection occurs, and the higher the IOR the more visible the reflections. For any IOR > 1, the reflectivity approaches 100% at glancing angles where light travels parallel to the surface (although this can be changed with the Reflectivity setting and roughness also makes it appear to be less). At any other angle the amount of reflection is reduced, calculated from the IOR. The IOR of water is usually around 1.33, depending on conditions, and most types of glass are between 1.4 and 1.9. IOR is rarely higher than 4.0 in real materials. However, you might want to go higher than this to simulate metals. A higher index of refraction can be used to produce higher reflectivity at perpendicular angles, but this is essentially just a cheat and is not a physically-based way to render metal.
      IOR = 1
      IOR = 1.1
      IOR = 1.25
      IOR = 1.33 (default)
      IOR = 1.5
      IOR = 2.0

    • Specular highlights: This popup has 4 options for choosing the method of calculating the specular highlights.
      Specular highlight methods.
      Specular highlights = Blinn
      Specular highlights = Beckmann TG 2
      Specular highlights = Beckmann TG 4.5
      Specular highlights = GGX

    • Highlight intensity: This setting controls the brightness of the specular highlight. A value of “0” results in no specular highlights, while increasing the value will brighten the highlight.
      Highlight intensity = 0.0
      Highlight intensity = 1.0
      Highlight intensity = 4.0

    • Caustic intensity:

    • Specular roughness: This setting controls how the specular highlight spreads out across the surface. Small values result in smaller, sharper and brighter highlights, while larger values result in larger, softer and more diffused highlights.
      Specular roughness = 0.01
      Specular roughness = 0.1
      Specular roughness = 0.2

    • Roughness function: The shader or function nodes assigned to this setting are multiplied by the “Specular roughness” value above which allow you to adjust or break up the intensity of the specular highlight. Note that negative results are clamped to 0.
      Power fractal shader assigned to Roughness function.  Apply high colour = 0.01
      Power fractal shader assigned to Roughness function.  Apply high colour = 0.1
      Power fractal shader assigned to Roughness function.  Apply high colour = 0.2
      Power fractal shader assigned to Roughness function.  Apply high colour = 0.5
      Power fractal shader assigned to Roughness function.  Apply high colour = 1.0

    • Ray traced reflections: When checked, reflections are ray traced for the surface and accurately reflect the scene. When unchecked, only the specular effect will render.
      Ray traced reflections checked.
      Ray traced reflections unchecked.

    • Reflection softness: Together with the “Number of samples” setting on the Quality tab, this setting controls the blurriness of the reflections. The default value of “0” results in sharp reflections and uses only one sample regardless of the number of samples chosen. Although the slider allows for a large range of values, the recommended range is between 0.0 to 0.1.
      Reflection softness = 0.0
      Reflection softness = 0.05
      Reflection softness = 0.1

Quality Tab[edit]

Quality Tab

    • Number of samples: This setting controls the quality of the soft reflections, which occur when the “Reflection softness” value is greater than “0”. The default value is “4” and raising it will take additional samples leading to a smoother blurred result, at the cost of longer render times.
      Reflection softness = 0.1, Number of samples = 4.
      Reflection softness = 0.1, Number of samples = 16.
      Reflection softness = 0.1, Number of samples = 32.
      Reflection softness = 0.1, Number of samples = 64.

A shader is a program or set of instructions used in 3D computer graphics to determine the final surface properties of an object or image. This can include arbitrarily complex descriptions of light absorption and diffusion, texture mapping, reflection and refraction, shadowing, surface displacement and post-processing effects. In Terragen 2 shaders are used to construct and modify almost every element of a scene.

A sample refers to a value or set of values at a point in time and/or space. The defining point of a sample is that it is a chosen value out of a continuous signal. In Terragen 2 it is usually a mathematical (procedural) function that is being sampled.