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

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
  2. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    Just wanted to say that Vertex To Fragment is working fine after the latest update. Thanks !
     
  3. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Haven't got the time yet but I didn't forget you. Later today I'll try to get back to you.

    Good to know ;)
     
  4. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    No rush, just checking :)
     
  5. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    Is this normal that after change order in material function, connected nodes in shader are wrong ?
     
  6. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    Is this only in editor or that make matter to shader ?
     
  7. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239

    Hi,

    My append problems:
     
  8. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    So I finally took a look at it.

    You need to reconstruct the normals according to the changes to the vertices. This means you need some kind of analytical solution (some math) to calculate the new normal. What you are doing right now is just increasing the normals into the Y axis which doesn't make any difference besides making the final result brighter or darker.

    There's a solution where you use the derivatives to reconstruct the normals (DDX and DDY) but they only work on the fragment function and will produce a facet look. What you should do instead is finding the correct math to the new normals. I just stacked some nodes together that made sense and I got this:
    Unity_2017-09-06_18-51-19.png
    While this is better it's still not correct, but hopefully it should give you a hint on what to do. There are a few articles on the web about it, not an easy subject.

    Nice catch, it shouldn't do anything to the shader code, it's just a preview error, I'll fix it for the next build. Thx for the report ;)

    Ahhhh, now I understand. That was by design actually, but I'll see what I can do. The reason it was by design is because the connections depend on the order of connection, we can't do this because at any time you could load a shader where the order could be different and thus resulting in different outcomes. We may need to rethink this logic to make it more pratical, but for now just use a break to components or a mask between the two appends.
     
  9. christophercimbaro

    christophercimbaro

    Joined:
    Aug 30, 2017
    Posts:
    12
    Hi Paulo,

    You right, I check with an ASE shader on a substance and it works, but what I want to do is a shader which blend 4 substances with a mask (per channel RGBA) and conserve exposed parameter of each substance.
    Something like that
    but actually the Unity shader has not enough possibilities.
     
  10. brett_ridel

    brett_ridel

    Joined:
    Jan 15, 2017
    Posts:
    33
    Hi all

    I'm not sure to post at the best place, but maybe I'm wrong.
    I have a scene with a spherical terrain. Depending on the position of the user (north or south pole), I need a different lighting (sun or moon for example). I would like to use one directional light per pole. However, when I use the Mixed Lighting option, static objects get their direct lighting popping from one light to the other.

    Do you know if there is a way to limit the range of a directional light ? (I think the answer is negative).
    Alternatively, is there a way to create with ASE a custom directional light ? (parallel rays, constant intensity ..., but with a limited range).

    Brett
     
    Last edited: Sep 6, 2017
  11. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Thanks for the sample, i'll look into it further!
     
  12. sabojako

    sabojako

    Joined:
    Jul 7, 2017
    Posts:
    48
    Hey there,

    Awesomely great tool!

    Wondering if int/float/matrix arrays are planned on the roadmap?

    Thanks :)
     
  13. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
    Unity always using the last indicated shader for fallback, so any custom fallback above "Diffuse" will be ignored. You can download a test scene here.
     
  14. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey there, I forgot to warn you about something from the sample you provided, you should do this:
    2017-09-07_14-39-11.png
    The reason I'm repeating the switch just before the vertextofrag node is because the way you had step up your shader it would generate the vertex function code even if you were using the per pixel variant. This is because while you weren't using it by having the toggle off, the shader was still assigning the code to an interpolator, by having the switch just before the vertextofrag node and having the False statement empty makes it so it doesn't assign any special code into any interpolator thus saving instructions.

    Check out the Global Array node, it's a community node until we figure a good way to do it but it should do what you need to do ;)

    Say whaaaa!? If that's the case I see why you are having problems with it, the link you provided isn't available tho.

    I need to further test this and I'll bring some kind of solution if necessary.
     
  15. nxrighthere

    nxrighthere

    Joined:
    Mar 2, 2014
    Posts:
    567
     

    Attached Files:

  16. TheAlmightyPixel

    TheAlmightyPixel

    Joined:
    Jun 21, 2014
    Posts:
    263
    Have you guys thought about supporting geometry shaders?
     
  17. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    My world has been a lie :C

    You are right, it only picks the last one, according to the docs fallbacks are the equivalent of replacing them with the subshaders of that fallback so I assumed that having more than one would follow the same logic from subshaders and run them in order. But's I guess it's not the case, it will only do it for the last one. The reason we kept the other diffuse fallback is because of the shadow caster. We'll have to change it a bit to use our own shadow caster. oh well... :C

    Thx for reporting this and sorry for the inconvenience, consider it fixed for the next release

    Thats one of the reasons for templates, when fully fledged it should be able to handle geometry shaders as well. You could probably do some things already with them as long it's stays contained.
     
    Last edited: Sep 7, 2017
  18. Farelle

    Farelle

    Joined:
    Feb 20, 2015
    Posts:
    504
    I would like to make a shader that takes positions of specific objects into account (multiple), but I can't figure out how to get the position of even one object (in world space i think), is there a way to do that currently?
    From what i understood there should be a way to make a global variable to set a vector? which I could then access by code?
     
  19. benderete

    benderete

    Joined:
    Aug 31, 2014
    Posts:
    129
    I don't know if can be useful for you, but the Force Shield Shader -community shader- is using a method to send coordinates to shader. A script attached on the object with the shader get the impact point between another object and the object with the shader and update a shader var with this info.
     
    Amplify_Paulo likes this.
  20. Farelle

    Farelle

    Joined:
    Feb 20, 2015
    Posts:
    504
    oh, I was wondering if there is a community shader I could look at :D that IS actually very helpful :) thank you, maybe I can figure the rest out on my own now ^^
     
  21. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    @Amplify_Paulo
    In UE4 shaders used for particles has parameters (which are used by particle) - is it possible with ASE (or maybe this is Unity limitation) ?
     
  22. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Hi again

    can you implement this feature ? (texture instance similar to Texture Array instance)


     
  23. incitement1

    incitement1

    Joined:
    Apr 28, 2013
    Posts:
    8
    Hello
    I have a normal map and i want to flip the green channel. in Unreal engine 4 we found an option to do it "" Flip Green Channel " can we do the same with Amplify Shader
     
  24. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Sorry for the wait, here's the lastest build for this week.

    Grab it at the usual place.

    Release Notes v1.3.1 dev 04:
    • New Features:
      • Added support for Texture Arrays with 'Parallax Occlusion Mapping' node
    • Fixes:
      • Fixed issue with 'Static Switch' node duplicatnig code
      • Static Switch' node now properly allows the use of the same keyword
      • Fixed issue with Int ports generating black previews
      • Fixed issue where 'Custom Standard Lighting' node was generating garbage code when connected multiple times
      • Fixed dynamic baked lightmapping for 'Indirect Diffuse Light' node
      • Default fallback is now only added if shader doesn't use it's own
    • Improvements:
      • Changed 'Template Parameter' node to mimic the same look from the equivalent property nodes
      • Changed some labels and warning texts to be more clear on what's going on for texture objects
      • Int port color now uses the same color as float nodes
      • Added ASE custom inspector to the default templates

    Do you mean being able to change a property for the material that you use in your particle system? If yes this is already possible, you can override the material you particles uses but that material is a ordinary material that can have it's own properties. The best example is the propery for soft particles.

    That would require quite the change, but I'll see what I can about it. Thx for the suggestion.

    That is tied to architectural design choices from both engines, asking to do that is kind like asking to flip the Y and Z axis. You can however write a pre-import script that flip the green channel for normal maps but then you need to control which ones you want to flip and which you don't, the quick dirty way is by using the path name as logic. So, in short, yes it's possible, but it's not exactly a toggle inside ASE, it's a seperate script that does something to the file on import. Look here.

    Happy weekend everyone, keep the reports and suggestions coming ;)
    cheers
     
    nxrighthere and antoripa like this.
  25. Silverlode

    Silverlode

    Joined:
    Apr 9, 2013
    Posts:
    41
    Hi Amplify developers and community!

    I'm trying to work out which asset would suit me best, ShaderWeaver or ASE. I am confident in C# and the little I have tinkered with shaders has been tricky to say the least - hard to enough to put me exploration and creative thinking! I am interested primary in 2D image effects.

    I have downloaded the ShaderWeaver free trial and produced an effect like this,

    effect.gif

    very easily indeed, using three nodes. I was surprised how intuitive and fun it was.

    nodes.png

    I am aware that ASE will provide more flexibility and a steeper learning curve. As way of a test case, would anyone quantify or demonstrate how easy it would be to produce a similar effect to the one shown above in ASE? How many nodes would be it require?

    Many thanks
     
    Last edited: Sep 9, 2017
  26. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    Which node in ASE is equivalent to Absolute World Position in UE4 ?
     
  27. Quatum1000

    Quatum1000

    Joined:
    Oct 5, 2014
    Posts:
    889
    Hi everyone,

    does ASE support Texture2DArrays?

    Thank you
     
  28. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Hi
    yes
     
    Amplify_Paulo and Quatum1000 like this.
  29. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
    Hi all,

    Any idea how to make realistic lava and molten?
     
  30. habsi70

    habsi70

    Joined:
    Jan 30, 2013
    Posts:
    25
    Weird issue on OSX latest, Macbook pro 2013. When I duplicate a node with cmd + d I cannot select the duplicated node. It seems that somehow the key is locked. when clicking on an empty space, divide nodes are created at every click. After pressing escape I can select the duplicated node. But it was duplicated twice.

    I can reproduce this almost every time. But sometimes duplication works just fine, only the node is placed somewhere outside the visible screen, so I have to zoom to find it.


    ase-duplicate.gif
     
  31. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    @Amplify_Paulo - I saw the post about using the Static Switch node. In the latest update there is this fix:
    • Fixed issue with 'Static Switch' node duplicating code
    Is it a fix for the situation below? Or this is the way the connections should be done?
    Capture.PNG

    Also it seams that there's a problem with UnityGI giXXX = gi when used in the vertex function:
    Shader error in 'Custom/Undefined Variable': undeclared identifier 'gi' at line 60 (on d3d11)
    Sample shader attached.

    Thanks !
     

    Attached Files:

  32. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi there

    There's always a duality in these tools, of course it's nice to have a one click tool that does what you want but most of the times it comes with the price of flexibility like you mentioned. That particular effect I'm not really sure how many nodes would require, mostly because I'm not sure what is doing, I'm guessing it's only panning a changing texture up to lerp between two others? Maybe 10 nodes? Just a guess. You have to keep in mind that you can create the effect you want and save it into what we call a shader function, which is a separate file that contains a set of connected nodes that can be used inside any other shader, so while you may take your time learning how to create that specific effect, once you get it the way you want you can save it as a shader function and reuse it in any shader you want as just one node, effectively reducing the complexity to just one. I know it doesn't fully answer your question but without having more information on that effect it's hard for me to say how complex it really is.

    It's called "World Position". Keep in mind the differences in scale though, unreal units are in centimeters whereas unity units are meters so the two nodes might look slightly different.

    Just a couple of ideas. You could try using two panning textures at different speeds to generate a moving pattern that resembles lava, you would then using this somewhere in the emission output. You might also want to mask the emission with some other texture to simulate hot and cold places, you could even use vertex offset if you want to make it "alive".

    Thx for reporting, can you tell when this started to happen? Does it also happen if you use Ctrl+C, Ctrl+V?

    That image is just a suggestion on what you should be doing, it basically saves some instruction counts.

    It's true, these lighting nodes are not prepared to be used in vertex functions. I'll see what I can do, some I'm pretty sure I can't do anything about it besides removing the error (which I should have done already :| )
     
  33. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    I see, thanks for the info.

    I understand. The error didn't occur in the previous versions, so I guess it has something to do with fixing the dynamic baked lightmapping for the Indirect Diffuse Light' node.

    Thanks !
     
  34. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    I haven't tried this yet but does anyone know if it is possible to create a billboard effect for something like trees or leaves?
     
  35. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Yes it does, and unfortunately it doesn't seem I can get the baked lightmaps to work from the vertex function. This means it will only show the dynamic one, which was the previous behavior. I'm going to fix that so at least retains the dynamic baked light and also do something for indirect specular which also suffers from the same problem.

    If you mean creating billboards, yes you can create them, applying them to trees, leaves or grass is just a matter of ... well.. using them. Keep in mind tho that you might need to do some extra work to make things like wind work with them.
     
    Last edited: Sep 12, 2017
  36. StudioEvil

    StudioEvil

    Joined:
    Aug 28, 2013
    Posts:
    66
    Hi all, i made a cutting shader. I am able to cut my mesh using a plane defined in space and clipping via "Opacity Mask" channel. I'm in forward rendering with msaa enable.

    I noticed that the clipped borders of my mesh aren't antialiased. Is it something related to my shader or to the Unity's render pipeline ?

    RenderType is set to "Transparent cutout".

    aa.PNG
     
  37. Misciagno

    Misciagno

    Joined:
    Jul 27, 2013
    Posts:
    88
    Is there a specific example scene that might give me some insight on how to do that? I've figured out how to mask things by vertex color(which I wanted to do so some planes would billboard and others won't) and have some fake wind effects but I haven't figured out how to make the geometry always face the camera.
     
  38. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    MSAA uses geometry to figure edges to do AA, anything that isn't fully opaque wont be catch by it, transparent or masked shaders for instance wont be anti-aliased. It's not a limitation on Unity or the shader, it's a limitation from the msaa technique. Try post-process AA like TXAA, those should be able to pick these kind of cases.

    We don't have any sample that uses it to be honest, mostly because it's just one node or option. What I mean is, you have an option called Billboard in the main panel that you can activate and configure, and you also have the equivalent node called billboard that you connect to the local vertex output.
     
  39. brett_ridel

    brett_ridel

    Joined:
    Jan 15, 2017
    Posts:
    33
    Hi all

    I created with ASE a ground shader that applies vertex offset as height/depth map. However, I have the impression that this vertex offset is not use when I make a Global Illumination Baking, int the clustering step at least. Is it possible to combine both (vertex offset + GI) and, if so, do I need to do something in particular ?

    Brett
     
    Last edited: Sep 12, 2017
  40. habsi70

    habsi70

    Joined:
    Jan 30, 2013
    Posts:
    25
    ASE version ist the latest. But I did not use ASE for a while, I am currently on Unity 2017.1.0f3. Yes, Cmd + C, Cmd + V produces two duplicates too, but I can click or select without creating other nodes
     
  41. Ziboo

    Ziboo

    Joined:
    Aug 30, 2011
    Posts:
    356
    Awesome update, thanks for the hard work.
    Some features I would like to see, If I may:
    - Copy & Paste from one canvas to another don't keep the properties names. Pretty anoying
    - Any plan to be able to create a Standard Surface shader that could handle different rendering mode (Opaque, Fade, ..) like the standard one using keywords ?
    Right now, I have a master shader for our game with some additional features that we needed, and I had to create 4 different ones to handle rendering mode.
    When I need to add a new feature, I have to modify all variants. I used a shader function which is way more easier than before, but... I'm pretty sure you can figure something even better.
    - Still not able to add Header/Label/Group in the properties to make it nicer for users ?

    Thanks again for this awesome package
     
  42. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,204
    screenshot.jpg I'm having some trouble with a skin shader that I'm developing. What I'm trying to do is combine my head/mouth/eyelash textures into one. But since the eyelashes will have transparency (double-sided), I'm trying to apply transparency (double-sided) on my entire model using an opacity mask but my internal geometry is showing through (mouth and eyes).

    My character's body also has the same problem. I have a white texture for the opacity mask, and the clothing has it's own shader. Any thoughts?

    On a side note as far as performance is concerned; is it better to combine all of this into one shader, or create shaders/materials for each individual piece; head/mouth/eyelashes?

    Thanks.
     
  43. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    hopeful and Amplify_Ricardo like this.
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thanks!

    We are very happy and humbled to be part of this year nominees, it's an honor seeing our product next to so many fantastic entries.

    A very special thank you to all ASE users, we cannot thank you enough for all your support.
     
  45. christophercimbaro

    christophercimbaro

    Joined:
    Aug 30, 2017
    Posts:
    12
    Hi Amplify team and Unity users,

    I have some questions about POM, acutally I'm working on eye shader with parallax mapping it compiles but the parralax go "outside" contrary to "inside".
    When I used Parralax Occlusion Mapping; I think it's the good way to get something like Iris "inside" but I have compile error.

    I allready check shader propose in example but my brain is burning :)

    Any idea?

    Have a nice day,
     

    Attached Files:

    KRGraphics likes this.
  46. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    What exactly is failing? Is it a static baking that doesn't show? only partially? Also, have you tried clearing and rebaking? Send us screen and/or a shader.

    Thx for the suggestions, some of them we already have plans to do, it's more of a priority thing. The only one where we don't have any plans on changing is the rendering modes, you see, unity standard shader controls the rendering modes by use a special material inspector. We don't want that the shaders ASE produces to be bound by the editor, we want that you can share that shader with anyone without also having to deal with dependencies. But of course this could be something you really want, so what you can do is simply override the material inspector of the ASE shader by one you created to do whatever you want. So you can create your inspector that mimics unity and you can set you shader to use that inspector. You can control the flow of the shader with shader keywords, just like unity does.

    What are the by-hand modifications, most likely those can be translated to node instructions or keywords settings, if it something we can change to support it we'll take a look. Share that information with us and we'll take a look, you can send an email or PM if you prefer.

    You should turn the casting shadows option on to let the depth to be written properly. (deactivate shadows in the renderer if you really need it)

    There's all sort of issues with transparency ordering, your best bet is to not deal with those as much as possible so I would use a different shader the eyelashes. In fact I would even consider using alpha test (with or without dithering) to save some overdraw issues. The only other good solution is with multi pass shaders, which is a thing we are still working on for templates to support it, this is for cases like hair.

    Thanks a lot :]

    The nomination itself already means a lot to us. ;)
     
    JakubSmaga and brisingre like this.
  47. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    i have a weird question... is it possible to write a shader to bake a custom dynamic reflection probe & try to generate shadows from the cubemap?
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I have an eye shader that solves your issue. It includes the ability to have cataracts
     
  49. christophercimbaro

    christophercimbaro

    Joined:
    Aug 30, 2017
    Posts:
    12
    Woot nice KRGraphics, can you screen shot how you construct it? or just share how you plug your POM node?

    Best,
     
  50. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    I just wonder what can amplify shader editor can do for the deferred rendering path mode?