Painted Shader

From Terragen Documentation from Planetside Software
Jump to: navigation, search
Painted Shader


Overview[edit]

The Painted shader allows you to paint into your scene using the 3D Preview. You can paint surface colours, masks to control where a surface or cloud layer appears, the distribution of a population or even to generate surface displacement. The Painted shader requires a surface to paint on.

For more information about using the Painted shader please read the Painted Shader Guide.

Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Painted 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.
  • Clear button: Clicking this button will delete all the painted strokes for the shader.


Brush Tab[edit]

Brush Tab


  • Use absolute brush: When checked the brush will be a fixed size in metres.
    • Brush size in metres: This sets the size of the absolute brush.
      Use absolute brush = 1000 metres
      Use absolute brush = 100 metres


  • Use view-relative brush: When checked, the size of the brush will change depending on where you paint. It will stay a consistent size relative to the size of 3D Preview but when you paint further away from the camera it will be larger and vice versa.
    • View-relative brush size: This sets the size of the view-relative brush. The size is relative to the horizontal field of view of the 3D Preview. Smaller numbers make the the brush smaller. For example a value of 0.1 means the brush is 10% of the view width and a value of 0.5 would mean it was 50% of the view width.
      Use view-relative brush = 0.1
      Use view-relative brush = 0.25


  • Brush falloff: This controls the opacity of the brush from the centre to edge. A value of 1 means the brush smoothly moves from transparent at the edge to opaque in the centre. A value of 0 means the brush is completely opaque.
    Brush falloff = 0
    Brush falloff = 0.75


  • Flow: This setting controls how quickly the brush applies its paint. Lower numbers mean the brush has less effect.
    Flow = 0.05
    Flow = 1


  • Colour: Sets the colour of paint used by the brush.
    Colour = Red (sRGB 255,0,0)
    Colour = red, green, blue.  Each colour can be isolated and used as a mask independently.


Transform Tab[edit]

Brush Tab

The settings on this tab allow you to project and translate the Painted shader in various ways.


  • Projection: This popup menu has four options in which to project the painted shader.
    Projection options

    3D: When selected, the Painted shader conforms to the where the strokes were painted along the 3D surface.
    Plan Y: When selected, the Painted shader is projected through the surface or cloud layer along the planar Y axis (top down).
    Plan X: When selected, the Painted shader is projected through the surface or cloud layer along the X axis direction.
    Plan Z: When selected, the Painted shader is projected through the surface or cloud layer along the Z axis.

    A cloud layer does not have a surface “per se” because it is volumetric, therefore you need a surface in which to create a Painted shader.
    Any simple shape can be used to paint on, including a cube, sphere or ellipse that is approximately the same size as the cloud layer.
    The Painted shader is painted on the cube, then applied to the cloud layer.


  • Coordinates: This popup menu has two options in order to select the texture coordinates of the painted shader.
    Coordinates options

    Final position:
    Position in terrain/texture


  • Translate: Sets the position of the origin of the shader. You can use this to move the shader after you've finished painting it or even reposition it while you are painting.
    You can reposition the Painted shader on the surface of the object, terrain or cloud layer by entering a value in the Translate fields.


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.