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

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Hello all,
    I'm trying to create a fog effect but I'm not having much luck. I tried using the water example as a foundation but I couldn't get the effect I wanted and I'm ready to start from scratch.

    I want to create something like the green fog in this image:


    Any help would be appreciated. I'm pretty new to shader creation.

    Thanks!
     
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Hey guys, is there a way to fix the lighting issue on the two sided shader? I was going to use it on my characters robe, but the other side of the face is still lit.
     
  3. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161


    I figured out how to make my own fog! Woohoo! It took me like 6 hours but I think it turned out pretty well. I was trying to replicate the image from two posts back.

    If anyone wants to see how I made this let me know and I'll do a quick YouTube tutorial for it. Its 1 shader and a particle system. :D :D
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,012
    This looks really good! Youtube that beauty!
     
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975

    I would love to see how you did this. I have fog and rain, but it is very heavy...
     
  6. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,358
    i just realized that i've never touch the transmission stuff in ASE,
    it's awesome :D
    ASETransmission1.jpg ASETransmission2.jpg
     
  7. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    The only thing you have to do to correct lighting in your character's robe is inverting the normal on the back faces. even tho you could mimic this using NdotV to find the back faces there are two new nodes called "Face" and "Switch by Face" that are faster and do the job for you.

    Here's an example I just confirmed it works:
    two faces.PNG

    Keep in mind, unless you are doing some kind of cloth physics to your robe and want to save on vertex count there's really no good reason to do this in the shader, the faster way is always duplicating and inverting the normals on your 3d software, by doing this in the shader you are effectively duplicating the load on that whole model when you only want a part of it duplicated.

    Please do share :) I'm pretty sure some users will find it useful ;)
     
    KRGraphics and benderete like this.
  8. xCyborg

    xCyborg

    Joined:
    Oct 4, 2010
    Posts:
    499
    Very nice! The shader output is very clear surface shader, I believe it's the only package that supports this.

    But I can't seem to be able to externally edit the shader using Visual Studio, whenever I open the shader again in ASE it reverts back and deletes all my edits.
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    That's great, happy to know that you like that. Unfortunately, once a shader is edited manually, it will no longer be compatible with the editor.

    Do note that your shader is being reverted when opened in ASE because of the metadeta saved in the shader file. If you don't mind me asking, what kind of alterations where you looking to make?

    Thanks!
     
  10. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    60
    Hi

    Can we add attributes to shader properties? i'm particularly interested in [PerRendererData] attribute.

    Thanks.
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    That's pretty cool! We would love to see a tutorial about that.

    By the way, we strongly recommend anyone that has not already to subscribe to Evan's channel. He is working on a really cool ASE Tutorial series.

    Check it out: Here!
     
    zyzyx likes this.
  12. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    You can, simply add the property you want and in the node properties panel at the left you can add unity's attributes, including [PerRendererData]
     
  13. AthosK

    AthosK

    Joined:
    Jan 20, 2013
    Posts:
    426
    Hey there,
    I'm using a modified version of the triplanar shader you have on the examples (a watered down version basically without the blendings) is there a way to rotate the input image? I'm creating a mesh procedurally and the textures would always be oriented by 90 degrees, with a normal shader the textures are oriented correctly but I need to use a triplanar one for what i'm doing. So how can I rotate the input image i'm inserting to it?

    Thanks
     
  14. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    60
    Unfortunately there is no [PerRendererData] attribute in the list. Could you please elaborate?

    ASE v0.7.1 dev 02:

    upload_2017-4-29_12-44-50.png

    Thanks
     
    arnoob likes this.
  15. happysire100

    happysire100

    Joined:
    Apr 28, 2017
    Posts:
    1
    Has anyone managed to get some cel shading going?
     
  16. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    I think that is necessary custom lighting for cel shading.
    Meanwhile, perhaps would be possible get "something" experimenting with matcap shader and matcap textures with cartoon style. It's not the same but...
     

    Attached Files:

    Kellios11 and happysire100 like this.
  17. marcos

    marcos

    Joined:
    Oct 18, 2009
    Posts:
    581
  18. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    272

    What is the state of custom lighting, anyway? What is and isn't possible right now?
     
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,358
    I'm just using the transmission sample packages for that
     
  20. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    414
    Sorry if I mislead you, the PerRendererData attribute only works for textures so they only show up in texture objects nodes or texture sampler nodes.

    There's a "unlit" shader mode which generates an empty custom lighting model, meaning, you can do whatever lighting you want with it, there's still not enough nodes to, for example, replicate unity's lighting model using that unlit version but there are enough of them to create a cartoon shader and replicate some of the common lighting features, whats missing, IIRC are global illumination nodes.
     
    benderete likes this.
  21. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    272
    That's all I need. GI's too much of a pain the way Unity does it anyway. Thanks!
     
  22. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161


    As promised, here is the fog shader tutorial! Let me know what you think :D
     
    benderete, hopeful, barikinil and 4 others like this.
  23. alvivar

    alvivar

    Joined:
    Aug 7, 2012
    Posts:
    16
    Thank you! Pretty useful trick! ;)
     
    SniperEvan likes this.
  24. SniperEvan

    SniperEvan

    Joined:
    Mar 3, 2013
    Posts:
    161
    Happy to help :)
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    This is BEAUTIFUL... this would be perfect for my Mountain Level.
     
    SniperEvan and Gray_Master like this.
  26. FerryvD

    FerryvD

    Joined:
    Sep 9, 2016
    Posts:
    25
    Is it possible to use opacity combined with an opacity mask?
     
  27. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,358
    Did it tell you that ASE is awesome?
    upload_2017-5-2_19-45-26.png
    upload_2017-5-2_19-47-17.png
    Oh wait i think i did :D
     
  28. Fb01

    Fb01

    Joined:
    Apr 5, 2016
    Posts:
    6
    hi

    regards uvw and the triplanar shader is it possible to bake the uvw generated out
    or is it possible to lock the uvw to skinned mesh on a particular frame of animation.

    thanks
     
  29. Skarz

    Skarz

    Joined:
    Nov 8, 2010
    Posts:
    21
    Hello, I am also getting the following error when installing Amplify Shader Editor into our project:
    It is happening in UndoParentNode.cs (line 314 is the first of six instances of the error). Running Unity 5.6.0p3

    Changing the six instances to "DefaultValueAttribute" seemed to fix errors for me (don't know if there is a side effect to doing that).

    We are updated to 0.7.1 from your website.

    UPDATE: It seems that this will happen to ASE if you have other middleware not using a namespace that also defines a DefaultValue attribute.

    One fix for this can be to add the following code to the file:

    Code (CSharp):
    1. using DefaultValue = UnityEngine.Internal.DefaultValueAttribute;
     
    Last edited: May 2, 2017
  30. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    559
    I nice feature addition would be to allow comments within comments. That would add a lot more organizational control :)
     
    Amplify_Ricardo likes this.
  31. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    374
    got almost same

    Assets/AmplifyShaderEditor/Plugins/Editor/Nodes/UndoParentNode.cs(314,80): error CS1614: `DefaultValue' is ambiguous between `DefaultValue' and `DefaultValueAttribute'. Use either `@DefaultValue' or `DefaultValueAttribute'

    and ye, seems fix is working
     
  32. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    389
    Thank you so much for reporting this issue, figuring out what was happening and providing a solution. We'll explicitly use UnityEngine.Internal.DefaultValue on our end to prevent these conflicts.
    You should also let the developers from the other middleware know about this issue so they can correctly declare their classes inside a proper scope/namespace.
    Please let us know if this happens on any other situations.
     
  33. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    374
    is it possible to connect POM to Triplanar sampler ?
     
  34. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    Custom lighting will definitely allow for more complex effects. Your MatCap shader looks great ;)
     
  35. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    Unfortunately that's not something that you can do with ASE, I recommend looking into mesh baking assets.

    Thanks!
     
    Last edited: May 3, 2017
  37. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    Thanks. I tought that was needed custom lighting to cartoon shaders, but when I'have some spare time I'll try with that @kebrus said
     
  38. Christin2015

    Christin2015

    Joined:
    Dec 1, 2015
    Posts:
    29
    Hello,

    Just a simple question: Is it possible to create shaders for mobile devices (android, iOS), in Amplify? Especially shaders which support transparency and metallic for mobile?
     
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    Thank you for the suggestion, we might be able to include something like that at a later stage.

    The Rotator node might be useful for your particular case, be sure to check it out.

    I recommend examining the older triplanar sample (set up manually) in order to experiment with POM effects, the new Triplanar node does not currently allow for that type of use. Please be aware that you might run into some normal related issues in the old sample, promptly corrected when using the new node.

    As long as it's something supported by standard Unity 5 shaders, you can use ASE to build them. You can even choose the Precision mode used for your shader calculations, ideal for less capable devices.

    Yes, you can set it up using a Custom Blend mode.

     
    Last edited: May 3, 2017
    Christin2015 and benderete like this.
  40. Skarz

    Skarz

    Joined:
    Nov 8, 2010
    Posts:
    21
    Another issue I'm seeing - it seems that the "Receive Shadows" checkbox is reversed. Unchecking it currently turns ON receiving shadows on the shader (expected behavior would be OFF when unchecked based on the option's wording).

    Using 0.7.1.002
     
  41. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,264
    That's odd, thank you for reporting it. We will update you as soon as we identify the problem.

    Thanks!
     
  42. renardmf

    renardmf

    Joined:
    Jun 29, 2012
    Posts:
    46
    Hello,

    Should I be able to use a LayeredBlend node to blend height maps to use for tessellated displacement?

    I am trying it now and it seems to be giving me shader errors.

    Thanks in advance!
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Hey guys... I have a question about variables. I am going to be updating my shaders to allow me to add detail normal maps, but I will also allow it to hide these in the inspector with the toggle switch... is this currently possible with ASE? It would help get rid of any clutter. Thanks

    EDIT: I also want to add three more normal maps... and the splat map will be Red, Green, Blue, Cyan, Magenta, Yellow. Black is Unaffected. Is it possible to append this in the shader? I was thinking of setting vector colour nodes in the shader for the other colours... but it might not work...

    I want to possibly add more details in areas that may need it. I will be using scanned cloth materials. Thanks

    Screenshot 2017-05-04 00.15.25.png


    Test Render of my normal detail shader...
    Screenshot 2017-05-04 00.15.21.png
     
    Last edited: May 4, 2017
  44. brisingre

    brisingre

    Joined:
    Nov 8, 2009
    Posts:
    272
    I'm loving working with ASE. For the most part, everything's clean and easy.

    I have a bunch of questions, some stupider than others:

    -How do I use the Noise Generator node?
    -Is there any way to re-link a connection like substance designer's Shift-drag? (Shift-dragging an output in SD moves everything attached to it.)
    -Is there any way to copy-paste nodes and keep inputs linked?
    -Are there bitwise operation nodes I'm missing or do those not exist yet?
    -Can I set it up so "No Ambient Light" appears in the material settings?
    -What's the best practice for setting up something like a switch statement? It doesn't have to change during runtime probably.
    -Is there any way to group nodes in a re-usable way, like a function?
    -Is there any easy way to group inputs in the material settings?
     
    Pecek likes this.
  45. mehrankan

    mehrankan

    Joined:
    Apr 12, 2015
    Posts:
    55
    Hello everyone. I just got the ASE via our studio's account. and it just wont load :( here is the error msg that it is giving me. I am on unity 5.3.4 p1



     
  46. FerryvD

    FerryvD

    Joined:
    Sep 9, 2016
    Posts:
    25
    Would it be possible to create a realtime mirror effect with ASE?
     
  47. Shiyao

    Shiyao

    Joined:
    Nov 27, 2013
    Posts:
    23
    Hi guys,
    I get two questions. wish someone can answer me. Thanks.
    1. I created a splat shader. when i tried to add 14 texture into shader, I got a error as image. Is that mean I cannot use more than 13 textures in one shader?
    2. I tried use unpack normal. however, I feel unpack normal cannot get same quality as general normal map. Is that a way to get same quality with unpack normal map?


    Test shader.png
     

    Attached Files:

  48. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    389
    Receive Shadows was actually inverted. We recently had to do some tweaks on our shadow caster and inadvertently inverted it.
    Really glad you caught that out.

    Yes, this is an issue which fortunately we already fixed but it's still on your end. We'll be uploading a new build hopefully tomorrow and it will come with this fix.

    Unfortunately the only way to hide variables on the inspector is to go through each one and add the HideInInspector attribute. Toggle Switch is done in such a way that you can switch between its branches in runtime so it always has to create properties from both of them.
    We have another node called 'Debug Switch' which only creates the shader code/properties from the specified branch but this is not what you want either.

    Concerning the Splat Map, I do apologize but I'm not quite sure you can achieve what you want the way you described ( but I may be misunderstanding what you said ) since p.e. Yellow is a combination of two channels and it would affect both Red and Green channels of the splat map.
    Is it possible for you to elaborate a bit more?


    Noise Generator for now only generates noise using the Simplex method on the value given on its input. A simple way to use it is to connect a Texture Coordinates node on its input and play around with its Tiling and Offset.
    No, unfortunately we don't have nothing like this on ASE.

    Not quite sure what you mean. It currently already preserves connections between nodes when they are copy-pasted.

    No, but you raised a great point. We'll register this request and add them as soon as we can.

    You can add the No Ambient Light flag by setting the No Ambient Light toggle on Rendering Options are at your Master Node/Output settings.

    We don't have a node which does a true switch-case on shader code. You have two nodes Toggle Switch and Debug Switch, the first one only has two inputs and you can toggle between them in runtime, the second one can have an higher number of inputs but the specified branch cannot be changed in runtime.

    Expect news about this really, really soon!

    Not quite sure on what you mean. Are you referring to shader properties on the material inspector?

    Unfortunately you require Unity 5.4.0 our higher to be able to use ASE.

    Yes, since we are generating a surface shader you can easily achieve a mirror effect by adjusting the Metallic and Smoothness input port values.

    Try increasing your shader model. With a greater shader model comes access to more registers.

    Can you let us know in which context do you want to use the node? A Texture Sampler node will automatically do that for you if the assigned texture is marked as a Normal Map.
    It is important that you mark your texture as normal map since Unity does some internal compression magic on it which might be responsible for the quality differences you are noticing.
     
    Last edited: May 4, 2017
  49. Mr_Albert

    Mr_Albert

    Joined:
    Apr 28, 2017
    Posts:
    23
    Hello everyone.
    I'm creating a shader for water and I need someone more experienced.

    I would like to find -with the node- where the meshes collide to trace a graded line




    On this line will be put the foam

    can you help me? thanks....

    (Sorry for bad english)
     
    Last edited: May 4, 2017
  50. Radishface

    Radishface

    Joined:
    May 4, 2017
    Posts:
    12
    Hello.

    I'm trying to make a simple shader, which allows the object to retain its texel density while scaling. In UE4 it is easy to do using Object Radius node. How can I achieve the same effect using Amplify Shader Editor?

    Thank you.