Difference between revisions of "Power Fractal Shader v3"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Reformatting Power Fractal Shader V3 wiki page to conform to new layout. WIP. Added descriptions & example images for Overview & Scale Tab.)
Line 1: Line 1:
[[Image:Power_fractal_shader_v3.jpg|center|Power Fractal Shader v3]]
+
[[File:PF3_00_GUI.png|none|470px |Power Fractal Shader v3]]
  
'''Node Description & Purpose: '''<br />
 
The Power Fractal Shader is one of the most important and fundamental shaders used in Terragen. Based on a choice of fractal formuals, it provides the user with the abilty to create and control the distribution and displacement of many functions in any TG project. The fractal detail provided by this shader is user-defined and adaptable to any scale required - ranging between the order of magnitude of a tiny grain of sand, up to planetary structures.
 
  
Usually, the Power Fractal Shader is sourcing information to other shaders, such as a surface shader or cloud shader, which then interpret the fractal information provided, relative to the functions these other shaders perform.
+
== Overview ==
 +
The Power Fractal Shader is one of the most important and fundamental shaders used in Terragen. Based on a choice of fractal formulas, it provides the user with the ability to create and control the distribution and displacement of many functions in any Terragen project. The fractal detail provided by this shader is user-defined and adaptable to any scale required, ranging between the order of magnitude of a tiny grain of sand, up to planetary structures. <br /n>
  
Fractals can be used for displacement or for colour, or for both displacement and colour. When we refer to the amplitude of a feature, this is related to the "displacement amplitude" when used for displacement or the "colour contrast" when used for colour. The colour generated by a shader is often interpreted in other ways when connected to other shaders. Examples are the density of a cloud layer or the fractal breakup applied to another surface layer.
+
Usually, the Power Fractal Shader is sourcing information to other shaders, such as a surface shader or cloud shader, which then interpret the fractal information provided, relative to the functions these other shaders perform. <br /n>
  
Scale is measured in texture space, which is not the same as the "tallness" of a feature. So you can have a feature scale of 100 km but its features only 10 metres tall, for example.
+
Fractals can be used for displacement or for colour, or for both displacement and colour. When we refer to the amplitude of a feature, this is related to the "displacement amplitude" when used for displacement or the "colour contrast" when used for colour. The colour generated by a shader is often interpreted in other ways when connected to other shaders. Examples are the density of a cloud layer or the fractal breakup applied to another surface layer. <br /n>
  
 +
Scale is measured in texture space, which is not the same as the "tallness" of a feature. For example, you can have a feature scale of 100 km but its features only 10 metres tall. <br /n>
  
'''Node Type: ''' Fractal Shader
+
The default scene contains a Power Fractal Shader which has been renamed "Base Colors". This shader provides color to the planet surface. To be precise, it provides a fractal distribution of colors, ranging from grey to black, at a certain fractal detail, contrast and color roughness. Under its Displacement Tab, the “Apply displacement” checkbox has been disabled so as not to provide additional 3D structure to the planet surface.
 +
 +
'''Settings'''
  
 +
*'''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Power fractal shader nodes in a project.
 +
*'''Enable: '''When checked, the node is active and the settings below will affect the surface. When unchecked, the node is ignored.
 +
*'''Seed:''' This setting controls the noise pattern generated. Each seed value generates a slightly different pattern. You can either set the value manually or use the Random Seed button at right to generate a random value.
 +
*'''Random seed:''' Clicking this button will randomly choose a new value for the “Seed” setting.
 +
<ul>
 +
[[File:PF3_29_Seed.jpg|none|800px|The Seed value and Random seed button can be used to generate variations of the fractal pattern without having to change any of the other settings.]]
 +
</ul>
 +
 +
*'''Mask by shader: '''When checked, the Power fractal shader is masked by the shader or function nodes assigned to this setting. Whiter parts of the masking shader show more of the image map. Shades of grey control the opacity of the image map.
 +
*'''Fit mask to this:''' When checked, the masking shader or function nodes are remapped to fit into the area of the image map shader. When unchecked, the masking shader determines the area to which the mask is applied.
 +
*'''Invert mask: '''When checked, the shader or function nodes assigned to the Mask by shader input are inverted. For example, light parts become dark and vice versa.
  
'''Nodes in Default Scene: '''<br />
+
== Scale Tab ==
The default scene contains a Power Fractal Shader which has been renamed "Base Colors". In the default setup, this Power Fractal provides color to the planet surface. To be precise, it provides a fractal distribution of colors, ranging from grey to black, at a certain fractal detail, contrast and color roughness. As displacement is disabled in the "Base Color" node for the default project, this shader is not providing 3D structure to the planet surface.
+
[[File:PF3_01_ScaleTab.png|none|470px|Scale Tab]]
  
  
'''Settings:'''<br />
+
*'''Feature scale: ''' The dominant features in the fractal pattern occur at the "feature scale", therefore any positive value may be used. Features that are smaller than the feature scale have a reduced amplitude, that is, the amplitude continues to diminish as the scale gets smaller, at a rate that depends on the roughness parameters.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:PF3_11_Terrain_FeatureScale.jpg|none|800px|Feature scale values on terrain at 1500, 5000, and 12500 metres.]]
 +
|-
 +
| [[File:PF3_19_Cloud_FeatureScale.jpg|none|800px|Feature scale values on cloud layer at 500, 1500, and 5000 metres.]]
 +
|-
 +
| [[File:PF3_18_Planet_FeatureScale.jpg|None|800px|Feature scale values on planet at 10,000 metres, 100,000 metres, and 1,000,000 metres.]]
 +
|}
 +
</ul>
  
Settings on main settings window (above tabs), include the obligatory "Name" field, a checkbox to enable or disable the Power Fractal Shader, and an input field labeled "Seed". The "Seed" of the Power Fractal can be set manually, or by hitting the "Random Seed" button nearby.
 
  
* '''Seed''': The seed value controls the noise pattern generated. Each seed value generates a slightly different pattern. You can either set the value manually or use the '''Random Seed''' button at right to generate a random value.
+
*'''Lead-in scale:''' This setting should always be the largest feature that is visible in the texture. Any positive value may be used. With clouds, for example, the lead-in scale allows you to create variations that occur over large areas of the sky, even if you want more prominent features at a smaller scale.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:PF3_13_Terrain_LeadInScale.jpg|none|800px|Lead-in scale values on terrain at 5000, 25000, and 100000 metres.]]
 +
|-
 +
| [[File:PF3_20_Cloud_LeadInScale.jpg|none|800px|Lead-in scale values on cloud at 7500, 50000, and 100000 metres.]]
 +
|-
 +
| [[File:PF3_21_Planet_LeadInScale.jpg|none|800px|Lead-in scale value on planet at 250000, 1 million, and 5 million metres. ]]
 +
|}
 +
</ul>
  
<u>Scale tab</u><br />
 
* '''Feature Scale [any positive value]: ''' The dominant features in the fractal occur at the "feature scale". Features that are smaller than the feature scale have a reduced amplitude (the amplitude continues to diminish as the scale gets smaller, at a rate that depends on the roughness parameters).
 
  
* '''Lead-in scale [any positive value]: ''' The "lead-in scale" should always be the largest feature that is visible in the texture. With clouds, for example, the lead-in scale allows you to create variations that occur over large areas of the sky, even if you want more prominent features at a smaller scale.
+
*'''Smallest scale:''' This setting may be any positive value, and sets the fractal pattern’s limit for producing detail, so that the shader does not calculate detail to an infinite level.  The fractal does not create detail below this scale.  If this is the only fractal in your surface or texture, then it will be smooth below this scale.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:PF3_14_Terrain_SmallestScale.jpg|none|800px|Smallest scale values on terrain at 0.1, 100 and 1000 metres.]]
 +
|-
 +
| [[File:PF3_23_Cloud_SmallestScale.jpg|none|800px|Smallest scale value on cloud layer at 0.1, 1000 and 1,500 metres.]]
 +
|}
 +
</ul>
  
* '''Smallest scale [any positive value]: ''' The fractal does not continue to produce detail down to in infinite level. It is limited by the "smallest scale". The fractal does not create detail below this scale. If this is the only fractal in your surface or texture, then it will be smooth below this scale.
 
  
* '''Noise Octaves: ''' This setting controls the number of layers which are combined to make up the noise pattern. The noise in each additional layer is twice the frequency of the previous layer. This has the effect of adding finer detail to the noise pattern.
+
*'''Noise octaves: ''' This setting controls the number of layers which are combined to make up the noise pattern. The noise in each additional layer is twice the frequency of the previous layer. This has the effect of adding finer detail to the noise pattern.
 +
<ul>
 +
{|
 +
|-
 +
|[[File:PF3_15_Terrain_Octaves.jpg|none|800px|Noise octave values on terrain ranging between 2 and 20.]]
 +
|-
 +
| [[File:PF3_24_Cloud_Octaves.jpg|none|800px|Noise octave values on cloud layer ranging between 2 and 20.]]
 +
|-
 +
| [[File:PF3_27_Planet_NoiseOctaves.jpg|none|800px|Noise octave values on planet ranging between 2 and 20.]]
 +
|}
 +
</ul>
  
* '''Noise stretch XYZ: ''' This parameter stretches, or scales, the noise pattern.
 
  
* '''Blend by shader:''' Check this to blend (mask) this shader using the specified shader or function node; essentially the other shader or function becomes a mask for this shader. The diffuse colours produced by the blend shader or the values produced by the blend function are interpreted as a blend weight, where 1 is full blend weight and 0 is no blend weight. These weights determine how much this shader's colour and displacement are applied to the input. Values below 0 or above 1 are allowed.
+
*'''Obey downstream smoothing filters:''' This setting allows the shader to take into consideration the Smoothing scale setting value of any Smoothing filter shaders located downstream from its position in the node network. The Smoothing filter forces the Power Fractal shader not to generate features smaller than its Smooth scale value thereby smoothing the output of the Power Fractal shader..
* '''Fit blendshader to this:''' If this is checked the blend shader (specified with the '''Blend by shader''' parameter) is given different texture coordinates in order to remap it into the texure space of this shader. Note that not all shaders use texture coordinates so this may have no effect.
+
<ul>
* '''Invert blendshader:''' Check this to invert the values produced by the blend shader specified in the '''Blend by shader''' parameter.
+
{|
 +
|-
 +
| [[File:PF3_16_Terrain_SmoothingFilterSmoothScale.jpg|none|800px|The Smoothing scale setting on Smoothing filter shaders downstream from the Power fractal shader limits the feature size generated by the Power fractal shader.]]
 +
|-
 +
| [[File:PF3_22_Cloud_SmoothingScale.jpg|none|800px|The Smoothing scale setting on Smoothing filter shaders downstream from a cloud layer limits the feature size generated by the Power fractal shader.]]
 +
|-
 +
| [[File:PF3_26_Planet_SmoothingFilterSmoothingScale.jpg|none|800px|The Smoothing scale setting on Smoothing filter shaders downstream from the Power fractal shader limits the feature size generated by the Power fractal shader.]]
 +
|}
 +
</ul>
  
  
'''Example Movies'''
+
*'''Noise stretch XYZ:''' This setting stretches, or scales, the noise pattern along the XYZ axis.
 +
<ul>
 +
{|
 +
|-
 +
| [[File:PF3_17_Terrain_NoiseStretchXYZ.jpg|none|800px|The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.]]
 +
|-
 +
| [[File:PF3_25_Cloud_NoiseStretchXYZ.jpg|none|800px|The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.]]
 +
|-
 +
| [[File:PF3_28_Planet_NoiseStretchXYZ.jpg|none|800px|The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.]]
 +
|}
 +
</ul>
 +
 
 +
 
 +
== Legacy Example Movies ==
  
 
{|
 
{|

Revision as of 23:53, 25 August 2021

Power Fractal Shader v3


Overview[edit]

The Power Fractal Shader is one of the most important and fundamental shaders used in Terragen. Based on a choice of fractal formulas, it provides the user with the ability to create and control the distribution and displacement of many functions in any Terragen project. The fractal detail provided by this shader is user-defined and adaptable to any scale required, ranging between the order of magnitude of a tiny grain of sand, up to planetary structures.

Usually, the Power Fractal Shader is sourcing information to other shaders, such as a surface shader or cloud shader, which then interpret the fractal information provided, relative to the functions these other shaders perform.

Fractals can be used for displacement or for colour, or for both displacement and colour. When we refer to the amplitude of a feature, this is related to the "displacement amplitude" when used for displacement or the "colour contrast" when used for colour. The colour generated by a shader is often interpreted in other ways when connected to other shaders. Examples are the density of a cloud layer or the fractal breakup applied to another surface layer.

Scale is measured in texture space, which is not the same as the "tallness" of a feature. For example, you can have a feature scale of 100 km but its features only 10 metres tall.

The default scene contains a Power Fractal Shader which has been renamed "Base Colors". This shader provides color to the planet surface. To be precise, it provides a fractal distribution of colors, ranging from grey to black, at a certain fractal detail, contrast and color roughness. Under its Displacement Tab, the “Apply displacement” checkbox has been disabled so as not to provide additional 3D structure to the planet surface.

Settings

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Power fractal shader nodes in a project.
  • Enable: When checked, the node is active and the settings below will affect the surface. When unchecked, the node is ignored.
  • Seed: This setting controls the noise pattern generated. Each seed value generates a slightly different pattern. You can either set the value manually or use the Random Seed button at right to generate a random value.
  • Random seed: Clicking this button will randomly choose a new value for the “Seed” setting.
    The Seed value and Random seed button can be used to generate variations of the fractal pattern without having to change any of the other settings.
  • Mask by shader: When checked, the Power fractal shader is masked by the shader or function nodes assigned to this setting. Whiter parts of the masking shader show more of the image map. Shades of grey control the opacity of the image map.
  • Fit mask to this: When checked, the masking shader or function nodes are remapped to fit into the area of the image map shader. When unchecked, the masking shader determines the area to which the mask is applied.
  • Invert mask: When checked, the shader or function nodes assigned to the Mask by shader input are inverted. For example, light parts become dark and vice versa.

Scale Tab[edit]

Scale Tab


  • Feature scale: The dominant features in the fractal pattern occur at the "feature scale", therefore any positive value may be used. Features that are smaller than the feature scale have a reduced amplitude, that is, the amplitude continues to diminish as the scale gets smaller, at a rate that depends on the roughness parameters.
    Feature scale values on terrain at 1500, 5000, and 12500 metres.
    Feature scale values on cloud layer at 500, 1500, and 5000 metres.
    Feature scale values on planet at 10,000 metres, 100,000 metres, and 1,000,000 metres.


  • Lead-in scale: This setting should always be the largest feature that is visible in the texture. Any positive value may be used. With clouds, for example, the lead-in scale allows you to create variations that occur over large areas of the sky, even if you want more prominent features at a smaller scale.
    Lead-in scale values on terrain at 5000, 25000, and 100000 metres.
    Lead-in scale values on cloud at 7500, 50000, and 100000 metres.
    Lead-in scale value on planet at 250000, 1 million, and 5 million metres.


  • Smallest scale: This setting may be any positive value, and sets the fractal pattern’s limit for producing detail, so that the shader does not calculate detail to an infinite level. The fractal does not create detail below this scale. If this is the only fractal in your surface or texture, then it will be smooth below this scale.
    Smallest scale values on terrain at 0.1, 100 and 1000 metres.
    Smallest scale value on cloud layer at 0.1, 1000 and 1,500 metres.


  • Noise octaves: This setting controls the number of layers which are combined to make up the noise pattern. The noise in each additional layer is twice the frequency of the previous layer. This has the effect of adding finer detail to the noise pattern.
    Noise octave values on terrain ranging between 2 and 20.
    Noise octave values on cloud layer ranging between 2 and 20.
    Noise octave values on planet ranging between 2 and 20.


  • Obey downstream smoothing filters: This setting allows the shader to take into consideration the Smoothing scale setting value of any Smoothing filter shaders located downstream from its position in the node network. The Smoothing filter forces the Power Fractal shader not to generate features smaller than its Smooth scale value thereby smoothing the output of the Power Fractal shader..
    The Smoothing scale setting on Smoothing filter shaders downstream from the Power fractal shader limits the feature size generated by the Power fractal shader.
    The Smoothing scale setting on Smoothing filter shaders downstream from a cloud layer limits the feature size generated by the Power fractal shader.
    The Smoothing scale setting on Smoothing filter shaders downstream from the Power fractal shader limits the feature size generated by the Power fractal shader.


  • Noise stretch XYZ: This setting stretches, or scales, the noise pattern along the XYZ axis.
    The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.
    The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.
    The fractal noise pattern can be stretched along any or all of its axis via the Noise stretch XYZ setting.


Legacy Example Movies[edit]

Feature scale
FeatureScale.gif

Lead-in scale
LeadInV3Cloud.gifLeadInV3.gif

Smallest scale
SmallestScale.gif

Noise octaves
NoiseOctavesV3.gif

Noise stretch
NoiseStretchV3.gif

Additional tabs for Power Fractal Shader v3[edit]

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 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 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.