Difference between revisions of "Simple Shape Shader"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
Line 39: Line 39:
[[Category:Colour Shader]]
[[Category:Colour Shader]]
[[Category:Displacement Shader]]

Revision as of 19:48, 1 June 2011

Simple Shape Shader

Node Description and Purpose
The Simple shape shader is a node which makes it easy to create simple shapes such as circles/ellipses, squares/rectangles, triangles and regular polygons like pentagons and octagons. It can generate both colour and displacement. It can also apply different effects to the edges of the shape.

Currently the Simple shape shader is only applied in a straight-up-and-down Plan Y projection.

Edge profiles
These are the different profiles the shader can apply to the edges of shapes:

Simple shape shader edge profiles.png

Smooth step creates a smooth transition between the edge and the interior of the shape. Bevel creates a straight line or linear ramp and Radius makes a quarter circle shape. Stroke is not shown here. It creates a solid stroke or border around the inside of the shape. Stroke can only be used in colour mode.

Node Type: Shader


  • Type of shape: This setting lets you choose the type of shape generated by the shader. You can choose from "Square/Rectangle", "Circle/Ellipse" or "Polygon". To create a triangle use a polygon with 3 sides.
  • Position: This sets the position of the centre of the shape.
  • Size: You can use this to set the width and height of the shape. N.B. an ellipse is a circle where the height is a different size to the width.
  • Rotation: This param sets the rotation of the shape around its centre. You can only rotate the array around the Y (upright) axis.
  • Polygon sides: This setting lets you control the number of sides when Type of shape is set to "Polygon".

Colour tab

  • Apply colour: If this is checked the shader will generate colour information.
  • Colour: This sets the colour for the shape.
  • Edge colour: The shader can apply a separate colour to the edge of the shape. To show the edge colour the Colour edge profile popup needs to set to something other than "None" and the Colour edge width needs to be more than 0.
  • Colour edge profile: This controls the edge profile or blending which is applied to the edge of the shape. See above for examples of the different edge profiles.
  • Colour edge width: This param lets you set the width of the edge area of the shape. To show the edge colour the Colour edge profile popup needs to set to something other than "None".
  • Position key:

Additional tabs for Simple Shape Shader[edit]

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.