http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Object_To_World&feed=atom&action=historyUnity Products:Amplify Shader Editor/Object To World - Revision history2024-03-29T06:14:23ZRevision history for this page on the wikiMediaWiki 1.40.1http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Object_To_World&diff=413&oldid=prevAmplifyWiki: 1 revision imported2023-12-02T00:06:11Z<p>1 revision imported</p>
<table style="background-color: #fff; color: #202122;" data-mw="interface">
<tr class="diff-title" lang="en">
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">← Older revision</td>
<td colspan="1" style="background-color: #fff; color: #202122; text-align: center;">Revision as of 00:06, 2 December 2023</td>
</tr><tr><td colspan="2" class="diff-notice" lang="en"><div class="mw-diff-empty">(No difference)</div>
</td></tr></table>AmplifyWikihttp://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Object_To_World&diff=412&oldid=prevampwiki>Amplify RnD Rick at 10:39, 16 September 20212021-09-16T10:39:48Z<p></p>
<p><b>New page</b></p><div>[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
== Object To World Node ==<br />
<br />
The Object To World node transforms a position or direction specified on its [[#paramInput|''Input'']] from Object/Local space to World Space.<br />
This node will also return the current game object's actual position on the world if ''Input'' is left unconnected and its default internal value of (0,0,0,1) is used.<br/><br />
<br />
<img class="responsive-img" src="http://wiki.amplify.pt/images/NodeDetail/ObjectToWorldNode.gif"><br />
<br/><font size="1">Nodes used: <br />
[[Unity_Products:Amplify_Shader_Editor/Object_To_World|Object To World]]<br />
</font><br />
<br />
<br />
<br/>'''NOTE 1:''' When connecting a Vector 3 type data into ''Input'', ASE will automatically cast it into a Vector4 type and set its w channel to 0, since it's the cast default behavior across all nodes. <br />
<br/>This leads to incorrect results if that vector represents a position since the w channel value is important when doing a positional space transform. On these situations a new w channel with a value 1 should be appended to the original position vector via the [[Unity_Products:Amplify_Shader_Editor/Append|Append]] node and its result should then be used on the Object To World node.<br />
<br />
For the inverse World To Object transform please check the [[Unity_Products:Amplify_Shader_Editor/World_To_Object|World To Object]] node.<br />
<br />
'''NOTE 2:''' We advise using either the [[Unity_Products:Amplify_Shader_Editor/Transform_Position|Transform Position]] or [[Unity_Products:Amplify_Shader_Editor/Transform_Direction|Transform Direction]] as they are easier to use and setup all available space transform switch.<br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|-<br />
! style="width: 10%;" | Node Parameter !! Description !! style="width: 10%;" | Default Value<br />
|- style="background: #e5e5e5;" |<br />
| id="paramInput" | ''Input''<br />
| Value in object/local space to be transformed into world space. Only visible if the respective input port is not connected.<br />
| 0,0,0,1<br />
|}<br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|- <br />
! style="width: 10%;" | Input Port !! Description !! style="width: 10%;" | Type<br />
|- <br />
| id="paramInput" | ''Input''<br />
| Value in object/local space to be transformed into world space.<br />
| Float4<br />
|}<br />
<br />
{| class="wikitable" style="width: 100%;"<br />
|- <br />
! style="width: 10%;" | Output Port !! Description !! style="width: 10%;" | Type<br />
|- <br />
| XYZW<br />
| Returns the transformed value in world space.<br />
| Float4<br />
|- <br />
| X<br />
| Returns only the X component of the transformed value in world space.<br />
| Float<br />
|- <br />
| Y<br />
| Returns only the Y component of the transformed value in world space.<br />
| Float<br />
|- <br />
| Z<br />
| Returns only the Z component of the transformed value in world space.<br />
| Float<br />
|- <br />
| W<br />
| Returns only the W component of the transformed value in world space.<br />
| Float<br />
|}<br />
<br />
[[Unity_Products:Amplify_Shader_Editor/Nodes | Back to Node List]]<br />
[[Category:Nodes]][[Category:Object Transform]]</div>ampwiki>Amplify RnD Rick