Get Normal: Difference between revisions

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
No edit summary
Redmaw (talk | contribs)
m Added settings.
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:IMPORT]]
<div style="float:right; border-style:solid; padding:20px"><categorytree mode=pages hideroot=off>Get</categorytree></div>
='''Get Normal'''=


[[Image:drex_module_35_image_0.png|485pxpx|Get Normal]]
[[File:GetNormal_00_GUI.png|none|470px|Get Normal]]


Provides the Surface Normal (or a reasonable equivalent), in world space, of the current [[Render State]]. The [[Render State]] is affected by any shaders which were called before this function is called, among other things.


Normal is usually the most recently calculated surface normal at the current point on the surface being rendered or sampled, but other may be modified by other shaders, e.g. [[Redirect Shader]].
==Overview==
Provides the surface Normal (or a reasonable equivalent), in world space, 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|Get nodes]]).
 
Normal is usually the most recently calculated surface normal at the current point on the surface being rendered or sampled, but may be modified by other shaders, e.g. [[Redirect Shader]] whose purpose is to change the normal to cause displacement shaders to displace in different directions.


When used in the context of displacement, for example in a function network that feeds a displacement shader, Normal depends on where the node is connected with respect to [[Compute Terrain]] and [[Compute Normal]], and may also depend on other displacement shaders. Initially the normal is derived from the undisplaced surface being rendered. On imported objects such as OBJs or TGOs, normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these are initially set to the normal at the point 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 used in the context of displacement, for example in a function network that feeds a displacement shader, Normal depends on where the node is connected with respect to [[Compute Terrain]] and [[Compute Normal]], and may also depend on other displacement shaders. Initially the normal is derived from the undisplaced surface being rendered. On imported objects such as OBJs or TGOs, normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these are initially set to the normal at the point 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 used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Normal is always the "final normal" after all displacement and includes micro-polygon details. By the time a shader's colour and lighting is calculated, all displacements for that point have been performed and the renderer has already recalculated the normal for the micro-polygon.
When used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Normal is always the "final normal" after all displacement and includes micro-polygon details. By the time a shader's colour and lighting is calculated, all displacements for that point have been performed and the renderer has already recalculated the normal for the micro-polygon or surface point.


When sampling an atmosphere shader, Normal 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 is usually set to the local "Up" vector with respect to the planet to which the atmosphere shader is attached.


For some shading uses it may be better to use [[Get Normal in Texture]], because that often provides a value that is consistent between displacement and colour contexts.
For some shading uses it may be better to use [[Get Normal in Texture]], because that often provides a value that is consistent between displacement and colour contexts, but [[Get Normal]] provides more detail for colour and lighting.
 
 
'''Settings:'''
* '''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Get Normal nodes in a project.
* '''Enable:''' When checked, the node is active, and when unchecked the node is ignored.
 


The Input connection is not used by this node.
<br /n>


__NOTOC__
[[Category:Get]]
<!-- imported from file: module_35.html-->

Latest revision as of 18:36, 22 April 2022

Get Normal
Get Normal


Overview

Provides the surface Normal (or a reasonable equivalent), in world space, 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).

Normal is usually the most recently calculated surface normal at the current point on the surface being rendered or sampled, but may be modified by other shaders, e.g. Redirect Shader whose purpose is to change the normal to cause displacement shaders to displace in different directions.

When used in the context of displacement, for example in a function network that feeds a displacement shader, Normal depends on where the node is connected with respect to Compute Terrain and Compute Normal, and may also depend on other displacement shaders. Initially the normal is derived from the undisplaced surface being rendered. On imported objects such as OBJs or TGOs, normals are often provided by the object file and (optionally) interpolated to give a smooth surface for displacement and shading. On terrains these are initially set to the normal at the point 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 used in the context of providing colour and lighting to a surface, for example in a function network that feeds a shader's colour or luminosity, Normal is always the "final normal" after all displacement and includes micro-polygon details. By the time a shader's colour and lighting is calculated, all displacements for that point have been performed and the renderer has already recalculated the normal for the micro-polygon or surface point.

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

For some shading uses it may be better to use Get Normal in Texture, because that often provides a value that is consistent between displacement and colour contexts, but Get Normal provides more detail for colour and lighting.


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Get Normal nodes in a project.
  • Enable: When checked, the node is active, and when unchecked the node is ignored.