Difference between revisions of "Get Normal in Texture"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Get Normal in Texture)
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:IMPORT]]
 
='''Get Normal in Texture'''=
 
 
 
[[Image:drex_module_37_image_0.png|485pxpx|Get Normal in Texture]]
 
[[Image:drex_module_37_image_0.png|485pxpx|Get Normal in Texture]]
  
 
Provides the "Normal In Texture" of the current [[Render State]]. The [[Render State]] is affected by any shaders which were called before this function is called, among other things.
 
Provides the "Normal In Texture" of the current [[Render State]]. The [[Render State]] is affected by any shaders which were called before this function is called, among other things.
  
When shading or displacing a surface, Normal in Texture provides a surface normal at the current point. On imported objects such as OBJs or TGOs, these coordinates are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these coordinates are initially set to [[Get Normal]] on the flat planet from which the terrain was displaced, but may be updated by [[Compute Terrain]] or [[Compute Normal]] nodes to provide a more detailed representation of the surface relief.
+
The input connection is not used by this node (consistent with all [[:Get|Get nodes]]).
 +
 
 +
When shading or displacing a surface, Normal in Texture provides a surface normal at the current point. On imported objects such as OBJs or TGOs, these normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these coordinates are initially set to [[Get Normal]] on the flat planet from which the terrain was displaced, but may be updated by [[Compute Terrain]] or [[Compute Normal]] nodes to provide a more detailed representation of the surface relief.
  
 
When sampling an atmosphere shader, Normal in Texture is usually set to the local "Up" vector with respect to the planet to which the atmosphere shader is attached.
 
When sampling an atmosphere shader, Normal in Texture is usually set to the local "Up" vector with respect to the planet to which the atmosphere shader is attached.
  
'''For most shading and displacement it is better to use [[Get Normal]] instead.'''
+
Normal in Texture often provides a value that is consistent between displacement and colour contexts, whereas [[Get Normal]] does not always provide that consistency. However, for some shading uses it may be better to use [[Get Normal]] because it provides more detail for colour and lighting.
  
The Input connection is not used by this node.
+
<!-- imported from file: module_37.html-->
  
__NOTOC__
+
[[Category:Get]]
<!-- imported from file: module_37.html-->
 

Revision as of 01:55, 7 October 2018

Get Normal in Texture

Provides the "Normal In Texture" of the current Render State. The Render State is affected by any shaders which were called before this function is called, among other things.

The input connection is not used by this node (consistent with all Get nodes).

When shading or displacing a surface, Normal in Texture provides a surface normal at the current point. On imported objects such as OBJs or TGOs, these normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these coordinates are initially set to Get Normal on the flat planet from which the terrain was displaced, but may be updated by Compute Terrain or Compute Normal nodes to provide a more detailed representation of the surface relief.

When sampling an atmosphere shader, Normal in Texture is usually set to the local "Up" vector with respect to the planet to which the atmosphere shader is attached.

Normal in Texture often provides a value that is consistent between displacement and colour contexts, whereas Get Normal does not always provide that consistency. However, for some shading uses it may be better to use Get Normal because it provides more detail for colour and lighting.

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 vector is a set of three scalars, normally representing X, Y and Z coordinates. It also commonly represents rotation, where the values are pitch, heading and bank.