Power Fractal Shader v3
Additional tabs for Power Fractal Shader v3
Node Description & Purpose:
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.
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.
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 - Main:
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.
Settings - 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:
to be specified
Settings - Color:
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.
- "Apply High Color" and "Apply Low Color" [positive and negative values]:
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.
- Color Contrast:
This slider adjusts the contrast between the colors generated by the fractal.
- Color Offset:
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:
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":
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).
Settings - Displacement:
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..
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.
- Apply Displacement Checkbox:
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:
- 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]:
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]:
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]:
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]:
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]:
to be specified
- Adjust coastline [checkbox]:
When checked, "adjust coastline" will smooth the displacements by the two following parameters
- Coastline altitude
Set the altitude below which the smoothing begins.
- Coastline Smoothing
Adjust the smoothing factor.
- Coastline altitude
Settings - Tweak Noise:
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...
- Noise Flavour
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]
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.
- Variation Method:
to be specified
- Buoyancy from variation:
Adjusts how "quickly" the variation itself changes over the dimensions of the variation.
- Clumping of variation:
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".
- Variation Method:
- Noise Stretch:
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.
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.