Difference between revisions of "Default Shader 4.5"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Added example images to Colour tab Luminosity settings.)
(Updated text and layout of Base colour)
Line 31: Line 31:
 
== Colour Tab ==
 
== Colour Tab ==
 
[[File:DefShdr_01_GUI_ColourTab.png|none|470px|Colour Tab]]
 
[[File:DefShdr_01_GUI_ColourTab.png|none|470px|Colour Tab]]
'''Settings:''' <br />
+
<br />
The three settings of the colour group define the final perceived colour of the surface materialTerragen multiplies all three settings together to determine the final colour value.  For Metallic/Roughness workflows the colour values represent the reflectance (specular) colour of a metallic surface or the diffuse reflected colour (albedo) of a non-metallic surface. For Specular/Glossiness workflows the colour value for raw metallic surface materials should be set to 0.0 because raw metal has no albedo colour.  For non-metal surface materials, including dirt and grime that may rest upon a raw metal surface, the colour values represent the diffuse reflected (albedo) colour.
+
 
<ul>
+
'''Base colour''' <br />
 +
 
 +
<u>For a Metallic/Roughness workflow</u> you can use the base colour to define the colour (albedo) of both metals and non-metals.  Metallic surfaces have specular reflections that use the base colour as their main reflectivity colour. Non-metallic surfaces have a diffuse base layer that uses the base colour as its diffuse reflectivity.
 +
 
 +
<u>For a Specular/Glossiness workflow</u>, use the base colour to set the diffuse colour only. In this workflow the base colour should be set to 0.0 for raw metallic surfaces that have no diffuse reflectivity.  For non-metal surfaces, including dirt and grime that may rest upon a raw metal surface, the colour values represent the colour of the diffuse material.
 +
 
 +
The three settings in this group define the base colour.  Terragen multiplies all three settings together to determine its final value at each point on the surface.
 +
 
 
* ''' Base colour: '''This setting provides access to the [[Colour_Picker | Colour Picker]] pane in order to specify a base colour for the surface material.  The adjustment slider can be used to modify the brightness of the colour value.  
 
* ''' Base colour: '''This setting provides access to the [[Colour_Picker | Colour Picker]] pane in order to specify a base colour for the surface material.  The adjustment slider can be used to modify the brightness of the colour value.  
 
* ''' Colour image: '''This setting allows you to assign an image map to the surface material’s colour channels.  The image map is projected onto the surface material as defined on the Images tab.  
 
* ''' Colour image: '''This setting allows you to assign an image map to the surface material’s colour channels.  The image map is projected onto the surface material as defined on the Images tab.  
 
* ''' Colour function: ''' This setting allows you to assign shader or function nodes to the surface’s materials colour channels.   
 
* ''' Colour function: ''' This setting allows you to assign shader or function nodes to the surface’s materials colour channels.   
<ul>
 
 
{|
 
{|
 
|-
 
|-
 
| [[File:DefShdr_37_ColourTab_BaseColour.jpg|none|266px|Base colour sRGB 240,99,70 chosen via the Colour Picker pane.]] || [[File:DefShdr_35_ColourTab_ColourImage.jpg|none|266px|Colour derived by multiplying Base colour and pixels from image map.]] || [[File:DefShdr_36_ColourTab_ColourFunction.jpg|none|266px|Colour derived by multiplying all three colour sources.]]
 
| [[File:DefShdr_37_ColourTab_BaseColour.jpg|none|266px|Base colour sRGB 240,99,70 chosen via the Colour Picker pane.]] || [[File:DefShdr_35_ColourTab_ColourImage.jpg|none|266px|Colour derived by multiplying Base colour and pixels from image map.]] || [[File:DefShdr_36_ColourTab_ColourFunction.jpg|none|266px|Colour derived by multiplying all three colour sources.]]
 
|}
 
|}
</ul> <br />
+
<br />
 +
 
 +
'''Translucency''' <br />
 +
 
 
Translucency is the effect of light filtering through a surface. For example you might use translucency on a leaf texture to simulate light passing through it. It's not the same thing as opacity and is explained in more detail [[Translucency|here]]. The three settings of the translucency group are multiplied together to determine the final amount of translucency of the surface material.
 
Translucency is the effect of light filtering through a surface. For example you might use translucency on a leaf texture to simulate light passing through it. It's not the same thing as opacity and is explained in more detail [[Translucency|here]]. The three settings of the translucency group are multiplied together to determine the final amount of translucency of the surface material.
 
* ''' Translucency: '''This setting specifies the amount of translucency a surface material has, and acts as a multiplier to the "Translucency image" and "Translucency function" settings.  Translucency is the effect of light filtering through a surface, and more information may be found [[Translucency|here]].   
 
* ''' Translucency: '''This setting specifies the amount of translucency a surface material has, and acts as a multiplier to the "Translucency image" and "Translucency function" settings.  Translucency is the effect of light filtering through a surface, and more information may be found [[Translucency|here]].   
Line 53: Line 62:
 
|}
 
|}
 
</ul> <br />
 
</ul> <br />
 +
 +
'''Luminosity''' <br />
 +
 
Luminosity is the effect of a surface’s self illumination or glow. See the Surface Layer - Luminosity Tab [[Surface_Layer_-_Luminosity_Tab| page]] for a more detailed information about using the luminosity settings.
 
Luminosity is the effect of a surface’s self illumination or glow. See the Surface Layer - Luminosity Tab [[Surface_Layer_-_Luminosity_Tab| page]] for a more detailed information about using the luminosity settings.
 
* ''' Luminosity: '''This setting provides access to the Colour Picker pane in order to specify a colour or amount (greyscale) of luminosity for the surface material.  The adjustment slider can be used to adjust the level of luminosity.
 
* ''' Luminosity: '''This setting provides access to the Colour Picker pane in order to specify a colour or amount (greyscale) of luminosity for the surface material.  The adjustment slider can be used to adjust the level of luminosity.

Revision as of 06:02, 2 December 2020

Default Shader GUI


Overview[edit]

The Default shader node forms the basis for object surface mapping. It can provide base colours or load external images, as well as allowing control over translucency, luminosity, specular effects, displacement and opacity. Beginning with Terragen 4.5 the Default shader has been improved for working with Physically Based Rendering (PBR) materials.

Many aspects of this node are made up of groups of related settings. For example the base colour aspect has settings for "Base colour", "Colour image" and "Colour function". All of these settings work together to control the particular aspect they relate to.

This has implications you might not expect. For example, lets say you want to map the image of a leaf onto the leaf polygons of a plant model. For the true colours of the image to come through you need to set the "Base colour" to white. If it was set to some other colour, like red, that colour would influence the colours from the leaf image, tinting them red. You can use this to your advantage. If you thought the image was too bright you could use a grey colour to make it darker.

Keep in mind that the different settings of each group aspect interact with each other. This makes the Default shader very versatile, but you might want to make step-by-step changes and render previews in order to see their effect as you learn how they work together.

Here are some tips to working with the different aspects of the Default shader:

To specify a basic colour:

  • Choose a colour with the "Base colour" setting.
  • Don't specify anything for the Image and Function settings.

To use the colours directly from an image:

  • Choose an image file with the "Colour image" setting.
  • Set the "Base colour" setting to white.
  • Don't specify anything for the "Colour function" setting.

To use the colours directly from a shader or function:

  • Assign a shader or function to the "Colour function" setting.
  • Set the "Base colour" setting to white.
  • Don't specify anything for the "Colour image" setting.

To use an image or function to control where the colour appears:

  • Specify the colour using the "Base colour" setting.
  • Specify a greyscale image in the "Colour image" setting or "Colour function". More of the specified colour will appear where the image or function is lighter. White means full colour and black means no colour.

Colour Tab[edit]

Colour Tab


Base colour

For a Metallic/Roughness workflow you can use the base colour to define the colour (albedo) of both metals and non-metals. Metallic surfaces have specular reflections that use the base colour as their main reflectivity colour. Non-metallic surfaces have a diffuse base layer that uses the base colour as its diffuse reflectivity.

For a Specular/Glossiness workflow, use the base colour to set the diffuse colour only. In this workflow the base colour should be set to 0.0 for raw metallic surfaces that have no diffuse reflectivity. For non-metal surfaces, including dirt and grime that may rest upon a raw metal surface, the colour values represent the colour of the diffuse material.

The three settings in this group define the base colour. Terragen multiplies all three settings together to determine its final value at each point on the surface.

  • Base colour: This setting provides access to the Colour Picker pane in order to specify a base colour for the surface material. The adjustment slider can be used to modify the brightness of the colour value.
  • Colour image: This setting allows you to assign an image map to the surface material’s colour channels. The image map is projected onto the surface material as defined on the Images tab.
  • Colour function: This setting allows you to assign shader or function nodes to the surface’s materials colour channels.
Base colour sRGB 240,99,70 chosen via the Colour Picker pane.
Colour derived by multiplying Base colour and pixels from image map.
Colour derived by multiplying all three colour sources.


Translucency

Translucency is the effect of light filtering through a surface. For example you might use translucency on a leaf texture to simulate light passing through it. It's not the same thing as opacity and is explained in more detail here. The three settings of the translucency group are multiplied together to determine the final amount of translucency of the surface material.

  • Translucency: This setting specifies the amount of translucency a surface material has, and acts as a multiplier to the "Translucency image" and "Translucency function" settings. Translucency is the effect of light filtering through a surface, and more information may be found here.
  • Translucency image: This setting allows you to assign an image map to control the amount and location of translucency on the surface material. The image map is projected onto the surface material as defined on the Images tab.
  • Translucency function: This setting allows you to assign shader or function nodes to control the amount and location of translucency on the surface material.
    Translucency off.
    Translucency using colour values sRGB 240,30,30.
    Translucency using image map.
    Translucency function using distance shader to limit effect to localized area.


Luminosity

Luminosity is the effect of a surface’s self illumination or glow. See the Surface Layer - Luminosity Tab page for a more detailed information about using the luminosity settings.

  • Luminosity: This setting provides access to the Colour Picker pane in order to specify a colour or amount (greyscale) of luminosity for the surface material. The adjustment slider can be used to adjust the level of luminosity.
  • Luminosity image: This setting allows you to assign an image map to control the amount and location of luminosity on the surface material. The image map is projected onto the surface material as defined on the Images tab.
  • Luminosity function: This setting allows you to assign shader or function nodes to control the amount and location of luminosity on the surface material.
    Luminosity off.
    Luminosity = 1
    Luminosity = 10
    Luminosity = 30
    Luminosity = 10, Luminosity colour = 240,30,30 sRGB
    Luminosity controlled by image map.
    Luminosity function = Power fractal v3 shader

Roughness Tab[edit]

Roughness Tab

Settings on this tab control the smoothness of a surface material. All the settings are multiplied together and evaluated to determine the final roughness value. When the combined values evaluate to 0 a perfectly smooth surface will result and reflections will be sharp and mirror-like. Rougher surfaces are the result of values closer to 1.0 and will make reflections appear more blurry.

Settings:

    • Roughness: This value should be set to 0 for perfectly smooth surface materials and up to 1.0 for rougher surfaces.
      Roughness settings 0 - 1.  Metal material in a Metallic/Roughness workflow.
      Roughness setting 0 - 1. Non-metal material in a Metallic/Roughness workflow.
      Roughness setting 0 - 1.  Non-metal black material in a Metallic/Roughness workflow.
    • Roughness image: This setting allows you to specify an image file to use for roughness.
    • Invert image: When enabled, or checked, the image assigned to the “Roughness image” is inverted, i.e. black becomes white.
    • Gamma image:When enabled, or checked, assumes the image assigned to the “Roughness image” is in sRGB colour space and needs to be converted to linear colour space.
    • Roughness function: This setting allows you to assign shader or function nodes to determine the surface material’s roughness value.


    Specular Tab[edit]

    Specular Tab

    Settings:

      • Metalness:
      • Metalness image:
      • Gamma image:
      • Metalness function:
      • Fresnel reflectivity:
      • Reflectivity image:
      • Reflectivity function:
      • Fresnel reflection tint:
      • Index of refraction:

    Displacement Tab[edit]

    Displacement Tab

    The settings found under this tab allow you to control the three dimensional displacement of the surface material. Displacement is only applied if an image is specified in the “Displacement image” setting, or shader or function nodes assigned to the “Displacement function” setting.

    Settings:

      • Displacement direction: This popup menu has 5 options which let you choose the direction the displacement is applied in. Options that indicate “(requires computed normal)” require a Compute Terrain or Compute Normal node to be connected somewhere above the Default shader node in the network to work properly.
        Displacment direction options
        • Along vertical: Displacement happens along the normal of the underlying planet or 3D object.
        • Along normal: Displacement happens along the current surface normal.
        • Vertical only (requires computed normal): Displacement only happens along the normal of the underlying planet or 3D object. The displacement is scaled by the difference between the object normal and the surface normal. Displacement is reduced as the angle between the normals approaches 90°.
        • Lateral only (requires computed normal): Displacement only occurs in the lateral plane, that is perpendicular to the normal of the underlying object.
        • Lateral normalized (requires computed normal): This is the same as “Lateral only” but the normal is normalised, that is scaled so it has a length of 1.
        Displace direction: Off
        Displace direction: Along vertical
        Displace direction: Along normal
        Displace direction: Vertical only
        Displace direction: Lateral only
        Displace direction: Lateral normalized
      • Displacement multiplier: This multiplies the displacement values coming from the "Displacement function" input. A value of 1 leaves the incoming values unchanged. A value of 2 would make the incoming values twice as large. A value of 0.5 would make them half as large. Negative values will invert the displacement.
        Direction multiplier = 0.25
        Displacement multiplier = 0.5
        Displacement multiplier = 1.0
      • Displacement image: This setting allows you to specify an image file to use for displacement. The luminance of the image pixels is used to generate displacement.
        Displacement image = gems
        Displacement image = swirls
        Displacement image = Terragen
      • Gamma image:
      • Displacement function: This setting allows you to assign shader or function nodes to use as displacement for the surface material.
        Displacement function = off
        Displacement function = Power fractal
        Displacement function = Power fractal, Displacement image = Terragen
      • Displacement offset: This value is added to incoming displacement values after they are multiplied by the “Displacement multiplier” setting. This creates the effect of offsetting the displacement by a set amount along the “Displacement direction”. Positive values push the displacement out so it looks almost as if it was sitting on a plinth. Negative values will sink the displacement back into the surface. It doesn't reverse the displacement, it's more like creating a hole in the surface and then applying the displacement to the bottom of the hole.
        Displacment modifier = 0 (default)
        Displacement modifier = 1
        Displacement modifier = -1

    Opacity Tab[edit]

    Opacity Tab

    Settings:

      • Opacity:
      • Opacity image:
      • Use alpha channel:
      • Invert opacity image:
      • Opacity function:
      • Alpha from colour:
      • Alpha key:
      • Key tolerance:

    Images Tab[edit]

    Images Tab

    Settings:

      • Image projection:
        Image projection options
      • Projection camera:
      • Unpremultiply colour:
      • Unpremultiply metalness:
      • Unpremultiply translucency:
      • Unpremultiply luminosity:
      • Unpremultiply reflectivity:
      • Unpremultiply specular roughness:

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.

Literally, to change the position of something. In graphics terminology to displace a surface is to modify its geometric (3D) structure using reference data of some kind. For example, a grayscale image might be taken as input, with black areas indicating no displacement of the surface, and white indicating maximum displacement. In Terragen 2 displacement is used to create all terrain by taking heightfield or procedural data as input and using it to displace the normally flat sphere of the planet.

This is essentially the brightness of the colour. Terragen converts RGB colours to greyscale by taking the luminance of the colour.