Search Unity

[Best Tool Asset Store Award] Amplify Shader Editor - Node-based Shader Creation Tool

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.

  1. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297

    The new Parallax Node is an improvement over Unity's default parallax by using a simple approximation and deepening the height instead of raising. This means that not only does it adhere to the standards of how parallax is usually used, it also allows you to stack multiple nodes to create an iterative version using only the editor as shown in the sample provided.

    Special thanks to @kebrus, his valuable contribution helped us develop this addition much faster than we anticipated.
     
    radimoto, kebrus, Reanimate_L and 4 others like this.
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    This is awesome... I see myself using this quite often :)... I do have a question in regards to creating shaders... will I be able to create particle shaders? I have some ideas for a shader where it creates a force field
     
  3. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    I prefer Unity's implementation of both up and down since you don't have to use different shaders for different sorts of decals.
     
  4. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    There's nothing really stopping you but since usually you want to do some custom lighting for now you can only do shaders for particles that doesn't rely on something special. You could probably do a force field just fine but not unlit particles :\ at least for now.

    As far as I know, Unity's implementation is still in the editor. What do you mean "different sorts of decals"? could you elaborate?
     
  5. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Well you might want to make a hole decal like a bullet hole, or a bump like some rubble sticking out of the ground. With Unity's approach there is no problem to use the same material (or even same texture atlas) for all off these decals.

    As long as you remember that color 128 is the ground, and you use linear textures for height instead of sRGB.
     
  6. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    I see, I never understood the point of the 128 ground but I guess it does have some sense to some cases.
     
  7. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    How else would you make objects protrude from the ground if you "adhere to the standards of how parallax is usually used"?
     
  8. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    I would assume you had to choose since any other more advance technique needs to search for the height intersection in just one direction and since everyone chooses to go down instead of up it's better to adhere to that standard. Maybe it's possible to do some bias to the offset either before of after to make that shift, either in code or in the editor.
     
  9. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Who is this everyone you speak of. People who don't like to use parallax to make bumps that protrude from the base plane?

    The Unity solution is perfect, if it wasn't for the poor "step" sampling that the standard shader is doing. The only problem is that it looses some accuracy. But that doesn't matter since parallax isn't supposed to be a very accurate high resolution effect. That is what the normal map is for.
     
    Last edited: Oct 31, 2016
  10. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    I'm talking about who does implementations of the effect, not how people use it, I already admitted that I didn't realized those cases existed.
     
  11. wolfulus

    wolfulus

    Joined:
    Jun 10, 2015
    Posts:
    6
  12. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi @wolfulus, upgrade to latest ASE version and try it: I have pasted your "Wrong" shader code, reopened with ASE (latest version) and back to save.

    The final code is the following:

    Code (CSharp):
    1. // Made with Amplify Shader Editor
    2. // Available at the Unity Asset Store - http://u3d.as/y3X
    3. Shader "Automatic/AutoTexture2"
    4. {
    5.     Properties
    6.     {
    7.         _Angle1("Angle1", Range( -1 , 1)) = 0.5
    8.         _Texture1("Texture1", 2D) = "white" {}
    9.         _Normal1("Normal1", 2D) = "bump" {}
    10.         _Texture2("Texture2", 2D) = "white" {}
    11.         _Normal2("Normal2", 2D) = "bump" {}
    12.         [HideInInspector] __dirty( "", Int ) = 1
    13.         _Absolute("Absolute", Range( 0 , 1)) = 1
    14.     }
    15.  
    16.     SubShader
    17.     {
    18.         Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" }
    19.         Cull Back
    20.         CGPROGRAM
    21.         #pragma target 3.0
    22.         #pragma surface surf Standard keepalpha addshadow fullforwardshadows
    23.         struct Input
    24.         {
    25.             float3 worldNormal;
    26.             INTERNAL_DATA
    27.             float2 uv_Normal1;
    28.             float2 uv_Normal2;
    29.             float2 uv_Texture1;
    30.             float2 uv_Texture2;
    31.         };
    32.  
    33.         uniform float _Absolute;
    34.         uniform float _Angle1;
    35.         uniform sampler2D _Normal1;
    36.         uniform sampler2D _Normal2;
    37.         uniform sampler2D _Texture1;
    38.         uniform sampler2D _Texture2;
    39.  
    40.         void surf( Input input , inout SurfaceOutputStandard output )
    41.         {
    42.             float _normal =  ( ( _Absolute > 0.0 ) ? abs( WorldNormalVector( input , float3( 0,0,1 )).y ) :  WorldNormalVector( input , float3( 0,0,1 )).y ) ;
    43.             output.Normal =  ( _normal - 0.0 > _Angle1 ? UnpackNormal( tex2D( _Normal1,input.uv_Normal1) ) : _normal - 0.0 <= _Angle1 && _normal + 0.0 >= _Angle1 ? UnpackNormal( tex2D( _Normal2,input.uv_Normal2) ) : UnpackNormal( tex2D( _Normal2,input.uv_Normal2) ) ) ;
    44.             float4 tex2DNode10 = tex2D( _Texture2,input.uv_Texture2);
    45.             float3 FLOATToFLOAT3520= ( _normal - 0.0 > _Angle1 ? tex2D( _Texture1,input.uv_Texture1) : _normal - 0.0 <= _Angle1 && _normal + 0.0 >= _Angle1 ? tex2DNode10 : tex2DNode10 ) ;
    46.             output.Albedo = FLOATToFLOAT3520;
    47.         }
    48.  
    49.         ENDCG
    50.     }
    51.     Fallback "Diffuse"
    52. }
    53. /*ASEBEGIN
    54. Version=23
    55. 181;93;1410;892;1579.734;817.2533;2.536232;True;True
    56. Node;AmplifyShaderEditor.CommentaryNode;37;-617.2056,-548.932;Float;1015.414;369.8057;Variable;5;38;39;41;44;51
    57. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;1147.137,10.46317;Fixed;True;1;Fixed;Standard;Automatic/AutoTexture2;False;False;False;False;False;False;False;False;False;False;False;False;Back;On;LEqual;Opaque;0.5;True;True;0;False;Opaque;Geometry;0,0,0;0,0,0;0,0,0;0.0;0.0;0.0;0.0;0.0;0.0;0.0;0.0;0,0,0
    58. Node;AmplifyShaderEditor.WorldNormalInputsNode;38;-567.2056,-368.1263;Float
    59. Node;AmplifyShaderEditor.RangedFloatNode;44;-443.6294,-491.0042;Float;Property;_Absolute;Absolute;-1;1;0;1
    60. Node;AmplifyShaderEditor.TFHCCompareGreater;51;-61.22885,-385.404;Float;0.0;0.0;0.0;0.0
    61. Node;AmplifyShaderEditor.RangedFloatNode;21;-126.8373,215.1047;Float;Property;_Angle1;Angle1;-10;0.5;-1;1
    62. Node;AmplifyShaderEditor.RegisterLocalVarNode;41;197.209,-374.3314;Float;_normal;-100;0.0
    63. Node;AmplifyShaderEditor.TFHCIf;53;647.3637,610.7321;Float;0.0;0.0;0.0,0,0;0.0,0,0;0.0,0,0;0.0
    64. Node;AmplifyShaderEditor.SamplerNode;9;-125.3791,307.0836;Float;Property;_Texture1;Texture1;-9;None;True;0;False;white;Auto;False;Object;-1;0,0;1.0
    65. Node;AmplifyShaderEditor.SamplerNode;23;-123.3791,491.6841;Float;Property;_Normal1;Normal1;-8;None;True;0;False;bump;Auto;True;Object;-1;0,0;1.0
    66. Node;AmplifyShaderEditor.SamplerNode;24;-377.8313,913.6588;Float;Property;_Normal2;Normal2;-6;None;True;0;False;bump;Auto;True;Object;-1;0,0;1.0
    67. Node;AmplifyShaderEditor.GetLocalVarNode;27;322.3824,32.00516;Float;41
    68. Node;AmplifyShaderEditor.AbsOpNode;39;-286.3708,-370.7264;Float;0.0
    69. Node;AmplifyShaderEditor.SamplerNode;10;-380.2312,730.759;Float;Property;_Texture2;Texture2;-7;None;True;0;False;white;Auto;False;Object;-1;0,0;1.0
    70. Node;AmplifyShaderEditor.TFHCIf;52;645.7639,345.1325;Float;0.0;0.0;0.0,0,0,0;0.0,0,0,0;0.0,0,0,0;0.0
    71. WireConnection;0;0;52;0
    72. WireConnection;0;1;53;0
    73. WireConnection;51;0;44;0
    74. WireConnection;51;2;39;0
    75. WireConnection;51;3;38;2
    76. WireConnection;41;0;51;0
    77. WireConnection;53;0;27;0
    78. WireConnection;53;1;21;0
    79. WireConnection;53;2;23;0
    80. WireConnection;53;3;24;0
    81. WireConnection;53;4;24;0
    82. WireConnection;39;0;38;2
    83. WireConnection;52;0;27;0
    84. WireConnection;52;1;21;0
    85. WireConnection;52;2;9;0
    86. WireConnection;52;3;10;0
    87. WireConnection;52;4;10;0
    88. ASEEND*/
    89. //CHKSM=84F0C9213EDB0093AAE62B3D9B00F6002A20E156
     
  13. wolfulus

    wolfulus

    Joined:
    Jun 10, 2015
    Posts:
    6
    That seems to work!

    But it's strange, I just downloaded ASE from the Asset Store. Isn't it supposed to be the last version?

    EDIT: Nevermind, found the download (with order no) on ASE website.

    Thanks.
     
  14. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    No, the asset store version is not the latest. For the latest release go to Amplify website, download section (http://amplify.pt/download/) and there input your ASE Product Key or Unity Invoice Number to unlock the download.
    On beta stage they are distributing latest versions throught this way to speed up the things in front of the asset store release review timing.
     
    Last edited: Oct 31, 2016
  15. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    Hi wolfulus,

    Since we're in Beta, we are constantly adding new features and fixing bugs reported by the community. Submitting new versions to the Unity Asset Store and waiting for their approval takes some time, so we implemented our own internal download page on which we can upload new builds and you can instantly download them.

    You just need to write your ASE invoice number in the unlock text area and hit the unlock button to get access to it.

    EDIT: Benderete was faster than I on the answer! :D
     
  16. wolfulus

    wolfulus

    Joined:
    Jun 10, 2015
    Posts:
    6
    I got it.
    I'm testing the new version right now...

    Btw, I'm new to shaders :p...
    So, how do I optimize the variables on the shader? I tried reusing UVs but I can't find the nodes.
    Basically what I'm trying to do is adding multiple textures to a shader, to make it render them based on the normal angle (for automatic walls, floors, ceilings ...)

    For example, this gives me errors "Too many texture interpolators".

    Would be nice to check these type of things or automatically optimize it?

    Code (CSharp):
    1. // Made with Amplify Shader Editor
    2. // Available at the Unity Asset Store - http://u3d.as/y3X
    3. Shader "Automatic/AutoTexture3"
    4. {
    5.     Properties
    6.     {
    7.         _Angle1("Angle1", Range( -1 , 1)) = 0.66
    8.         _Angle2("Angle2", Range( -1 , 1)) = 0.33
    9.         _Texture1("Texture1", 2D) = "white" {}
    10.         _Normal1("Normal1", 2D) = "bump" {}
    11.         _Texture2("Texture2", 2D) = "white" {}
    12.         _Normal2("Normal2", 2D) = "bump" {}
    13.         _Texture3("Texture3", 2D) = "white" {}
    14.         _Normal3("Normal3", 2D) = "bump" {}
    15.         [HideInInspector] __dirty( "", Int ) = 1
    16.         _Absolute("Absolute", Range( 0 , 1)) = 1
    17.     }
    18.  
    19.     SubShader
    20.     {
    21.         Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" }
    22.         Cull Back
    23.         CGPROGRAM
    24.         #pragma target 2.0
    25.         #pragma surface surf Standard keepalpha addshadow fullforwardshadows
    26.         struct Input
    27.         {
    28.             float3 worldNormal;
    29.             INTERNAL_DATA
    30.             float2 uv_Normal1;
    31.             float2 uv_Normal2;
    32.             float2 uv_Normal3;
    33.             float2 uv_Texture1;
    34.             float2 uv_Texture2;
    35.             float2 uv_Texture3;
    36.         };
    37.  
    38.         uniform fixed _Absolute;
    39.         uniform fixed _Angle1;
    40.         uniform sampler2D _Normal1;
    41.         uniform fixed _Angle2;
    42.         uniform sampler2D _Normal2;
    43.         uniform sampler2D _Normal3;
    44.         uniform sampler2D _Texture1;
    45.         uniform sampler2D _Texture2;
    46.         uniform sampler2D _Texture3;
    47.  
    48.         void surf( Input input , inout SurfaceOutputStandard output )
    49.         {
    50.             fixed _normal =  ( ( _Absolute > 0.0 ) ? abs( WorldNormalVector( input , float3( 0,0,1 )).y ) :  WorldNormalVector( input , float3( 0,0,1 )).y ) ;
    51.             output.Normal =  ( ( _normal > _Angle1 ) ? UnpackNormal( tex2D( _Normal1,input.uv_Normal1) ) :   ( ( _normal > _Angle2 ) ? UnpackNormal( tex2D( _Normal2,input.uv_Normal2) ) :  UnpackNormal( tex2D( _Normal3,input.uv_Normal3) ) )  ) ;
    52.             output.Albedo =  ( ( _normal > _Angle1 ) ? tex2D( _Texture1,input.uv_Texture1) :   ( ( _normal > _Angle2 ) ? tex2D( _Texture2,input.uv_Texture2) :  tex2D( _Texture3,input.uv_Texture3) )  ) .xyz;
    53.         }
    54.  
    55.         ENDCG
    56.     }
    57.     Fallback "Diffuse"
    58. }
    59. /*ASEBEGIN
    60. Version=24
    61. 1927;29;1906;1014;2629.92;1571.655;1.9;True;True
    62. Node;AmplifyShaderEditor.CommentaryNode;71;-1728.686,-1144.827;Float;1021.857;339.3303;Variable;5;66;67;68;69;70
    63. Node;AmplifyShaderEditor.RangedFloatNode;70;-1619.531,-1094.827;Float;Property;_Absolute;Absolute;-1;1;0;1
    64. Node;AmplifyShaderEditor.SamplerNode;23;-842.1111,-251.8635;Float;Property;_Normal1;Normal1;-7;None;True;0;False;bump;Auto;True;Object;-1;FLOAT2;0,0;FLOAT;1.0
    65. Node;AmplifyShaderEditor.SamplerNode;9;-777.0114,-420.1627;Float;Property;_Texture1;Texture1;-8;None;True;0;False;white;Auto;False;Object;-1;FLOAT2;0,0;FLOAT;1.0
    66. Node;AmplifyShaderEditor.TFHCCompareGreater;57;-121.5283,-369.4526;Float;FLOAT;0.0;FLOAT;0.0;FLOAT3;0.0,0,0;FLOAT3;0.0,0,0
    67. Node;AmplifyShaderEditor.GetLocalVarNode;52;-654.6299,-596.3511;Float;66
    68. Node;AmplifyShaderEditor.TFHCCompareGreater;54;-510.4293,3.748003;Float;FLOAT;0.0;FLOAT;0.0;FLOAT4;0.0,0,0,0;FLOAT4;0.0,0,0,0
    69. Node;AmplifyShaderEditor.TFHCCompareGreater;56;-510.9282,142.0482;Float;FLOAT;0.0;FLOAT;0;FLOAT3;0.0,0,0;FLOAT3;0.0,0,0
    70. Node;AmplifyShaderEditor.SamplerNode;10;-1158.782,86.52209;Float;Property;_Texture2;Texture2;-6;None;True;0;False;white;Auto;False;Object;-1;FLOAT2;0,0;FLOAT;1.0
    71. Node;AmplifyShaderEditor.SamplerNode;24;-1225.082,257.5201;Float;Property;_Normal2;Normal2;-5;None;True;0;False;bump;Auto;True;Object;-1;FLOAT2;0,0;FLOAT;1.0
    72. Node;AmplifyShaderEditor.GetLocalVarNode;55;-1040.726,-77.0533;Float;66
    73. Node;AmplifyShaderEditor.SamplerNode;42;-1612.333,691.5038;Float;Property;_Normal3;Normal3;-3;None;True;0;False;bump;Auto;True;Object;-1;FLOAT2;0,0;FLOAT;1.0
    74. Node;AmplifyShaderEditor.SamplerNode;43;-1550.732,521.6036;Float;Property;_Texture3;Texture3;-4;None;True;0;False;white;Auto;False;Object;-1;FLOAT2;0,0;FLOAT;1.0
    75. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;389.5427,-763.0795;Fixed;True;0;Fixed;Standard;Automatic/AutoTexture3;False;False;False;False;False;False;False;False;False;False;False;False;Back;On;LEqual;Opaque;0.5;True;True;0;False;Opaque;Geometry;FLOAT3;0,0,0;FLOAT3;0,0,0;FLOAT3;0,0,0;FLOAT;0.0;FLOAT;0.0;FLOAT;0.0;FLOAT;0.0;OBJECT;0.0;OBJECT;0.0;OBJECT;0.0;OBJECT;0.0;FLOAT3;0,0,0
    76. Node;AmplifyShaderEditor.TFHCCompareGreater;53;-121.7285,-506.3516;Float;FLOAT;0.0;FLOAT;0;FLOAT4;0.0,0,0,0;FLOAT4;0.0,0,0,0
    77. Node;AmplifyShaderEditor.RangedFloatNode;27;-1134.743,3.644964;Float;Property;_Angle2;Angle2;-9;0.33;-1;1
    78. Node;AmplifyShaderEditor.RangedFloatNode;21;-746.8107,-506.2633;Float;Property;_Angle1;Angle1;-10;0.66;-1;1
    79. Node;AmplifyShaderEditor.AbsOpNode;69;-1417.178,-993.876;Float;FLOAT;Float
    80. Node;AmplifyShaderEditor.TFHCCompareGreater;68;-1171.099,-997.2799;Float;FLOAT;Float;FLOAT;0.0;FLOAT;0.0;FLOAT;FLOAT
    81. Node;AmplifyShaderEditor.RegisterLocalVarNode;66;-907.8296,-987.8179;Float;_normal;-100;FLOAT;0.0
    82. Node;AmplifyShaderEditor.WorldNormalInputsNode;67;-1678.686,-994.4971;Float
    83. WireConnection;57;0;52;0
    84. WireConnection;57;1;21;0
    85. WireConnection;57;2;23;0
    86. WireConnection;57;3;56;0
    87. WireConnection;54;0;55;0
    88. WireConnection;54;1;27;0
    89. WireConnection;54;2;10;0
    90. WireConnection;54;3;43;0
    91. WireConnection;56;0;55;0
    92. WireConnection;56;1;27;0
    93. WireConnection;56;2;24;0
    94. WireConnection;56;3;42;0
    95. WireConnection;0;0;53;0
    96. WireConnection;0;1;57;0
    97. WireConnection;53;0;52;0
    98. WireConnection;53;1;21;0
    99. WireConnection;53;2;9;0
    100. WireConnection;53;3;54;0
    101. WireConnection;69;0;67;2
    102. WireConnection;68;0;70;0
    103. WireConnection;68;2;69;0
    104. WireConnection;68;3;67;2
    105. WireConnection;66;0;68;0
    106. ASEEND*/
    107. //CHKSM=5A616996B1C372FE6E2E991E056244612CB180DC
    Btw, thanks for your answers @benderete and @Amplify_RnD_Rick !
     
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297
    Hello,

    Apologies for the delay, we just heard back from the Unity developers. Unfortunately, there isn't much that we can do, it's an issue on their side that will be corrected in the next release. Be sure to let us know if you ever run into any additional problems, we would be happy to help.

    Thanks!
     
  18. Waz

    Waz

    Joined:
    May 1, 2010
    Posts:
    252
    Is it possible to control ZTest yet?
     
  19. Shiyao

    Shiyao

    Joined:
    Nov 27, 2013
    Posts:
    23
    Thanks for Reply. wish they can corrected soon.
     
  20. TheAlmightyPixel

    TheAlmightyPixel

    Joined:
    Jun 21, 2014
    Posts:
    263
    @Shiyao I've also had issues with maps exported from Substance Designer. Usully changing the color mode to RGB and the bit depth to 8-bit fixes it. It doesn't have anything to do with ASE, it's an Unity issue.
     
  21. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    Hey Waz, for now it is not possible to control it. But this will most certainly be added on a later update.

    Also, guys expect a new build today.
     
  22. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    290
    Hi.

    Is it possible to access scene depth from the camera ?
    Didn't find any node that could be related to taht
     
  23. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    60
    Hi,

    Is there a toggle node? Sometimes I need one :)
     
  24. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    121
    I'm loving it! Since i'm more an artist than a programmer though i would love to have a little bit more of visual feedback on the nodes (shaderforge is a good example) if possible in the future :)

    Also i did this for a test
     
  25. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    Hi guys,

    Just uploaded a new build into the download area.

    Release Notes v0.2.4 dev 002:
    • Added 'Layered Blend' node
    • Added 'Weighted Blend' node
    • Added 'Texel Size' node
    • Merged '[VS] Vertex Color' and 'Vertex Color' nodes in order to avoid further confusions and marked the first one as deprecated
      • Node internally changes its output if it's writing to a vertex or fragment port
    • Added 'Surface Depth' node
    • Added 'Screen Depth' node
    • Fixed issue with property nodes uniform variables not taking precision into account
    As you can see on the release notes there's something of your interest in this last build. :D

    We don't have at the moment, but is easily implemented. Expect it on a near future build.

    Thank you so much for such a cool ( and meaty ) contribution. :D
    We already have a similar request on our Community Suggestions. Unfortunately we will only be able to work on this on a future Beta release.
     
    Reanimate_L likes this.
  26. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297
    Hi!

    It's fixed in the latest patch, Unity 5.4.2p3. Be sure to reimport your ASE shader(s).

    Thanks!
     
  27. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Hi Amplify Team!

    This post it's for asking a video tutorial about creating a "Megascan" shader made with "Amplify Shader".

    There is a shader for megascan made with Shaderforge (Quixel Megascans Tessellation Shader), but would be great an optimized shader made with "Amplify Shader".

    Currently it's not possible (or I can't do it) to achieve the same visual that Megascan Studio produce.

    Hope you can help with a video tutorial.

    Thanks in advance.
     
    Last edited: Nov 2, 2016
  28. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    Bought it yesterday and I really loving it so far. Great and intuitive tool and the tutorials are easy to understand (maybe get rid of the dramatic background music tho;)


    Two things:
    First I've created a simple shader yesterday, which has a public float value slider that blends two different normal maps. After opening this project today, the material in the inspector does not update when I move the slider in then shader editor. But it updates in the scene and even the thumbnail in the Assets view. Saving/updating the shader with the top left buttons doesn't help. Thoughts?
    Maybe I've made some mistake here?

    The other thing is, when I open the shader the inspector shows me in every shader a "dirty" float (that I did not add). And it does not appear in the material at all. Maybe it's supposed to be there.


    Keep up the awesome work!

    Amplify1.jpg Amplify2.jpg
     
  29. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, after last update (v0.2.4 dev 002) adding posterize node raise the following error:

    NullReferenceException: Object reference not set to an instance of an object
    AmplifyShaderEditor.InputPort.UpdateInternalData () (at Assets/AmplifyShaderEditor/Plugins/Editor/Wires/InputPort.cs:60)
    AmplifyShaderEditor.InputPort..ctor (Int32 nodeId, Int32 portId, WirePortDataType dataType, System.String name, Boolean typeLocked, Int32 orderId, MasterNodePortCategory category) (at Assets/AmplifyShaderEditor/Plugins/Editor/Wires/InputPort.cs:30)
    AmplifyShaderEditor.ParentNode.AddInputPort (WirePortDataType type, Boolean typeLocked, System.String name, Int32 orderId, MasterNodePortCategory category) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ParentNode.cs:317)
    AmplifyShaderEditor.PosterizeNode.CommonInit (Int32 uniqueId) (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ImageEffects/PosterizeNode.cs:22)
    AmplifyShaderEditor.ParentNode..ctor () (at Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/ParentNode.cs:167)
    AmplifyShaderEditor.PosterizeNode..ctor ()
    UnityEngine.ScriptableObject:CreateInstance(Type)
    AmplifyShaderEditor.ParentGraph:CreateNode(Type, Boolean, Int32, Boolean) (at Assets/AmplifyShaderEditor/Plugins/Editor/Graphs/ParentGraph.cs:1444)
    AmplifyShaderEditorWindow:CreateNode(Type, Vector2) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:2779)
    AmplifyShaderEditorWindow:OnContextPaletteNodeCreate(Type, String) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:2722)
    AmplifyShaderEditor.PaletteParent:Draw(Rect, Vector2, Int32) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/PaletteParent.cs:200)
    AmplifyShaderEditor.ContextPalette:Draw(Rect, Vector2, Int32) (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/Palette/ContextPalette.cs:52)
    AmplifyShaderEditorWindow:OnGUI() (at Assets/AmplifyShaderEditor/Plugins/Editor/Menu/AmplifyShaderEditorWindow.cs:2558)
    UnityEditor.DockArea:OnGUI()

     
  30. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, with the latest update of ASE i have replicated your example and I have the following behaviour :
    - Moving the slider on canvas editor change the material thumbail and the scene view, but not material inspector.
    - Saving changes with top left button changes all ok.
    - Updating changes with the second top left button changes all ok.

    If saving changes with top left button doesn't work check if you have the latest ASE version (not from asset store, the latest version from the aplify website).

    Really I think that the correct behaviour would be that if you don't save the changes (and you have not the update button activated) they should not be reflected in material or icon, or on the scene. But actually you can see changes in scene and icon without save.

    On the other hand, the dirty property is automatically added by ASE for tracking and sync some changes on material inspector.
     
    nipoco likes this.
  31. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    Already taking a look at this. Will upload a fix asap!

    EDIT: Already uploaded a build with this issue fixed! Sorry the any trouble it may have caused!
     
    Last edited: Nov 3, 2016
    benderete likes this.
  32. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    We will definitely take a look at this!


    Hi nipoco,
    First of all, thank you so much for buying ASE! We really hope you have a pleasant experience with it!
    What I noticed from your shot is that your Float Slider is set as a Constant. What this means is what is being saved on the shader is the numerical value set on your slider.
    For the slider to affect the material in real time you have two choices:
    • Click on the Live Mode button upload_2016-11-3_10-26-8.png , which is the second button on the top left corner. With Live Mode active each change you make on the slider value will force ASE to save the shader and thus updating the material
    • You can set the Float Slider from Constant to Property which can be done on its Node Properties window by hitting the 'Parameter Type' dropdown and selecting property. After that you just need to hit the Update button once to save it on the shader and then you'll be good to go.
    I would recommend the second choice which is much faster. Having it as a property means that you're not rewriting the shader with each value change but only updating its property value on the material

    Like benderete already explained this is an internal property we use to synchronize Material Inspector and ASE Graph.

    Please let us know if you have further questions or run across any issues.

    Also, all feedback is appreciated!
     
    nipoco likes this.
  33. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    Hey thanks for the fast reply and detailed explanation. Great support!
    And Benderete, thanks for your help too.

    I checked that. The node is set to "Property". The "constant" one in the screenshot refers to the color node.
    The Live Mode works and updates the shader in the material inspector too.
    Saving the shader as Benderete suggested doesn't work here. Without the Live Mode the shader updates in the scene and in the thumbnail, but not in the material inspector.

    Now here is the thing.. When I select the sphere with that material in the scene, move the slider in the material inspector and then go back to the shader editor, it updates the material in the inspector as well, when I move the slider in node.

    It's not a real issue tho. Just something that confused me. Eventually I use the slider in the material editor anyways.
    Overall it works very well and has been a smooth journey so far.

    Thanks again for your fast help!
     
  34. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    290
    I'm sorry I wasn't very clear in my comment, I wanted to say "Depth Blend". Something to use for instance to do soft particles. Is there a node like that ?

    Anyway, thanks for the update
     
  35. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    121
    This is happening with the new update ^^ since it melts my brain i can't do much else atm. No errors on the console.
     
  36. eafreak

    eafreak

    Joined:
    Jan 28, 2014
    Posts:
    5
    Hello, is it possible to create a Unity Terrain shader?
     
  37. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    We don't have a 'Depth Blend' node. You can however calculate the depth difference ( needed for soft particles ) using the nodes we've added on this last build and the 'Screen Position' node.
    Something like this:

    upload_2016-11-3_17-37-28.png


    This is quite bizarre. This was an import issue.
    Is it possible for you to try one of these suggestions?
    • Close the ASE window and re-open it
    • Right mouse click on the 'AmplifyShaderEditor' folder on the project view and select Reimport
    • Delete the 'AmplifyShaderEditor' folder and reimport the AmplifyShaderEditor.unitypackage into your project
    In the meantime we'll investigate why the import failed.
    Can you let us know which ASE version you previously had so we can try to replicate the issue on our end?

    Hi eafreak, for now we do not fully support for Unity Terrain shaders but it is already registered on our roadmap.
     
    Last edited: Nov 3, 2016
  38. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    121
    Done all 3, still same problem but this popped out (the two alerts are not related):

    The previous version i was using is the one currently on the asset store, i've bought ASE last week.
     
  39. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    Which Unity version are you using? Somehow the shader used on the lines is not compiling correctly.

    EDIT: For ASE to work correctly you should be using v5.4 or higher.
     
  40. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297
    Supporting Alloy Shaders

    Stage 1

    Let’s talk Injection Headers and Alloy Shaders. Most users are not aware that you can take advantage of some Alloy features using Unity surface shaders without needing to convert your shaders manually. It’s extremely quick to setup, you could start using the Amplify Shader Editor with Alloy today!


    Steps:
    1. In the Project tab, navigate to the "Alloy/Shaders/Unity" folder.
    2. Right click on one of the files inside the folder and select "Show in explorer" (or Finder on OSX).
    3. In the window, select all the "*.cginc" files, and copy them.
    4. Close the window and click back into the Unity editor.
    5. In the Project tab, navigate to the folder containing a compatible Unity surface shader.
    6. Right click on the shader and select "Show in explorer" (or Finder on OSX.
    7. Paste the headers in the same folder as the shader.
    8. Close the window, click back into the Unity editor, and wait for the shader to automatically recompile.
    With these simple steps, your Unity surface shaders, or Amplify Shader Editor surface shaders, can now have Alloy's area lights, colored light cookies, BRDF, and much more, all thanks to code Injection Headers.

    NOTE: You will need to repeat these steps every time you download a new version of Alloy. Your materials will be limited to the channels available in the standard surface shader, this will be improved in Stage 2.

    As Josh put it, code Injection works because of how Unity’s shader system resolves “#include” directives for handling headers. If you use something like “#include “myHeader.cginc” with just the filename and no path then Unity will first look in the same directory as the shader file, and then search the editor’s hidden include directory. So basically, if the shader uses an editor header (eg. “UnityCG.cginc”) you can trick that shader into using a customized local version by copying the header into the same directory as the shader. Then you can simply modify that local copy and the shader will use that instead. This will work for any shader code, even the Standard shader and the generated output of a Unity surface shader.


    Stage 2

    As you may be aware, the Amplify Shader Editor BETA is currently limited to Surface Shaders. Future ASE versions will include several additional shader types, along with better support for custom types, custom shader GUI, and platform specific samples. Alloy is one of the main packages that we intend to support, we will be working close with the developers in order to provide the best experience possible.

    Stay tuned!

    Alloy Physical Shader Framework Shaders - Product Page
    Amplify Shader Editor - Product Page
     
    n00body and benderete like this.
  41. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    121
    Ahh that explains it, i'm on 5.3. ^^ I had no previous problems with it so i just assumed it worked in 5.3, sorry.
     
  42. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    398
    We've just added a new build which fixes the wires issue on 5.3 but we highly recommend you to use v5.4 when using ASE.
    Please let us know if you have additional issues.

    Here are the full release notes for the new build on the download area.

    Release Notes v0.2.4 dev 003:
    • Added Texture Reference dropdown to 'Texture Coordinates' node
    • Added Render Path dropdown in Master Node
    • Tweaked 'View Dir' node so you're able to choose between getting the result in tangent or world space
    • Tweaked 'World Space Light Dir' to no longer use internal input port data when nothing is connected, instead worldPos is automaticaly fed into it
    • Added Unity version check for wires shader and fix compatibility issues
    • Added Normalize toggle into 'Screen Position' node
    • Community Node additions
      • Tobias Pott
        • Added 'Swizzle' node
     
  43. TechDeveloper

    TechDeveloper

    Joined:
    Sep 5, 2016
    Posts:
    75
    Nope.
     
  44. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    121
    Working perfectly now, you guys are on the ball!

    I'll update on 5.4 as soon as possible though, in the mean time i'll try to find the time to make some other cool shader to show ;)
     
  45. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Could you please explain to us why not?
     
  46. TechDeveloper

    TechDeveloper

    Joined:
    Sep 5, 2016
    Posts:
    75
    Sorry I dont work for them I just know because I asked the same question a few days ago :(

    I'm waiting too. shader forge supports terrains though but yeah the price is a bit too much.
     
  47. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297
    The Amplify Shader Editor needs to use a few specific terrain properties that it currently does not have access to. However, terrain support is high on our task list, we will post here as soon as we have any new developments.

    We are registering all requests, we will contact you directly as soon as it's available.

    Thanks!
     
    mkgm likes this.
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    I saw the new header tag update... does that mean I can make alloy based shaders?
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,297
    Currently, you can take advantage of Alloy's area lights, colored light cookies, BRDF, and much more, thanks to code Injection Headers; keep in mind that it's limited to existing Surface Shader channels. Future ASE versions will include additional capabilities, more on that later ;)
     
  50. mkgm

    mkgm

    Joined:
    Apr 10, 2015
    Posts:
    134
    Arganth likes this.