Distance Shader

From Planetside Software Wiki
Jump to: navigation, search
Distance Shader

Node Description and Purpose:
The Distance Shader generates colour based on a computation of distance into the scene from a specific camera. You can specify the "near" and "far" colours, and the distances within which the shading will be performed. The two colours are blended between those distances. The output of a Distance Shader can be used to control surface textures, populations, even clouds and other scene features by distance from the camera, allowing you to for example specify that there are no clouds near to the camera and that cloud coverage increases with distance.


Node Type: Colour Shader


Settings:

  • Apply far colour: Check this checkbox to use the colour specified at right as the far colour. If you don't specify a colour the shaderA 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.'s input will be passed through.
  • Apply near colour: Check this checkbox to use the colour specified at right as the near colour. If you don't specify a colour the shaderA 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.'s input will be passed through.

  • Far distance: This sets the furthest blending distance. The colour at this distance will be the far colour.

  • Near distance: This sets the distance where the near colour starts to blend with the far colour. The colour at this distance will be the near colour.

  • Distance mode: This popup allows you choose the way the blending is done. The popup has these options:

    • Distance (spherical): This option causes the distances to be calculated in a sphere around the camera. The shape of blending will be circular, radiating out in all directions. Here's an example showing the blend radiating out around the camera:
      Spherical blend example
    • Z depth (planar): This option makes the blend happen in the direction the camera is looking. All points from the near distance back past the camera position will take on the near colour and the blend. The blend looks a bit like a line cutting across the scene perpendicular to the camera direction. Here's an example, showing how the blend is oriented to the camera:

      Planar blend example
  • Camera: This allows you to choose a camera to use with the shaderA 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.. You can create cameras which are only used with Distance shaders and not actually used to view the scene through. If you don't specify one the camera being used for rendering is used.

  • Clamp far colour: When this is checked, all distances greater than the far distance will have the far colour. When it is unchecked, additional colours will be extrapolated beyond the far distance.

  • Clamp near colour: When this is checked, all distances less than the near distance will have the near colour. When it is unchecked, additional colours will be extrapolated below the near distance.