Unity Products:Amplify Shader Editor/Triplanar Sample
Triplanar Sample Node
The Triplanar Sample node is a special node that textures a model using a "Triplanar Mapping" technique. You can think of triplanar mapping as a technique that projects textures to a model using 3 projection planes, one for each XYZ axis. By setting the Normal Map option ON the node is also capable of dealing with normal correction in case you want to use normalmaps. This node is just a convenience node for a general purpose triplanar effect, it's not suppose to replace all kinds of triplanar effects, just the more common ones.
Nodes used:
Float,
Triplanar Sample
Node Parameter | Description | Default Value |
---|---|---|
Name | The name of the node, not really useful to anything besides organization. | Triplanar Sample |
Mapping | The type of projection it does which is bound by the planes it projects from.
|
Spherical |
Space | The space UV coordinate system it projects from.
|
World |
Normal Map | By setting this option ON a normal tangent correction will be applied to normal maps so that tangent space vectors from normal maps align correctly onto the object surface, otherwise normal maps will look inverted in some projection planes. | false |
Other Parameters | ||
Tilling | A multiplier that controls the scale repetition of the textures being projected onto the surface. Only visible is equivalent input port is not connected. | 1 |
Falloff | A multiplier that controls the interpolated blend between the projected planes. Higher values means harder blends while lower means softer. Only visible is equivalent input port is not connected. | 1 |
Top Texture | ||
Name | Name of the property holding the value. This is the name that will be shown in the material properties label, useful for organization purposes or to generate a Property Name. | Top Texture # |
Property Name | This is the variable name that contains the value, this is automatically generated using the Name parameter, it's greyed out and not editable. The generation process removes special characters, whitespaces and adds an underscore at the beginning ( ie: "My Property Name" becomes "_MyPropertyName" ). | _TopTexture# |
Default Texture | This is a fallback texture value that will be used if the default value is not set.
|
White |
Default Value | This is the value the shader currently holds. It's also the default value that is used when a new material is created with this shader. | None |
Material Value | This is the value the node the material currently holds. Only visible if the editor is open in material mode. | None |
Middle Texture, only visible if Mapping is set to Cylindrical | ||
Name | Name of the property holding the value. This is the name that will be shown in the material properties label, useful for organization purposes or to generate a Property Name. | Mid Texture # |
Property Name | This is the variable name that contains the value, this is automatically generated using the Name parameter, it's greyed out and not editable. The generation process removes special characters, whitespaces and adds an underscore at the beginning ( ie: "My Property Name" becomes "_MyPropertyName" ). | _MidTexture# |
Default Texture | This is a fallback texture value that will be used if the default value is not set.
|
White |
Default Value | This is the value the shader currently holds. It's also the default value that is used when a new material is created with this shader. | None |
Material Value | This is the value the node the material currently holds.Only visible if the editor is open in material mode. | None |
Bottom Texture, only visible if Mapping is set to Cylindrical | ||
Name | Name of the property holding the value. This is the name that will be shown in the material properties label, useful for organization purposes or to generate a Property Name. | Bot Texture # |
Property Name | This is the variable name that contains the value, this is automatically generated using the Name parameter, it's greyed out and not editable. The generation process removes special characters, whitespaces and adds an underscore at the beginning ( ie: "My Property Name" becomes "_MyPropertyName" ). | _BotTexture# |
Default Texture | This is a fallback texture value that will be used if the default value is not set.
|
White |
Default Value | This is the value the shader currently holds. It's also the default value that is used when a new material is created with this shader. | None |
Material Value | This is the value the node the material currently holds.Only visible if the editor is open in material mode. | None |
Input Port | Description | Type |
---|---|---|
Tex/Top | This port accepts a Texture Object which allows the use of it's texture UV parameters in the material inspector. When Mapping is set to Spherical it uses this port or the corresponding picker to represent the texture for that mapping type. When set to Cylindrical it only represents the top texture. The label of this port changes accordingly. | Sampler2D |
World Pos / Local Pos | If set, uses the connected world/local position (depending the selected Space) instead of the current world/local position. Useful when applying a vertex offset to the shader. | Float3 |
Tilling | A multiplier that controls the scale repetition of the textures being projected onto the surface. | Float2 |
Falloff | A multiplier that controls the interpolated blend between the projected planes. Higher values means harder blends while lower means softer. | Float |
Other Parameters | ||
Middle | This port accepts a Texture Object which allows the use of it's texture UV parameters in the material inspector. This is only visible when Mapping is set to Cylindrical and represents it's middle texture. | Sampler2D |
Bottom | This port accepts a Texture Object which allows the use of it's texture UV parameters in the material inspector. This is only visible when Mapping is set to Cylindrical and represents it's bottom texture. | Sampler2D |
Output Port | Description | Type |
---|---|---|
RGBA | Returns the full RGBA color of the triplanar effect. | Float4 |
R | Returns only the R component of the color value which corresponds to the X component of the triplanar effect. | Float |
G | Returns only the G component of the color value which corresponds to the Y component of the triplanar effect. | Float |
B | Returns only the B component of the color value which corresponds to the Z component of the triplanar effect. | Float |
A | Returns only the A component of the color value which corresponds to the W component of the triplanar effect. | Float |
if Normal Map is ON the output set changes to this | ||
XYZ | Returns the tangent space corrected normals of the triplanar effect. | Float3 |
X | Returns only the X component of the corrected normals. | Float |
Y | Returns only the Y component of the corrected normals. | Float |
Z | Returns only the Z component of the corrected normals. | Float |