Displacement Shader to Vector: Difference between revisions

From Terragen Documentation from Planetside Software
Jump to navigation Jump to search
No edit summary
Redmaw (talk | contribs)
Updated descriptions and added example images.
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''Node Description and Purpose:'''<br />
<div style="float:right; border-style:solid; padding:20px"><categorytree mode=pages hideroot=off>Convert</categorytree></div>
The Displacement shader to vector node extracts the displacement generated by the connected shader and returns it as a vector, which can then be used by other function nodes.


In general, shaders may displace in any direction, so displacement is a vector. Note that if you connect this node to a function that expects a scalar input, a scalar will be generated from the length (magnitude) of the vector according to Terragen's conversion rules. Be aware that this may not give you the results you expect if the displacement is negative, because the resulting scalar will always be positive or 0. In many cases it is better to use [[Displacement_Shader_to_Scalar]].
[[File:DisplacementShaderToVector_00_GUI.png|none|470px|Displacement Shader to Vector]]


See also: [[Displacement_Shader_to_Scalar]]


__TOC__


'''Node Type:''' Function<br />


==Overview==
The Displacement shader to vector node extracts the displacement generated by the shader or function nodes assigned to its Main input, and returns it as a vector.
In general, shaders may displace in any direction, so displacement is a vector. Note that if the output of this node connects to a function that expects a scalar input, a scalar will be generated from the length (magnitude) of the vector according to Terragen's conversion rules (see Node Input Type Conversion). Be aware that this may not give you the results you expect if the displacement is negative, because the resulting scalar will always be positive or 0. In some cases Displacement Shader to Scalar may be more suitable.


'''Settings:'''<br />
This node has no other settings apart from the Input node.
This node has no other settings apart from the Input node.
'''Settings:'''
*'''Name:''' This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Displacement shader to vector nodes in a project.
*'''Enable:''' When checked, the node is active and the conversion operation will take place. When unchecked the values assigned to its Main Input, if any, are passed through, otherwise a value of 0 is passed through.
== Fun with Displacement Shader to Vector ==
The Displacement Shader to Vector node performs the task of converting displacement information to vector information.  While the node has no parameters per se, its use is critical in order to harness the power of vector displacement, which provides a method to import/export vector data between Terragen and other 3D software packages, such as Zbrush. 
In the example images below, notice the overlapping features of the terrain which has been sculpted using Terragen’s procedural noise functions, like the Voronoi 3D diff scalar and the Power fractal shader v3 nodes.  Following the last node that displaces the terrain, a Displacement shader to vector node is used to direct the displacement data to a Default shader’s luminosity channel.  An image of the displacement data is rendered and saved as an EXR file, which can then be loaded back into Terragen, or even into another 3D software package for further manipulation. 
[[File:DispShdr2Vector_04_NodeNetwork.jpg|none|800px|A Node Network view of the Displacement Shader to Vector node supplying the Default shader with displacement information.]]
Often when a complex network of displacements is used to shape the terrain, render times can actually be reduced by rendering and saving the displacements to an EXR file, and then assigning that image to a Vector Displacement Shader.
[[File:DispShdr2Vector_01_Compare.JPG|none|800px|A comparison of render times between a regularly displaced terrain, and a terrain displaced with the Vector Displacement Shader.]]
In addition, the EXR image can be used multiple times in the project, re-positioning, rotating, and resizing it via the Vector Displacement Shader’s parameters or Transform Merge shaders.
{|
|-
| [[File:DispShdr2Vector_02_MultiVector.JPG|none|800px|An EXR file used as a vector displacement can be used multiple times in a project.]]
|-
| [[File:DispShdr2Vector_03_NodeNetwork.jpg|none|800px|Node Network view illustrating the use of one EXR image to create multiple terrain features.]]
|}
For more information about vector displacement pipelines click on the links below.
<ul>
[[Vector_Displacement_-_Terragen_to_Zbrush_and_back_again | Vector Displacement - Terragen to Zbrush and back again tutorial.]] <br /n>
[[Vector_Displacement_Shader | Vector Displacement Shader documenation]]
</ul>


<br /n>


[[Category:Convert]]
[[Category:Convert]]

Latest revision as of 23:35, 14 March 2022

Displacement Shader to Vector
Displacement Shader to Vector



Overview

The Displacement shader to vector node extracts the displacement generated by the shader or function nodes assigned to its Main input, and returns it as a vector.

In general, shaders may displace in any direction, so displacement is a vector. Note that if the output of this node connects to a function that expects a scalar input, a scalar will be generated from the length (magnitude) of the vector according to Terragen's conversion rules (see Node Input Type Conversion). Be aware that this may not give you the results you expect if the displacement is negative, because the resulting scalar will always be positive or 0. In some cases Displacement Shader to Scalar may be more suitable.

This node has no other settings apart from the Input node.


Settings:

  • Name: This setting allows you to apply a descriptive name to the node, which can be helpful when using multiple Displacement shader to vector nodes in a project.
  • Enable: When checked, the node is active and the conversion operation will take place. When unchecked the values assigned to its Main Input, if any, are passed through, otherwise a value of 0 is passed through.


Fun with Displacement Shader to Vector

The Displacement Shader to Vector node performs the task of converting displacement information to vector information. While the node has no parameters per se, its use is critical in order to harness the power of vector displacement, which provides a method to import/export vector data between Terragen and other 3D software packages, such as Zbrush.


In the example images below, notice the overlapping features of the terrain which has been sculpted using Terragen’s procedural noise functions, like the Voronoi 3D diff scalar and the Power fractal shader v3 nodes. Following the last node that displaces the terrain, a Displacement shader to vector node is used to direct the displacement data to a Default shader’s luminosity channel. An image of the displacement data is rendered and saved as an EXR file, which can then be loaded back into Terragen, or even into another 3D software package for further manipulation.

A Node Network view of the Displacement Shader to Vector node supplying the Default shader with displacement information.
A Node Network view of the Displacement Shader to Vector node supplying the Default shader with displacement information.


Often when a complex network of displacements is used to shape the terrain, render times can actually be reduced by rendering and saving the displacements to an EXR file, and then assigning that image to a Vector Displacement Shader.

A comparison of render times between a regularly displaced terrain, and a terrain displaced with the Vector Displacement Shader.
A comparison of render times between a regularly displaced terrain, and a terrain displaced with the Vector Displacement Shader.


In addition, the EXR image can be used multiple times in the project, re-positioning, rotating, and resizing it via the Vector Displacement Shader’s parameters or Transform Merge shaders.

An EXR file used as a vector displacement can be used multiple times in a project.
An EXR file used as a vector displacement can be used multiple times in a project.
Node Network view illustrating the use of one EXR image to create multiple terrain features.
Node Network view illustrating the use of one EXR image to create multiple terrain features.


For more information about vector displacement pipelines click on the links below.