Painted Shader

From Terragen Documentation from Planetside Software
Revision as of 09:57, 21 February 2012 by Jo (talk | contribs)
Jump to: navigation, search
Painted Shader

Node Description and Purpose:
The Painted shader allows you to paint into your scene using the 3D Preview. You can paint colours for a surface, you could paint a mask to control where a surface appears or the distribution of a population or you could use the shader to generate displacement on a surface.

The easiest way to create a Painted shader is to use the Paint mode button in the 3D Preview. It's above the preview and has a brush icon. When you click it a menu pops up with a submenu that gives you the option to create and start painting with a new shader or to start painting with an existing shader.

When you start painting with a shader the 3D Preview changes to so everything appears slightly greyed out. This means the 3D Preview is in paint mode. You will also see a yellow dashed circle which moves as you move the mouse. This is your brush. Just click and drag to start painting.

As the 3D Preview refines you will see your brush stroke in greater detail. Something which can help with painting is to let the 3D Preview refine to a high detail level and then pause it. This will stop the 3D Preview starting to refine from the beginning every time you make a stroke and will show your strokes in finer detail. If you move around the scene much you may need to unpause the 3D Preview to allow it to draw the area you've moved to.

When the 3D Preview is in paint mode the menu in the Paint mode button changes. It lets you switch between Paint mode and Eraser mode. As you might imagine Eraser mode lets you delete parts of your painting.

The menu also has an item you can use to stop painting. This will switch the 3D Preview back to its normal mode. When the 3D Preview is in normal mode it won't show what you've painted with the shader. If you haven't done so already you will need to do something like connect the Painted shader into the surface layer network to show it outside of Paint mode.

Node Type: Colour Shader


Brush tab

  • Use absolute brush: If you check this radio button the brush will be a fixed size.
  • Brush size in metres: This sets the size of the absolute brush.

  • Use view-relative brush: If you check this button the size of the brush will change depending on where you paint in the size. 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.

  • 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.

  • Flow: This setting controls how quickly the brush applies its paint. Lower numbers mean the brush has less effect.
  • Colour: Sets the colour of paint used by the brush.

  • Clear button: Clicking this button will delete all the painted strokes for the shader.

Additional tabs for Painted 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.