Difference between revisions of "Power Fractal Shader v3"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:IMPORT]]
+
[[Image:Power_fractal_shader_v3.jpg|center|Power Fractal Shader v3]]
='''Power Fractal Shader v3'''=
 
  
[[Image:drex_module_157_image_0.png|485pxpx|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.
  
==Additional tabs for Power Fractal Shader v3==
+
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. So you can have a feature scale of 100 km but its features only 10 metres tall, for example.
 +
 
 +
 
 +
'''Node Type: ''' Fractal Shader
 +
 
 +
 
 +
'''Nodes in Default Scene: '''<br />
 +
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.
 +
 
 +
 
 +
'''Settings:'''<br />
 +
 
 +
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.
 +
 
 +
<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).
  
* [[Power Fractal Shader v3 - Colour Tab]]
+
* '''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.
  
* [[Power Fractal Shader v3 - Displacement Tab]]
+
* '''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.
  
* [[Power Fractal Shader v3 - Tweak Noise Tab]]
+
* '''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.
  
* [[Power Fractal Shader v3 - Warping Tab]]
+
* '''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.
 +
* '''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.
 +
* '''Invert blendshader:''' Check this to invert the values produced by the blend shader specified in the '''Blend by shader''' parameter.
  
'''Node Description & Purpose: '''<br /> The "Power Fractal Shader V3" is one of the most important and fundamental shaders used in Terragen 2. 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 Terragen 2 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 /> 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 /> 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 /> 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. <br /><br /><br />'''Node Type: '''<br /> Fractal Shader<br /><br />'''Nodes in Default Scene: '''<br /> 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.<br /><br /><br />'''Settings - Main: '''<br /> 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.<br /><br />'''Settings - Scale Tab: '''<br />
 
  
* '''Feature Scale [any positive value]: '''<br /> 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).
+
'''Example Movies'''
* '''Lead-in Scale [any positive value]: '''<br /> 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 [any positive value]: '''<br /> 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: '''<br /><font color="red">'''to be specified'''</font>
 
  
<br />'''Settings - Color: '''<br /> This tab allows users to tweak the color information generated by the fractal. Depending on the function or node reading the information from this fractal, the settings adjustable here may have a great effect.<br />
+
{|
 +
|-
 +
|
 +
Feature scale<br />
 +
[[File:FeatureScale.gif]]
 +
|
 +
Lead-in scale<br />
 +
[[File:LeadInV3Cloud.gif]][[File:LeadInV3.gif]]
 +
|-
 +
|
 +
Smallest scale<br />
 +
[[File:SmallestScale.gif]]
 +
|
 +
Noise octaves<br />
 +
[[File:NoiseOctavesV3.gif]]
 +
|-
 +
|
 +
Noise stretch<br />
 +
[[File:NoiseStretchV3.gif ]]
 +
|}
  
* '''"Apply High Color" and "Apply Low Color" [positive and negative values]: '''<br /> The fractal generates a range of colors ranging between the high and low color specified. Values between 0 and 1, or colors chosen by the color picker are of practical use for most situations. The high an low color can be enabled or disabled by checking or unchecking the respective setting.
+
==Additional tabs for Power Fractal Shader v3==
* '''Color Contrast: '''<br /> This slider adjusts the contrast between the colors generated by the fractal.
 
* '''Color Offset: '''<br /> This slider defaults to zero, keeping the high and low color in balance. Users can shift focus for the fractal towards the low color with any offset value less than 0, or shift focus to the high color with values above 0.
 
* '''Color Roughness: '''<br /> The color roughness slider determines how abrupt or smooth the color transitions are from one point in the fractal to the next.
 
* '''"Clamp High Color" and "Clamp Low Color": '''<br /> The fractal generated values above white (1) and below black (0). The clamp functions stop the fractal from generating colors outside the range (0,1).
 
  
<br />'''Settings - Displacement: '''<br /> Displacements are one of the two main function of a Power Fractal Shader. When displacement is enabled in this shader, the color information generated by the fractal are interpreted as elevations, where the high color equals maximum elevation, and the low color is the minimum elevation. Other shaders, such as the surface shader, can use this information to eventually apply structure to objects like the planet, fake stones, image maps, etc..<br /> The elevation information is independent of the color chosen in the "Colors" tab of the Power Fractal Shader. In fact, colors can be completely disabled in the Power Fractal Shader and still displacement information is carried forward to other functions and shaders.<br />
+
* [[Power Fractal Shader v3 - Colour Tab]]
  
* '''Apply Displacement Checkbox: '''<br /> Enables or disables displacement in the Power Fractal Shader. If enabled, displacement information is applied specified by the displacement method chosen in the the drop list:<br />
+
* [[Power Fractal Shader v3 - Displacement Tab]]
** '''Along Vertical:'''
 
** '''Along Normal [default setting]:'''
 
** '''Vertical Only (Requires Computed Normal):'''
 
** '''Lateral Only (Requires Computed Normal):'''
 
** '''Lateral Normalizes (Requires Computed Normal):'''
 
* '''Displacement amplitude [slider and input field]: '''<br /> If displacements are enabled in a power fractal, this value determines the amplitude of the displacement. For example, if the power fractal is used to generate a procedural terrain, the amplitude determines how high and low the maximum terrain features can get.
 
* '''Displacement offset [slider and input field]: '''<br /> The offset allows users to add or substract a value to all displacements applied. For example, when used as a procedural terrain, the entire terrain can be lifted up by the offset value.
 
* '''Displacement roughness [slider and input field]: '''<br /> This slider allows you to adjust the roughness of the displacements. Values less than 1 reduce the roughness of the displacement.
 
* '''Displacement spike limit [slider and input field]: '''<br /> This setting helps with reducing spikes which occur in the displacement. Especially when the fractal is used for generating realistic terrains, reducing both the spikes and roughness come in handy.
 
* '''Continue Spike Limit [checkbox]: '''<br />'''<font color="red">to be specified</font>'''
 
  
* '''Adjust coastline [checkbox]: '''<br /> When checked, "adjust coastline" will smooth the displacements by the two following parameters<br />
+
* [[Power Fractal Shader v3 - Tweak Noise Tab]]
** '''Coastline altitude'''<br /> Set the altitude below which the smoothing begins.
 
** '''Coastline Smoothing'''<br /> Adjust the smoothing factor.
 
  
<br />'''Settings - Tweak Noise: '''<br /> In this tab, all parameters that affect the "Noise" for the fractal are accessible. In relation to fractals, "Noise" is a pseudo-random, space-filling texture primitive. The actual look of the generated texture changes by choosing a different seed from which the noise functions begins to calculate. Think of "noise" as a way to add pseudo-random variation to a fractal, which by definition is self-similar over all magnitudes. So "noise" combined with the structures pre-defined by a fractal produces a multi-dimensional density function, which TG2 uses e.g. for procedural terrain generation, clouds, but also mask, displacements, colouring of structures, etc... <br /><br />
+
* [[Power Fractal Shader v3 - Warping Tab]]
  
* '''Noise Flavour'''<br /> TG2 currently supports five different flavours of noise functions: Perlin, Perlin Billow, Perlin Ridged, Perlin Mix 1 and 2 (which are a particular combination of the first three). The most fundamental characteristics of the final density function generated by a Power Fractal are determined by the flavour of noise chosen in this tab.
 
* '''Noise Variation: [Input field and slider]'''<br /> Sets the overall noise variation. At value 0, the noise generated shows an even distribution of small and large texture components. At higher values, the noise varies more unevenly - creating a noise texture with an uneven amount of large and small features. <br />
 
** '''Variation Method:'''<br />'''<font color="red">to be specified</font>'''
 
** '''Buoyancy from variation:'''<br /> Adjusts how "quickly" the variation itself changes over the dimensions of the variation.
 
** '''Clumping of variation:'''<br /> Adjusts the distribution of variation changes. Higher values result in a "clumping" effect. For example, when the fractal is used for creating a procedural terrain, a high clumping value would account for distinct areas of plains and mountains - especially when combined with a higher than default value for "noise variation".
 
* '''Noise Stretch:'''<br /> The three input boxes allow for stretching the noise texture in all three dimensions. The three input boxes (in order) stand for the x, y, and z dimension.
 
  
__NOTOC__
+
[[Category:Colour Shader]]
<!-- imported from file: module_157.html-->
+
[[Category:Displacement Shader]]

Revision as of 06:16, 21 January 2014

Power Fractal Shader v3

Node Description & Purpose:
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.

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. So you can have a feature scale of 100 km but its features only 10 metres tall, for example.


Node Type: Fractal Shader


Nodes in Default Scene:
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.


Settings:

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.

Scale tab

  • 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 [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 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.
  • 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.
  • Invert blendshader: Check this to invert the values produced by the blend shader specified in the Blend by shader parameter.


Example Movies

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 parameter is an individual setting in a node parameter view which controls some aspect of the node.

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.