Unity Products:Amplify Shader Editor/Append and Unity Products:Amplify Shader Editor/Billboard: Difference between pages

From Amplify Creations Wiki
(Difference between pages)
Jump to navigation Jump to search
m (1 revision imported)
 
ampwiki>Amplify RnD Rick
No edit summary
 
Line 1: Line 1:
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]


== Append Node ==
== Billboard Node ==


The Append node ''( shortcut: V key )'' outputs a vector which results of the combination of channels from different input sources.
The Billboard node will rotate vertex data ( position + normal ) to align object's axis to current camera.
<br/>
<br/>This node is a bit different from all others as it injects the necessary code into the vertex body and writes directly on the vertex position and normal. It outputs a value of 0 so it can be connected directly to a vertex port ( only if that port is a relative vertex offset ) or it can be used in an [[Unity_Products:Amplify_Shader_Editor/Add|Add]] node so further vertex operations can be placed.
Input ports amount is both dependent on the chosen [[#paramOutputType|Output Type]] and incoming data type.
<br/>Billboards can be set through its [[#paramType|Type]] either as '''Cylindrical''' where only the object '''X''' and '''Z''' axis are aligned with the camera ( useful when rendering trees ) or as '''Spherical''' where all axis are aligned.
P.e. if ''Output Type'' is set to ''Vector3'' then by default it will show three input ports ''X'',''Y'',''Z''. When connecting a ''Vector2'' data type to input port ''X'', it will automatically change its name to ''XY'', the next port will also be renamed to ''Z'' and hide the third unnecessary port.
<br/>Also, through the [[#paraIgnoreRotation|Ignore Rotation]] parameter an object's initial rotation can be either completely ignored and overridden, or it can be used as a delta rotation over the billboard final calculations.


'''NOTE:''' Automatic port usage only is done if next channels are unoccupied. P.e. if connecting a Vector3 type data into an Append node's X input port which has an already created connection on its Z input port will only occupy X and Y channels.
'''NOTE:''' Billboard node should only be connected to vertex ports.


<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/AppendNode.jpg">
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/BillboardNode.jpg">
<br/><font size="1">Nodes used:  
<br/><font size="1">Nodes used:  
[[Unity_Products:Amplify_Shader_Editor/Texture_Object|Texture Object]],  
[[Unity_Products:Amplify_Shader_Editor/Texture_Sample|Texture Sample]],
[[Unity_Products:Amplify_Shader_Editor/Billboard|Billboard]],  
[[Unity_Products:Amplify_Shader_Editor/Vertex_Position|Vertex Position]],  
[[Unity_Products:Amplify_Shader_Editor/Vertex_Position|Vertex Position]],  
[[Unity_Products:Amplify_Shader_Editor/Append|Append]],  
[[Unity_Products:Amplify_Shader_Editor/Scale|Scale]],  
[[Unity_Products:Amplify_Shader_Editor/Texture_Sample|Texture Sample]],
[[Unity_Products:Amplify_Shader_Editor/Add|Add]]
[[Unity_Products:Amplify_Shader_Editor/Vertex_Normal|Vertex Normal]],
[[Unity_Products:Amplify_Shader_Editor/Lerp|Lerp]]  
</font>
</font>


Line 24: Line 23:
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value
|-
|-
| id="paramOutputType" | Output Type
| id="paramType" | Type
| Defines resulting vector data type. This option has a direct impact on the amount of available inputs to inject new data.
| Defines which of the object's axis should be aligned with the camera
The available output types are:
* '''Cylindrical:''' Only aligns object x and Z axis with camera
* '''Vector2:''' 2-channel data type
* '''Spherical:''' Completely aligns object axis with camera
* '''Vector3:''' 3-channel data type
| Cylindrical
* '''Vector4:''' 4-channel data type
|-
* '''Color:''' 4-channel data type
| id="paramIgnoreRotation" | Ignore Rotation
| 0
| If turned off, the object initial rotation will be used as a delta rotation on top of the billboard final calculated rotation.
On the other way, if turned on the object initial rotation will be completely ignored and the final rotation will be only be set by the billboard result.
| False
|}
|}


{| class="wikitable" style="width: 100%;"
|-
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type
|-
<!--| [ X &#124; Y &#124; Z &#124; W ] -->
| X, Y, Z or W
|Data to be appended into new ''Vector'' output.
Amount and name of input ports is both dependent on current ''Output Type'' and incoming data type.
| Vector4<sup id="ref1">[[#anchor|[1]]]</sup>
|}
----
# <span id="anchor1">'''[[#ref1|^]]'''</span> Port automatically adapts to all connection types except Matrices and [[Unity Products:Amplify Shader Editor/Texture Object|Sampler]] types.


[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]
[[Category:Nodes]][[Category:Vector Operators]]
[[Category:Nodes]][[Category:Miscellaneous]]

Revision as of 15:26, 2 November 2017

Back to Node List

Billboard Node

The Billboard node will rotate vertex data ( position + normal ) to align object's axis to current camera.
This node is a bit different from all others as it injects the necessary code into the vertex body and writes directly on the vertex position and normal. It outputs a value of 0 so it can be connected directly to a vertex port ( only if that port is a relative vertex offset ) or it can be used in an Add node so further vertex operations can be placed.
Billboards can be set through its Type either as Cylindrical where only the object X and Z axis are aligned with the camera ( useful when rendering trees ) or as Spherical where all axis are aligned.
Also, through the Ignore Rotation parameter an object's initial rotation can be either completely ignored and overridden, or it can be used as a delta rotation over the billboard final calculations.

NOTE: Billboard node should only be connected to vertex ports.


Nodes used: Texture Sample, Billboard, Vertex Position, Scale, Add

Node Parameter Description Default Value
Type Defines which of the object's axis should be aligned with the camera
  • Cylindrical: Only aligns object x and Z axis with camera
  • Spherical: Completely aligns object axis with camera
Cylindrical
Ignore Rotation If turned off, the object initial rotation will be used as a delta rotation on top of the billboard final calculated rotation.

On the other way, if turned on the object initial rotation will be completely ignored and the final rotation will be only be set by the billboard result.

False


Back to Node List