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

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Could we have a "pbr lighting" node that outputs a color that we can use with the unlit/custom lighting models? It would be cool to do multiple layers of pbr in one shader.
     
  2. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! It's definitely possible, in fact, we've considered adding something along those lines for both LW and HD SRP, however, we can't offer any estimates of when we'll be able to tackle this.
     
  3. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I have to check and see if the new updates support alpha blending for things like hair. And in previous versions of the HD Template, the Kajiya-Kay and Scheuermann Shader Functions stopped working. My hair shader wouldn't compile
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    AthrunVLokiz and KRGraphics like this.
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    So, in updating my hair and skin to HD SRP, I ran into an issue where the shader would break whenever I tried to compile it for testing... here is the error I would get when I tried to update it. I also removed the Legacy HD SRP before installing it.


    Update: I managed to get my hair shader working with the HD SRP... I still get errors when I set the shader to AlphaTest but it looks VERY good now.
     
    Last edited: Oct 30, 2018
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    upload_2018-10-30_2-24-1.png

    Here is a capture of my updated hair and skin shading... I am very impressed. This is the Kajiya-Kay hair... I still need to get the Marschner shading model on this... and then we are in business. :)


    How can we add Multipass Rendering to the hair? Unfortunately, the shader breaks when I plug in the shader function for Kajiya-Kay
     
    Last edited: Oct 30, 2018
  7. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    The HD templates are already multipass, you can refer to the documentation for more information on how to set them up. Regarding the errors you're getting, could you send us a sample that includes the problematic shader function so that we can run some tests, as you might've stumbled upon an issue? Please do so through support@amplify.pt, if possible.

    We're also going to run some further tests on the AlphaTest as soon as possible to ensure that its working as expected.
     
  8. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437

    hi.
    the point was not in tesselation itself. it works ok.

    displaced terrain by any kind of map not working.
    i tesselating terrain and then i simply want to see displaced terrain by using disp map. so first 4 textures works ok, but not next textures in terrain. i feel like terrain use add pass shader and blend materials with previous material. i dont understand why material with add pass looks like semitranspaernt.
     
  9. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    The substance sample doesn't work for me and i cannot find the node for it.

    I'm definitely on the correct version...am i missing something? I have substance for unity installed.

     
  10. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Will do. And good to hear that they are multipass, but the hair on my character's head looks very thin despite all of the planes on the head. It's like there is no depth in the hair at all :(
     
    Last edited: Oct 30, 2018
  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Sent a Unity Package containing the entire character and textures for hair and skin. Needs HDSRP active.
     
  12. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    In order for us to best help you, we'll need a sample with the issue present in order to debug it on our side using the same data as you, as we've been unable to replicate it.

    Please share it privately through support@amplify.pt and we'll get back to you as soon as possible, thank you for understanding.


    Did you import Substance2018.unitypackage after installing Substance in Unity?


    Thanks, we'll keep in touch via email!
     
  13. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    874
    Yes i found the substance2018 package in the amplify examples/official folder and got that. Which is where the screen shot comes from.

    and substance in unity is installed with the latest version. Substances work perfectly fine in my project, I just don't get the node at all.
     
  14. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Unfortunately I can't seem to be able to replicate this on my end, can you replicate it in a new project only containing Substance in Unity and ASE?
    If so, can you provide a sample or additional information regarding the steps you took until the issue occurred?

    We apologize for the inconvenience.
     
  15. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey guys,

    To complement a bit what @Amplify_Borba asked, can you go to your Player Settings > Other Settings, search for the Scripting Defining Symbols and check if it contains the SUBSTANCE_PLUGIN_ENABLED symbol?



    This should be set by the Substance by Unity plugin, but if its not there, can you manually place it and re-open the ASE canvas?

    Also, just uploaded a new build into our website.

    Here are the release notes:
    Release Notes v1.5.8 rev 01:
    • Fixes:
      • Fixed issue on Live Mode writing on non ase shaders when loaded into canvas
      • Fixed issue on MacOS with scroll bar over Texture Array Creator tool
      • Fixed issue on MacOS with 'Function Input' node generated default Sampler 2D value
    • New Shader Function:
      • Substance Blend Metallic
    • Improvements:
      • 'Grab Screen Color' node is now supported on LW SRP
        • Uses the new _CameraOpaqueTexture which must be requested on the pipeline asset
          • Must toggle on the Opaque Texture option over its General foldout
      • Added Clip and Tangent spaces into 'Transform Direction' node
      • Added Tangent space into 'Transform Position' node


    Hope you all have a really scary/cool Halloween and happy shader creations!
     
    Last edited: Oct 31, 2018
  16. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    is there a way to get shadows on animated arms with weapons in dual camera fps setup? still havent found a way of doing this with amplify.
     
  17. ArthurClark

    ArthurClark

    Joined:
    May 12, 2013
    Posts:
    15
    Couldn't find the answer in the topic. I need to make a shader for unity standard sprite that can perform a color swap. Like this:

    How can I achieve this with Amplify Shader?
     
  18. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, can you elaborate on your setup or similar existing effects that you are trying to achieve with our editor?

    Thanks!

    Without using masks? If so, you'll need a way to isolate specific values. I recommend checking our Light Reveal sample, lower left area where we compare our colors.

    With masks you simply need to multiply your texture with a color node. Be sure to let us know if you're looking for something more specific, we would be happy to elaborate.

    Thanks!
     
  19. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    i want the standard metallic roughness shader that renders on top of everything else and receives world shadows.
    im using a dual camera render setup for different fields of viewing angle. so my gun doesnt clip thru walls but it doesnt receive shadows from the environment. preferebly deffered rendering.
     
  20. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thank you for elaborating. I'm afraid that's a bit tricky to achieve due to the way Unity handles lighting(your second camera is not rendering/accessing any shadow casting objects), you'll likely need more than a simple shader to achieve proper results. I must point out that this is quite the undertaking, from our experience in external projects(unrelated to our editor) there's always some type of compromise with the standard pipeline.

    The new HD renderer might be a viable alternative but I can't guarantee it.

    In the meantime, I recommend looking into dedicated alternatives.
     
  21. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    yes ive been looking for a good solution for years, getting shadows on animated arms and guns just gives that extra visual polish. i wish unity had built in solution for this. ill take a look at the hdrp . any pointers?
     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Indeed, it's a common issue for many FPS games.

    I'm afraid we haven't tested that specific effect, hopefully it just works ;) (fingers crossed)
     
    Mister-D likes this.
  23. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    315
    I've been following the Unite this year IRL, and they talked about an alternative in their fps.sample. I don't know the detail but they said they are using the same camera, without FoV distortion. Here's the link: https://blogs.unity3d.com/2018/10/24/introducing-the-fps-sample/
     
    Mister-D likes this.
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Could be a nice reference, definitely something to keep in mind.

    Thanks for sharing.
     
  25. Mister-D

    Mister-D

    Joined:
    Dec 6, 2011
    Posts:
    1,694
    tnx ! will try it out
     
  26. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    161
    Hi, is there any shader example that makes the mesh react to wind zone? I want some parts of the monster to react to wind like this.

    Where should I look into?

    Edit: I did it by calling AnimateVertex from Terrain.cginc in vertex function. But I don't know how to call existing function from included file directly in Amplify.
     
    Last edited: Nov 4, 2018
  27. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    I've got a really strange problem and I'm not sure what may be causing it.

    Here I have a simple float variable, "Distortion Power".

    upload_2018-11-3_5-3-37.png

    As a property, I get an incorrect output even when I've confirmed the material value is 5.0... where it seems the value of the uniform is extremely high.

    upload_2018-11-3_5-4-38.png

    If I change it to a constant, it starts working.

    upload_2018-11-3_5-5-27.png

    upload_2018-11-3_5-5-40.png

    upload_2018-11-3_5-9-0.png

    Any idea why? The property is not used anywhere else.
     
  28. MirzaBeig

    MirzaBeig

    Joined:
    Dec 27, 2014
    Posts:
    602
    Okay, this is super strange!

    If I set the minimum range to 5 and the value is forced to 5 (or 6, 7, any other rounded value) when the variable is a constant, it's fine.

    upload_2018-11-3_5-15-10.png

    But! If I change it to any non-discrete value (5.1, 2.62, etc...).

    upload_2018-11-3_5-15-56.png

    upload_2018-11-3_5-15-34.png

    (don't worry about the difference between 5.24 and 5.12, I changed it when taking this shot).

    upload_2018-11-3_5-24-43.png

    Then if I change it back to 5, it's fine again.

    Using v1.5.8 on Unity 2018.1.6.f1.
     
    Last edited: Nov 3, 2018
  29. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    Hello every one!

    I am currently playing with all the passes in order to make my own screen space effects, and it's pretty fun.
    However, I was wondering if it was possible to include other "post processing example" scripts in the ASE samples?
    The one that is included permits to add a post process effect through shaders, but I was wondering if it would also be possible to includes scripts like that that are setup with the "ImageEffectOpaque" https://docs.unity3d.com/ScriptReference/ImageEffectOpaque.html in order to be able to create ssao and what not without it affecting the transparent objects?

    Anywqay, have a good weekend everyone!
     
  30. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    is there any tutorials to do trading cards effect with amplify? specifically on a UI canvas?
     
  31. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! You can choose to simulate a Wind effect by using Unity's own global variable "_Wind", which provides the wind information based on the Unity Terrain system's Wind Zones that you can use to set up your own animation parameters through the mesh's vertex color.

    In order to use the AnimateVertex function from the Terrain.cginc first you need to make sure that you've correctly included the '.cginc' file in your shader, and you can then call any of its Functions in the code box of the Custom Expression node, just make sure that the 'Call Mode' checkbox in the node's parameters panel is toggled 'ON'. You can find a step-by-step example in our wiki manual.

    You can also create your own custom effect to simulate wind movement, for example, by using a wave function that generates some pseudo random values based on the vertex position of your vertices, and that also accepts a time variable. Then it would be a matter of using vertex color to filter what you want or don't want to move ( ie: paint the base vertices black so it doesn't move with the function ).


    Hello, can you please share the shader and material through support@amplify.pt so that we can debug it on our side, as I'm having some trouble replicating the described behavior? Thanks!


    Hey there, we really appreciate the suggestion and will register it for further consideration, however, we can't provide any ETA for new samples.


    Hello, have you had the chance to check the MaskedUI sample ( AmplifyShaderEditor\Examples\Official\TemplateExamples\UI\MaskedUI ) ?

    It should provide you a good starting point to create your own animated effects for the UI Canvas, and it uses the DefaultUI shader template which is specific for authoring UI shaders.
     
    arnoob likes this.
  32. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    161
    Thank you for your reply. Well, it turns out that the AnimateVertex in TerrainEngine.cginc doesn't work with skinned mesh. I probably have to try harder than that. sigh... I also want to ask your opinion on this.

    What do you think which technique they use to render or animate those fur? At first, I looked at the movement of foliage or tree from other asset store. They use vertex color to control the movement. So, I think that the same idea may be able to apply here but I'm not so sure anymore...
     
    Last edited: Nov 5, 2018
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Unfortunately, I'm not sure about what they've used in Bloodborne, but those effects look quite complex.
    Perhaps a mix of pre-baked phyisical simulation and real-time vertex animation for added variation?

    A simple approach to drive the effect with vertex colors is by multiplying your effect with the information available via the Vertex Color node, however, since each implementation is unique, you'll have to set it up according to your own.
     
  34. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    Hi,

    I'm on Unity 2018.2.14 with a fresh new HDRP project updated to the latest HDRP package (3.0.0), and I'm getting errors when trying to import the HDRP template files for Amplify Shader Editor v1.5.8.



     
  35. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    @Amplify_Borba

    Hi. I'm running Unity 2018.3.0b8 with the HD Render Pipeline, and AmplifyShaderEditor_v158_001. When I install the HD SRP Samples, all the materials in the SRP HD Material Types folder are pink. How can I get them to work correctly?

    Thanks.
     
  36. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello!

    It seems that you've imported the wrong template package, for SRP versions 3.0.0 and below you need to extract the 'HDSRPTemplates (Legacy).unitypackage', while for SRP 4.0.0 and above you'll need 'HDSRPTemplates.unitypackage'.


    Hello, depending on the SRP version that you have imported into your project, you'll need to first install the respective shader Templates after importing the SRP and before importing the samples.

    The template packages are located within the Assets > AmplifyShaderEditor > Plugins > EditorResources > Templates > SRP folder:

    - HDSRPTemplates (Legacy).unitypackage for HD RP 3.0.0 and below
    - HDSRPTemplates.unitypackage for HD RP 4.0.0 and above

    You must also make sure that you've added the HD Render Pipeline Asset over at the Project's Graphics Settings.

    More information regarding this is available in our Wiki manual and in our Official SRP Tutorial video.
     
  37. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Hi, I tried importing the HDRP template for v. 4.0.x, but I'm getting this error in Unity 2018.3.0b8, ASE v1.5.8.001:

    Code (CSharp):
    1. Shader error in 'Hidden/Templates/HDSRPPBR': undeclared identifier 'SampleBakedGI' at /Unity Projects/Horde/Library/PackageCache/com.unity.render-pipelines.high-definition@4.1.0-preview/Runtime/ShaderLibrary/ShaderGraphFunctions.hlsl(20) (on d3d11)
    2.  
    3. Compiling Vertex program
    4. 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_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING
    Any ideas? Thanks
     
  38. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, can you confirm that you've imported the 'HDSRPTemplates.unitypackage' rather than the 'HDSRPTemplates (Legacy).unitypackage'?
     
  39. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Hello, yes I've imported the HDSRPTemplates.unitypackage
     
  40. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Assuming that you're using HDRP 4.0.1, we've tested that version in Unity 2018.3.0b8 and ASE 1.5.8r1 through the following order:

    - Imported ASE
    - Imported HDRP 4.0.1 through Unity's Package Manager
    - Created and added the HDRenderPipelineAsset to the Project Settings
    - Extracted HDSRPTemplates.unitypackage

    And we couldn't replicate the specific issue you're getting.

    Please try deleting the Assets\AmplifyShaderEditor\Plugins\EditorResources\Templates\SRP folder, the HDSRPPBR.shader and the HDSPRUnlit.shader in your current project, then importing the latest ASE version currently available for download through our website, as we believe that this error might be due to an issue with the unpacking/importing of the assets.

    Please let us know if this fixes the issue, otherwise please try the steps shared above in a new project to see if the issue persists, thanks!
     
  41. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey,

    We've been finally able to replicate a similar issue and it's related to the new HD 4.1.0 that was made available recently. We do apologize for now being able to replicate it sooner since we've been testing under the HD 4.0.1 version.

    Our templates are already being fixed and a new build will be uploaded as soon as all the issues are gone.
    For now, and if possible, please use the High Definition RP 4.0.1 package.
     
    IllogikaXBoxOne likes this.
  42. ColtonKadlecik_VitruviusVR

    ColtonKadlecik_VitruviusVR

    Joined:
    Nov 27, 2015
    Posts:
    197
    Hey All,

    I am creating a simple AR proof of concept and I need to be able to render baked shadows on a transparent plane (simulate shadows of the object onto a table). I have seen some examples of transparent planes and shadows but they were all realtime. Is it possible to render baked shadows?

    Cheers,
    Colton
     
    Darthlatte likes this.
  43. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Great news :) Thank you
     
  44. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey everyone,

    We managed to fix all the issue and have already uploaded a new build into our website.

    Release Notes v1.5.8 rev 02:
    • Improvements:
      • Multiple improvements over 'Global Array' node
        • Added support for jagged arrays
        • Added Auto-Register toggle
        • Can reference other nodes through new Mode dropdown ( similar to 'Grab Screen Color' node )
    • Fixes:
      • Fixed memory leak over 'Template Local Var' node
      • Fixed HD templates issues over new HD 4.1.0

    I really need to do some tests on my own over this as I'm not quite sure if its possible. At a first glance I would say it isn't possible over the built'in pipeline since transparent surfaces don't write over the depth buffer thus would not be taken into account when receiving shadows.

    Happy shader creations!
     
  45. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    @Amplify_RnD_Rick

    Hi, so I'm trying to get your "SRPHDMaterialTypes" scene to work, but all the materials are pink. Here is how I installed everything:

    Installed Unity 2018.3.0b8 (3D)
    Installed High Definition RP 4.1.0 from the Package Manager.
    Created Rendering > HDRenderPipelineAsset
    Created Rendering > Diffusion Profile Settings
    Opened HDRenderPipelineAsset, assigned Diffusion Profile Settings in the slot.
    Went to Edit > Project Settings > Graphics. Added HDRenderPipelineAsset in the slot.
    Installed ASE (AmplifyShaderEditor_v158_002)
    Installed AmplifyShaderEditor > Plugins > EditorResources > Templates > SRP > HDSRPTemplates
    Installed ASE Examples
    Installed ASE HD SRP Samples
    Opened the SRPHDMaterialTypes scene. All materials are pink.

    Am I missing a step?

    Thanks.

    Also, is Tessellation not supported yet? If I create a new shader with the Shader Type: HD PBR, I don't get as many options as the Shader Type: Surface.
     
    Last edited: Nov 6, 2018
  46. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    Ah, I wasn't aware that there were newer SRP versions, so I wrongly assumed HDSRPTemplates was for 3.0.0. Got it working now. Thanks!

    I directly ran into this issue though when trying to use the "Depth Fade" node:
     
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I'm getting similar issues with errors when I use the latest template. I've had to revert to the legacy version. And I haven't updated Unity in a while. I'm on Unity 2018.2.1

    Speaking of HDSRP, is there a timeline on refraction Support?
     
    Last edited: Nov 6, 2018
  48. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Hi again, does translucency/transparency work in HDRP? I'm getting all black materials when using this shader. Am I missing something? Thank you

    upload_2018-11-7_10-1-26.png

    upload_2018-11-7_10-1-40.png
     
  49. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey Adamz,
    Since HD SRP 4.x.x is only available over the 2018.3 beta we decided for now to keep all the samples with the v3.x.x which is the one available over the latest Unity stable version. As soon as 2018.3 comes out of beta we will update this sample.
    But it's really easy to update on your end, just unpack the latest HDSRPTemplates.unitypackage, open each one of the materials/shaders from that sample on ASE and hit the Update button.
    Regarding Tessellation, we haven't been able to tackle that yet. We are now on the process of creating a new template based on Unity's HD Lit Master Node, as this one will fix a bunch of problems that HD PBR has with transparency and shadows.

    Thanks for reporting this issue. We were already able to replicate it and will be fixed on our next build.


    If you are using 2018.2.1 unfortunately you will need to keep using the legacy templates. A bit like I explained earlier, to be able to use the new HDRP version you have to migrate to 2018.3.
    There were quite some changes between versions and for us was a must to create a new set of templates for the latest one.
    Regarding Refraction, the new HD Lit Master Node already takes refraction into account so expect it available on our end as well with our new upcoming template. Please notice that it will be only available on Unity 2018.3 and above.

    We were already able to replicate this on our end but are still uncertain on what might be failing.
    We'll let you know as soon as we figure out the issue and provide a fix.
     
  50. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Thank you