Power Fractal Shader v3

From Terragen Documentation from Planetside Software
Jump to: navigation, search
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 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

Lead-in scale

Smallest scale

Noise octaves

Noise stretch

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.