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. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    463
    Hi, thank you for looking into this. I made the simplest shader possible and I still have the same problem (black texture).

    I also upgraded to Unity 5.6 but that didnt fix it either.

    Here is the test shader:



    Here is the original sprite object with instancing disabled (new option since 5.6?):



    Simply turning on instancing in the shader's properties messes things up now. There are no instances created yet and the original sprite is now black. On 5.5 the original sprite kept its texture but also turned black after creating a certain amount of GPU instances (dont remember the number).


    And here is what it looks like with a bunch of GPU instances active, the original one is on the bottom left corner:


    Here is the line of code I use to spawn the instances:
    Code (CSharp):
    1. Graphics.DrawMeshInstanced (mesh, 0, mat, matrix, matrix.Length, null, castShadows , true, 0, Camera.main);
    mat = the material of the original
    matrix = a matrix4x4 array containing the result of this code for each instace:
    Code (CSharp):
    1. newTransform = Instantiate(prefab, new Vector3(x + UnityEngine.Random.Range (xRandomMin, xRandomMax) + alternateValue, y + UnityEngine.Random.Range (yRandomMin, yRandomMax), 0), Quaternion.identity, parent);
    castShadows = ShadowCastingMode.On;

    Thanks for your help!

    Edit: In case its relevent, here is how I generate the mesh for the sprite:

    Code (CSharp):
    1.     Mesh SpriteToMesh(Sprite sprite) {
    2.         Mesh newMesh = new Mesh ();
    3.         newMesh.vertices =  Array.ConvertAll(sprite.vertices, i => (Vector3)i);
    4.         newMesh.uv = sprite.uv;
    5.         newMesh.triangles = Array.ConvertAll (sprite.triangles, i => (int)i);
    6.  
    7.         return newMesh;
    8.     }
     
    Last edited: Apr 7, 2017
  2. nipoco

    nipoco

    Joined:
    Sep 1, 2011
    Posts:
    2,008
    If you don't mind, I have another question.

    I have a glass material with refraction created in ASE. When I have another transparent material in front of it, the material in the front of that glass still gets refracted (yes the glass sphere is in the background)
    Is this a limitation, or can this be sorted in some way?

    Refraction.png

    Edit:
    Nevermind I found it. I had to change the render queue of the glass material to transparent(3000). Now it works
     
    Last edited: Apr 8, 2017
    hopeful likes this.
  3. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    I have made a simple (and dirty) approach to holographic shader.
    Attached go a couple of screenshots, the shader and the unity package with a scene with the shader.
    Feel free of use, improve it, etc.
     

    Attached Files:

    KRGraphics, nipoco and hopeful like this.
  4. pro-bchevalier

    pro-bchevalier

    Joined:
    May 30, 2013
    Posts:
    46
    Hello @Amplify_Ricardo and @Amplify_RnD_Rick , I am getting this error recently(basically after I updated to latest version of ASE) when building for iOS:

    Shader error in 'LOOT/overlay_layered_planar_transp': Duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 101 (on metal)

    Compiling Fragment program with SHADOWS_DEPTH UNITY_PASS_SHADOWCASTER
    Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_NO_SCREENSPACE_SHADOWS UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA


    If I remove Metal from the supported Graphics APIs, then I won't have the error, but we need to support Metal for our project.
    My Rendering Platforms for the shader are set accordingly everytime.
    Is this a bug? Or am I doing something wrong?

    Thanks!
    ben
     
  5. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    526
    Thank you for your shot.

    What is happening is a poor choice of words in our end that created confusion on yours.
    Texture Samples cannot be GPU Instanced, only Float, Vectors and Color Nodes by setting their type to Instanced Property.

    On Texture Sample nodes, Instanced means that you'll be using an already declared Texture Sampler node to prevent multiple fetches, not GPU Instancing.
    You may notice that choosing Instance, its properties change and on the Reference dropdown you'll select the Texture Sample you want use as reference.

    Now that we see, it was a really poor choice of words. We'll change its name from Instance to maybe Reference on our next update.
    Apologies for this being confusing.



    Thank you for reporting this issue.
    We were already been able to replicate on our end and are currently checking what might be happening.
     
    Last edited: Apr 10, 2017
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    That's pretty cool, thank you for sharing!

    We would love to add it to the community sample collection.
     
    benderete likes this.
  7. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    463
    Does this mean it should work with the texture sample node set to type: Object? Cause it doesn't. I get the exact same results.

    I ran further tests and it works fine if I try instancing a cube object instead. The texture gets displayed properly. It seems like there may be something going on in between the material and the mesh I am creating for the sprite. I know sprites can't be instanced as is but I am creating a mesh for it and applying the material. I am not sure at what point things are breaking.

    Again here is the code I use to create the mesh:
    Code (CSharp):
    1.     Mesh SpriteToMesh(Sprite sprite) {
    2.         Mesh newMesh = new Mesh ();
    3.         newMesh.vertices =  Array.ConvertAll(sprite.vertices, i => (Vector3)i);
    4.         newMesh.uv = sprite.uv;
    5.         newMesh.triangles = Array.ConvertAll (sprite.triangles, i => (int)i);
    6.         return newMesh;
    7.     }

    I tried applying the same material to a 3D object and the texture is displayed but for some reason it doesnt want to do it when applied to the mesh I create from the sprite's data.

    Anyone has some insight that could explain this?

    I understand this is the ASE support forum but since I am not sure were its breaking I am hoping you guys can at least confirm if this should work with ASE.

    Thank you.
     
  8. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    526
    EDIT:
    This is quite strange indeed. On our sample we are also using a Texture Sampler node, we tried activating the new 'Enable Instancing' toggle and worked as it should.
    Is it possible for you to share a small project with us via support@amplify.pt so we can do a few tests on it and figure out what might be happening?

    We also uploaded a new build into our website fixing the Metal IOs issue among others.
    Here are the full release notes:

    Release Notes v0.6.1 dev 04:
    • Improvements:
      • Renaming 'Texture Sampler' Type property Instance to Reference and prevent confusion with GPU Instanced properties
    • Fixes:
      • Fixed issue on unnecessary saves on Live mode
        • Also increased Inactivity time from 0.5s to 1s
      • Fixed issues on some node interactions not being detected by live mode ( and thus not being flagged to save )
      • Fixed issue on 'Rotator' node not correctly generating local values according to vertex/frag
      • Fixed issue on 'Texture Coordinates' node when defining its Inputs with Tessellation active
      • Fixed issue with custom Shadow Caster on Metal IOs
      • Fixed small typo on Tessellation Shader Model warning message
     
    Last edited: Apr 10, 2017
  9. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,016

    This is incredible... I can also see this being used for "Ghost" effects
     
  10. pro-bchevalier

    pro-bchevalier

    Joined:
    May 30, 2013
    Posts:
    46
    Amplify_RnD_Rick likes this.
  11. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Of course, feel free to add it
     
    Amplify_Ricardo likes this.
  12. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Yes. From it can be made force shields too.
     
  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,016
    ASE is gonna be a real powerhouse... once skin shader models are added, then I can really go to town. I now have a setup that is similar to Paragon, which uses an ID map for placing detailed normal maps for tiling.
     
    Last edited: Apr 11, 2017
    Amplify_Ricardo likes this.
  14. Shinobi1507

    Shinobi1507

    Joined:
    Sep 8, 2010
    Posts:
    213
    Hello, I know pro-bchevalier already reported a similar issue, just wanted to make my log available if it helped. It happens in my Unity Cloud build and only happens on Linux and Mac (A real shame). I made a build of a test scene to see if it was just my project but the same thing happened. Here is the log from the test scene. Thanks in advance.

    Code (csharp):
    1. 4222: [Unity] Shader compiler: internal error compiling shader snippet type=0 platform=18: Protocol error - failed to read correct magic number
    2. 4223: [Unity] Shader compiler: UnityShaderCompiler compiler executable disappeared on thread 9793536, restarting
    3. 4224: [Unity] Launched and connected shader compiler UnityShaderCompiler after 0.09 seconds
    4. 4225: [Unity] Compiled shader 'ASESampleShaders/SubstanceExample' in 6.52s
    5. 4226: [Unity]     glcore (total internal programs: 78, unique: 38)
    6. 4227: [Unity]     vulkan (total internal programs: 75, unique: 35)
    7. 4228: [Unity] Shader error in 'ASESampleShaders/SubstanceExample': Internal error communicating with the shader compiler process
    8. 4229: [Unity] (Filename: ASESampleShaders/SubstanceExample Line: -1)
    9. 4230: [Unity] Shader error in 'ASESampleShaders/RefractedShadows': Duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 128 (on vulkan)
    10. 4231: [Unity] Compiling Vertex program with SHADOWS_DEPTH UNITY_PASS_SHADOWCASTER
    11. 4232: [Unity] Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
    12. 4233: [Unity] (Filename: ASESampleShaders/RefractedShadows Line: 128)
    13. 4234: [Unity] Shader error in 'ASESampleShaders/RefractedLight': Duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 128 (on vulkan)
    14. 4235: [Unity] Compiling Vertex program with SHADOWS_DEPTH UNITY_PASS_SHADOWCASTER
    15. 4236: [Unity] Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_COLORSPACE_GAMMA
    16. 4237: [Unity] (Filename: ASESampleShaders/RefractedLight Line: 128)
    17. 4238: [Unity] Shader error in 'ASESampleShaders/ReflectRefractSoapBubble': Duplicate system value semantic definition: input semantic 'SV_POSITION' and input semantic 'VPOS' at line 171 (on vulkan)

    Let me know if there is any information further I can provide to help out. Oddly enough, building in-editor seems to work when targeting linux. It seems to only be the cloud build that is failing.
     
  15. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    526
    Thank you so much for reporting this issue. Just uploaded a new build with a possible fix.
    Is it possible for you to download it and let me know if the issue persists?

    EDIT: Sorry uploaded wrong build. I'm re-uploading the new correct one.
    EDIT2: Correct one uploaded.
     
    Last edited: Apr 12, 2017
  16. rahuxx

    rahuxx

    Joined:
    May 8, 2009
    Posts:
    537
    I got amplify shader as Unity Pro customer benefit in form of acceleration pack. I got product keys from unity. When I m trying to download latest release from your website I am not able to download it.
    On unlokcing using product key I get error -
    The given license doesn't have access to any product. If this information is incorrect, please contact us.

    What should I do?
     
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Thank you for your support, we really appreciate it. Did you redeem the ASE Asset Store voucher? After redeeming it, you will receive an invoice with a unique invoice number that you can use in our website.

    Looking forward to your reply.

    Thanks!
     
    rahuxx likes this.
  18. Shinobi1507

    Shinobi1507

    Joined:
    Sep 8, 2010
    Posts:
    213
    I'll give it a shot tonight and let you know. Thanks!
     
  19. ferlodeveloper

    ferlodeveloper

    Joined:
    Jan 21, 2013
    Posts:
    15
    Hi again,
    I have problems with lightmaps, i created my custom shader that use vertex on uv2 to rotate around camera, a custom billboard for trees combined meshes of planes, it works ok and when i see shadows are correct but when i go to bake shadows with lightmap the shadows dont take account the transparency and are all full opaque, i use transparent cutout shader with opacity mask, i show two images to see the problem treereallights.jpg treelightmap.jpg
     
  20. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    526
    Thank you for reporting this issue!
    We'll try to replicate this on our end and see what might be happening.

    We also uploaded a new build into our download page.
    Here are the release notes:
    Release Notes v0.7.0 dev 01:
    • Improvements:
      • Greatly improved Undo
      • Colored Port Mode behaves as a normal toggle and doesn't require double tap on W key
    • New Samples:
      • Hologram by The Four Headed Cat
    • Fixes:
      • Fixed issue on deleting nodes with Wire nodes on their connections

    WARNING!
    With this build we rebuilt from the ground up how we were using Unity Undo stack and some heavy changes were made.
    On our early tests everything seems stable but we really would like to advice on backing up your current ASE version and shaders before importing this new one.
    Please report here or via our support mail ( support@amplify.pt ) any issues you encounter.

    We would like to also thank @benderete for his awesome Hologram sample contribution, which we included in this build.
    Please check it out in action:




    Happy shader creations!
     
    Last edited: Apr 13, 2017
  21. adndima

    adndima

    Joined:
    Jun 11, 2015
    Posts:
    47
    Tell me please. How in Amplify Shader Editor to make here such effect?

     
  22. dj_Ruska

    dj_Ruska

    Joined:
    Oct 23, 2015
    Posts:
    6
    Hi everyone.

    Sometimes we need in one material 2 same textures, one of which is rotated for 90 degrees (ideally not only on 90, but on any angle).
    The question mainly concerns Normal maps which can't be simply rotated, they need proper adjustments.

    So does anybody have an idea how to rotate Normal map in shader?
    Thanks in advance
     
  23. zhoazhiqing

    zhoazhiqing

    Joined:
    Nov 7, 2016
    Posts:
    6
    Hey guys.
    Look at this.
    1.jpg
    2.jpg
    3.jpg
    How to do physics?.:(
    :)
     
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Are you looking to achieve any specific type of effect or blending? The Rotator node should suffice for most cases, be sure to check it out.

    Thanks!
     
  25. ViktorKom

    ViktorKom

    Joined:
    Feb 24, 2015
    Posts:
    29
  26. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Yes, try using the Depth Fade node.

    Looking forward to your feedback.

    @ViktorKom Thanks!
     
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Unfortunately, there isn't a universal solution for this problem, with ASE or other shaders. Tessellation, or POM, don't really play well with physics, it's mostly recommended for small scale displacement.

    A common solution is to use low-poly pre-displaced colliders, or offset simpler colliders that account for the maximum displacement amount.

    Please elaborate on what you intend to develop, we would be happy to provide additional information.

    Thanks!
     
    Last edited: Apr 15, 2017
  28. zhoazhiqing

    zhoazhiqing

    Joined:
    Nov 7, 2016
    Posts:
    6
    :)Thank you for your answer,I want to make terrain material(Tessellation).i have done it.But in the end, it was discovered that there was a problem with physics
    Thanks!
     
  29. MaskedGibbon

    MaskedGibbon

    Joined:
    Mar 26, 2016
    Posts:
    10
    I'm a total shader novice, but I bought this ages ago and I love fiddling with it.

    I've been trying to make a fading LOD shader and I've had a little success (by generating the shader with Amplify and then editing it in a text editor to put keijiro's defines in), but seem to have hit a bit of a snag with the transparency, and it's also present in the transparency example included with Amplify.

    If you have one of Unity's example prefab particle systems (dust storm or wild fire for example), in front of the object with transparency, it doesn't blend. The transparent object appears to be in front of the particle.

    I'm probably doing something wrong, but any help would be appreciated, thanks.
     
  30. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    426
    tesselate not affecting on phisx. never.
     
  31. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Hi, I think that you are having problems with the render queue order.

    Try this:
    For example usinh the Wild Fire prefab: This example use the materials ParticleFireball and ParticleFlameLicks (located in Standard Assets > Particle Systems > Materials). Go to this materials and change their Render Queue to 3010 for example and see the results.

    How your transparent ASE material and this particle materials are all by default on the transparent queue (3000) maybe that you can do the same with layer order, but I'm not sure.
     
  32. MaskedGibbon

    MaskedGibbon

    Joined:
    Mar 26, 2016
    Posts:
    10
    Thanks a lot for the help! That seems to have resolved the problem I was experiencing.
     
  33. adndima

    adndima

    Joined:
    Jun 11, 2015
    Posts:
    47
    No such node

     
  34. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    You seem to be using an older version, be sure to pickup the latest ASE package directly from our website using your Unity Asset Store invoice number.

    Amplify Products - Download

    Thanks!
     
    adndima likes this.
  35. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    177
    Can you sell the shaders on the store made with ASE? I'm working on a terrain pack, and as you probably know the builtin shaders are extremely bad when used on a terrain, but I don't want to tie myself to another asset(like RTP) either if I don't have to. I was a bit over enthusiastic and picked it up regardless the answer, I have to say I'm quite imperessed with it so far, and I can't express my graditude for the amount of examples. :)
     
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Thank you for your interest, we really appreciate the support. It's great to know that you are having a good experience with it, we look forward to your feedback.

    You own all the shaders that you create with ASE, you can distribute them as you see fit, freely or paid.

    Thanks!
     
  37. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    177
  38. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Here go a sample of a shader with Animated Highlight feature (rim based) that i have made with ASE for learning purpose.
    Some interesting things (for me) on the shader are the use of the switch node to activate / deactivate the highlight status and a "ping pong" animation between two values.
    Note: The objects with the shader on the sample scene have attached an script to switch the highlighted feature of the object material when the mouse enters and leaves the object.
     

    Attached Files:

    Farelle and kebrus like this.
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Another great contribution, thank you for sharing it with the community!
     
    benderete likes this.
  40. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    526
    Hi guys

    Just to let know that we just uploaded a new build into our website.

    Here are the release notes.

    Release Notes v0.7.0 dev 02:
    • Improvements:
      • Improved Float to Vector auto-cast
    • Fixes:
      • Fixed issue with keyboard shortcuts on Mac
      • Fixed renaming issues with 'Triplanar Sampler' node
      • Fixed issue on property nodes UI not refreshing on Undo
      • Fixed issues on 'Fresnel' and 'Vertex Normal' related with normal generation
      • Fixed typos on POM
      • Fixed issue with Wire node deletion
      • Fixed auto-change port types issues on all Compare nodes

    Happy shader creations!
     
  41. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    This is an example of 2 Sided shader with different textures / colors on inner and outer faces.
     

    Attached Files:

    Farelle and hopeful like this.
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,540
    @Amplify_Ricardo you might want to considering create a wiki for ASE to store sample shaders graph and trick to easier for people when they looking for something
     
  43. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Hello,

    Good point, we have actually started working on a ASE Wiki Page. It's open to user contributions, be sure to join if you have something to share, or if you would like to contribute to existing pages.

    Community contributions can be included in the main ASE package, be sure to check them out.

    Thanks!
     
    Last edited: Apr 18, 2017
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,315
    Another great contribution, you rock!

    Thanks!
     
    Reanimate_L, hopeful and benderete like this.
  45. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,540
    How do people capture hi res graph screenshot? or is there any built in tool in ASE for this?
     
  46. pro-bchevalier

    pro-bchevalier

    Joined:
    May 30, 2013
    Posts:
    46
    Hi Amplify team, I asked about terrain shaders support a while back and was wondering if it was anywhere on the ASE roadmap and how far from now.
    Thanks!
    ben
     
  47. Pecek

    Pecek

    Joined:
    May 27, 2013
    Posts:
    177
    I have no idea if it's accurate or not(probably not), but I really like this ice thingy I just made.


    Currently it is quite a mess, but if you guys interested I'll clean it up and share it later(if it's worth sharing at all lol, this is like the 4th shader I've ever made, I just tried to replicate the things I do in substance designer)

    Edit: made quite a bit of progress here, now I realize how bad the first iteration was lol. Still not there yet, but it's getting close I think - forgot to turn off youtube while recording, sorry about that.
     
    Last edited: Apr 20, 2017
    MudPuppet, Farelle, Malbers and 2 others like this.
  48. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    On my side I maximize the ASE window on the second monitor and do regular screenshot... no trick, no magic :(

    XD
     
  49. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    463
    Hi, quick question for the devs. Multi pass has been a frequently requested feature and I guess the complexity it adds requires quite a lot of developement and testing BUT in the mean time, why not implement a way to configure UsePass commands?

    I guess we would also need a way to name the pass in ASE and change the execution order of the passes.
     
  50. ViktorKom

    ViktorKom

    Joined:
    Feb 24, 2015
    Posts:
    29
    Hi.
    I try to make shader with tesselation, but Tesselation doesn't work with Dithering :(
     
unityunity