Difference between revisions of "Fake Stones Shader"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Added descriptions and example images for all settings. Conformed page to new layout.)
Line 1: Line 1:
[[Image:drex_module_146_image_0.png|485pxpx|Fake Stones Shader]]
+
[[File:FakeStones_00_GUI.png|none|470px|Fake Stone Shader]]
  
'''Node Description and Purpose:''' The Fake Stones Shader creates a surface displacement that resembles individual stones or rocks. The effect is similar to a rock "population", except that as a surface shader it has global coverage unless restricted. You can control scale and density, shape, and colour. The Fake Stones Shader uses an internal Voronoi-based displacement function to create the rock shapes.
 
  
==Additional tabs for Fake Stones Shader==
+
== Overview ==
 +
The Fake Stones shader creates a surface displacement that resembles individual stones or rocks. The effect is similar to a rock "population", except that as a surface shader it has global coverage unless restricted. You can control scale and density, shape, and colour. The Fake Stones Shader uses an internal Voronoi-based displacement function to create the rock shapes.
  
* [[Fake Stones Shader - Shape Tab]]
+
'''Settings:'''
 +
<ul>
 +
* ''' Enable: ''' When checked, the node is active.  When unchecked, the node is ignored.
 +
* ''' Seed: '''  This setting controls the pattern used by the node to generate the placement of the fake stones.  Changing the value allows you to easily create variations of the stones based on the node’s other settings.
 +
* ''' Surface shader: '''The shader or function nodes assigned to this setting can change the surface colour and textures of the fake stones.  When not empty, this setting overrides the Colour tab settings.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_05_SurfaceShaderOff.jpg|none|400px|Nothing assigned to Surface shader.]] || [[File:FakeStones_06_SurfaceShaderPF3.jpg|none|400px|Shader and function nodes assigned to Surface shader.]]
 +
|}
 +
</ul>
 +
 
 +
* '''Mask by shader: '''When checked, the fake stones are restricted to the area defined by the shader or function nodes assigned to this setting.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_32_MaskByShaderOff.jpg|none|400px|Mask by shader disabled.]] || [[File:FakeStones_33_MaskByShaderOn.jpg|none|400px|Simple shape shader assigned to Mask by shader. ]]
 +
|}
 +
</ul>
 +
 
 +
* ''' Fit mask to this: '''When unchecked, the size of the shader or function nodes assigned as the mask determines the area to which the fake stones are applied.
 +
* ''' Invert mask: '''When checked, the inverse of the shader or function nodes assigned as the mask is used as the mask.
 +
<ul>
 +
[[File:FakeStones_34_InvertMaskOn.jpg|none|400px|Invert mask checked.]]
 +
</ul>
 +
 
 +
* ''' Mask as stone density: '''
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_35_MaskStoneDensityOff.jpg|none|400px|Mask stone density unchecked.]] || [[File:FakeStones_36_MaskStoneDensityOn.jpg|none|400px|Mask stone density checked.]]
 +
|-
 +
| [[File:FakeStones_37_MaskStoneDensityOff.jpg|none|400px|Mask stone density unchecked.]] || [[File:FakeStones_38_MaskStoneDensityOn.jpg|none|400px|Mask stone density checked.]]
 +
|}
 +
</ul>
 +
</ul>
 +
 
 +
== Scale / Density Tab ==
 +
[[File:FakeStones_01_ScaleTab_GUI.png|none|470px|Fake Stones Scale / Density Tab]]
 +
 
 +
 
 +
<ul>
 +
* '''Stone scale: ''' This setting scales the internal displacement function, effectively changing the size of the fake stones.  Smaller values yield smaller stones but more of them in a given area.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_07_StoneScale0p1.jpg|none|266px|Stone scale = 0.1]] || [[File:FakeStones_08_StoneScale0p5.jpg|none|266px|Stone scale = 0.5]] || [[File:FakeStones_09_StoneScale1.jpg|none|266px|Stone scale = 1.0]]
 +
|}
 +
</ul>
 +
 
 +
* '''Stone density: '''This setting controls how closely packed together the fake stones are.  Smaller values result in more space between stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_10_StoneDensity0p1.jpg|none|266px|Stone density = 0.1]] ||[[File:FakeStones_11_StoneDensity0p5.jpg|none|266px|Stone density = 0.5]] || [[File:FakeStones_12_StoneDensity1.jpg|none|266px|Stone density = 1.0]]
 +
|}
 +
</ul>
 +
 
 +
* '''Vary Density: ''' When checked, this setting masks the Stone density setting introducing areas free of stones.  Enabled by default and set to a value of 1, larger values will create bigger areas free of stones.  Values above 10 have little to no effect, at which point the “Density variation scale” value can be increased to create larger stone free areas.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_23_VaryDensityOff.jpg|none|266px|Vary density disabled.]] || [[File:FakeStones_24_VaryDensity1.jpg|none|266px|Vary density = 1]] || [[File:FakeStones_25_VaryDensity10.jpg|none|266px|Vary density = 10]]
 +
|}
 +
</ul>
 +
 
 +
* ''' Density Seed: ''' This setting allows you to change the starting point of the internal pattern used for the variation masking.  Visually, a different area of the pattern is seen without having to change the other settings.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_29_DensitySeed_101.jpg|none|266px|Density seed = 101]] || [[File:FakeStones_30__DensitySeed11286.jpg|none|266px|Density seed = 11286]] || [[File:FakeStones_31__DensitySeed10196.jpg|none|266px|Density seed = 10196]]
 +
|}
 +
</ul>
 +
 
 +
* ''' Density variation scale: ''' This setting determines the scale of the internal pattern used for the variation masking.  Larger values create larger spaces between groups of stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_26_VaryDensity10_DensityVarScale20.jpg|none|266px|Density variation scale = 20]] || [[File:FakeStones_27_VaryDensity10_DensityVarScale50.jpg|none|266px|Density variation scale = 50]] || [[File:FakeStones_28_VaryDensity10_DensityVarScale100.jpg|none|266px|Density variation scale = 100 ]]
 +
|}
 +
</ul>
 +
 
 +
</ul>
 +
 
 +
 
 +
== Shape Tab ==
 +
[[File:FakeStones_02_ShapeTab_GUI.png|none|470px|Fake Stones Shape Tab]]
 +
 
 +
 
 +
<ul>
 +
* ''' Stone tallness: '''This setting determines the height of the fake stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_39_StoneTallness0p1.jpg|none|266px|Stone tallness = 0.1]] || [[File:FakeStones_40_StoneTallness0p5.jpg|none|266px|Stone tallness = 0.5]] || [[File:FakeStones_41_StoneTallness1.jpg|none|266px|Stone tallness = 1]]
 +
|}
 +
</ul>
 +
 
 +
* ''' Pancake effect: '''This setting squashes and expands the fake stone, trying to preserve its volume..
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_42_PancakeEffect0.jpg|none|266px|Pancake effect = 0]] || [[File:FakeStones_43_PancakeEffect1.jpg|none|266px|Pancake effect = 1 ]] || [[File:FakeStones_44_PancakeEffect2.jpg|oone|266px|Pancake effect = 2]]
 +
|}
 +
</ul>
 +
 
 +
* ''' Only displace upwards: '''  When checked, the fake stones will displace vertically and not in the direction of the surface normal.  It is important to have a compute normal or compute terrain node upstream of the Fake stone node in order for the displacement direction to work as expected.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_45_OnlyDisplaceUpOff.jpg|none|400px|Only displace upwards unchecked (default).]] || [[File:FakeStones_46_OnlyDisplaceUpOn.jpg|none|400px|Only displace upwards checked.]]
 +
|}
 +
</ul>
 +
</ul>
 +
 
 +
 
 +
 
 +
== Colour Tab ==
 +
[[File:FakeStones_03_ColourTab_GUI.png|none|470px|Fake Stones Colour Tab]]
 +
 
 +
 
 +
<ul>
 +
* '''Apply colour: '''When checked, the values defined for the “Diffuse colour” and “Colour variation” settings are used.
 +
* '''Diffuse colour: ''' This setting can be used to apply a colour value to the fake stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_47_DiffuseColourR130G70B100.jpg|none|400px|Diffuse colour = 130,70,100 sRGB]] || [[File:FakeStones_48_DiffuseColourR126G101B226.jpg|none|400px|Diffuse colour = 126,101,226 sRGB]]
 +
|}
 +
</ul>
 +
 
 +
* '''Colour variation: ''' When checked, each colour colour component (RGB) of the “Diffuse colour” is varied by value defined by the “Variation in…” settings below.  A value of 0 means that the colour competent is not varied.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_49_ColourVariationOff.jpg|none|400px|Colour variation unchecked]] || [[File:FakeStones_50_ColourVariationRGB0p5.jpg|none|400px|Colour variation: Red = 0.5, Green = 0.5, Blue = 0.5]]
 +
|-
 +
| [[File:FakeStones_51_ColourVariationR1GB0.jpg|none|400px|Colour variation: Red = 1.0, Green = 0, Blue = 0]] || [[File:FakeStones_52_ColourVariationR0GB1.jpg|none|400px|Colour variation: Red = 0, Green = 1, Blue =1]]
 +
|}
 +
</ul>
 +
 
 +
* '''Variation in red: ''' Defines the minimum or maximum variation allowed for the red component.  A value of 0 means no variation will take place in the red channel.
 +
* '''Variation in green: '''Defines the minimum or maximum variation allowed for the green component.  A value of 0 means no variation will take place in the green channel.
 +
* '''Variation in blue: '''Defines the minimum or maximum variation allowed for the blue component.  A value of 0 means no variation will take place in the blue channel.
 +
</ul>
 +
 
 +
 
 +
== Functions ==
 +
[[File:FakeStones_04_FunctionsTab_GUI.png|none|470px|Fake Stones Functions Tab]]
 +
 
 +
 
 +
<ul>
 +
* '''Scale function: '''This setting allows you to assign a shader or function nodes in order to modify the scale of the individual fake stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_53_FunctionTab_ScaleFunctionOff.jpg|none|266px|Nothing assigned to the Scale function.]] || [[File:FakeStones_54_FunctionTab_ScaleFunctionImage.jpg|none|266px|An Image shader assigned to the Scale function.]] || [[File:FakeStones_55_FunctionTab_ScaleFunctionPF3.jpg|none|266px|A Power fractal shader assigned to the Scale function.]]
 +
|}
 +
</ul>
 +
 
 +
* '''Tallness function: '''This setting allows you to assign a shader or function nodes in order to modify the tallness of the individual fake stones.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:FakeStones_56_FunctionTab_TallnessFunctionOff.jpg|none|266px|Nothing assigned to the Tallness function.]] || [[File:FakeStones_57_FunctionTab_TallnessFunctionImage.jpg|none|266px|An Image shader assigned to the Tallness function.]] || [[File:FakeStones_58_FunctionTab_TallnessFunctionPF3.jpg|none|266px|A Power fractal shader assigned to the Tallness function.]]
 +
|}
 +
</ul>
 +
</ul>
 +
 
 +
 
 +
<br />
  
* [[Fake Stones Shader - Colour Tab]]
 
  
 
[[Category:Displacement Shader]]
 
[[Category:Displacement Shader]]

Revision as of 20:27, 22 February 2021

Fake Stone Shader


Overview[edit]

The Fake Stones shader creates a surface displacement that resembles individual stones or rocks. The effect is similar to a rock "population", except that as a surface shader it has global coverage unless restricted. You can control scale and density, shape, and colour. The Fake Stones Shader uses an internal Voronoi-based displacement function to create the rock shapes.

Settings:

    • Enable: When checked, the node is active. When unchecked, the node is ignored.
    • Seed: This setting controls the pattern used by the node to generate the placement of the fake stones. Changing the value allows you to easily create variations of the stones based on the node’s other settings.
    • Surface shader: The shader or function nodes assigned to this setting can change the surface colour and textures of the fake stones. When not empty, this setting overrides the Colour tab settings.
      Nothing assigned to Surface shader.
      Shader and function nodes assigned to Surface shader.
    • Mask by shader: When checked, the fake stones are restricted to the area defined by the shader or function nodes assigned to this setting.
      Mask by shader disabled.
      Simple shape shader assigned to Mask by shader.
    • Fit mask to this: When unchecked, the size of the shader or function nodes assigned as the mask determines the area to which the fake stones are applied.
    • Invert mask: When checked, the inverse of the shader or function nodes assigned as the mask is used as the mask.
      Invert mask checked.
    • Mask as stone density:
      Mask stone density unchecked.
      Mask stone density checked.
      Mask stone density unchecked.
      Mask stone density checked.

Scale / Density Tab[edit]

Fake Stones Scale / Density Tab


    • Stone scale: This setting scales the internal displacement function, effectively changing the size of the fake stones. Smaller values yield smaller stones but more of them in a given area.
      Stone scale = 0.1
      Stone scale = 0.5
      Stone scale = 1.0
    • Stone density: This setting controls how closely packed together the fake stones are. Smaller values result in more space between stones.
      Stone density = 0.1
      Stone density = 0.5
      Stone density = 1.0
    • Vary Density: When checked, this setting masks the Stone density setting introducing areas free of stones. Enabled by default and set to a value of 1, larger values will create bigger areas free of stones. Values above 10 have little to no effect, at which point the “Density variation scale” value can be increased to create larger stone free areas.
      Vary density disabled.
      Vary density = 1
      Vary density = 10
    • Density Seed: This setting allows you to change the starting point of the internal pattern used for the variation masking. Visually, a different area of the pattern is seen without having to change the other settings.
      Density seed = 101
      Density seed = 11286
      Density seed = 10196
    • Density variation scale: This setting determines the scale of the internal pattern used for the variation masking. Larger values create larger spaces between groups of stones.
      Density variation scale = 20
      Density variation scale = 50
      Density variation scale = 100


Shape Tab[edit]

Fake Stones Shape Tab


    • Stone tallness: This setting determines the height of the fake stones.
      Stone tallness = 0.1
      Stone tallness = 0.5
      Stone tallness = 1
    • Pancake effect: This setting squashes and expands the fake stone, trying to preserve its volume..
      Pancake effect = 0
      Pancake effect = 1
      Pancake effect = 2
    • Only displace upwards: When checked, the fake stones will displace vertically and not in the direction of the surface normal. It is important to have a compute normal or compute terrain node upstream of the Fake stone node in order for the displacement direction to work as expected.
      Only displace upwards unchecked (default).
      Only displace upwards checked.


Colour Tab[edit]

Fake Stones Colour Tab


    • Apply colour: When checked, the values defined for the “Diffuse colour” and “Colour variation” settings are used.
    • Diffuse colour: This setting can be used to apply a colour value to the fake stones.
      Diffuse colour = 130,70,100 sRGB
      Diffuse colour = 126,101,226 sRGB
    • Colour variation: When checked, each colour colour component (RGB) of the “Diffuse colour” is varied by value defined by the “Variation in…” settings below. A value of 0 means that the colour competent is not varied.
      Colour variation unchecked
      Colour variation: Red = 0.5, Green = 0.5, Blue = 0.5
      Colour variation: Red = 1.0, Green = 0, Blue = 0
      Colour variation: Red = 0, Green = 1, Blue =1
    • Variation in red: Defines the minimum or maximum variation allowed for the red component. A value of 0 means no variation will take place in the red channel.
    • Variation in green: Defines the minimum or maximum variation allowed for the green component. A value of 0 means no variation will take place in the green channel.
    • Variation in blue: Defines the minimum or maximum variation allowed for the blue component. A value of 0 means no variation will take place in the blue channel.


Functions[edit]

Fake Stones Functions Tab


    • Scale function: This setting allows you to assign a shader or function nodes in order to modify the scale of the individual fake stones.
      Nothing assigned to the Scale function.
      An Image shader assigned to the Scale function.
      A Power fractal shader assigned to the Scale function.
    • Tallness function: This setting allows you to assign a shader or function nodes in order to modify the tallness of the individual fake stones.
      Nothing assigned to the Tallness function.
      An Image shader assigned to the Tallness function.
      A Power fractal shader assigned to the Tallness function.



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.

A single object or device in the node network which generates or modifies data and may accept input data or create output data or both, depending on its function. Nodes usually have their own settings which control the data they create or how they modify data passing through them. Nodes are connected together in a network to perform work in a network-based user interface. In Terragen 2 nodes are connected together to describe 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.