Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

[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. rekka3000

    rekka3000

    Joined:
    Feb 9, 2014
    Posts:
    46
    I actually saw that you posted that exact same thing about 6-8 pages back and tried to replicate it exactly as that image shows but all I got was black.

    I’ve placed a camera with a script that tells it to render depth and normal textures, I’ve also tried both rendering paths and neither worked. Just a totally black object.

    Any idea why?

    Nevermind, seems to be working now.
     
    Last edited: Mar 4, 2018
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    I have been in complete support for Amplify ever since you guys created the motion blur plugin years ago and that support is not going to waver. I have seen videos of the new Unity Shading Editor and I am sorry but it looks clunky and unintuitive right now. Like just to add a diffuse texture takes many unneeded steps, where in ASE, it just takes two...

    Keep going with this asset. It won an award for a VERY good reason. The support is top notch, we get new updates frequently, and most importantly they LISTEN to their userbase. And the shaders made are kick ass... I can't wait until we get the advanced features (I haven't touched my game in a while, working on something bigger)
     
  3. Endi24

    Endi24

    Joined:
    May 6, 2015
    Posts:
    41
    I am baffled by the lack of a proper tutorial, at least an intro to the things you can achieve. The video tutorials are lacking and the documentation is very poor. You have to already know how to code shaders to use this asset, for total beginners there is nothing of use. If there is, please link me to somewhere I can get started, all I see is a "beginner" tutorial where you guys make an advanced water shader.
     
  4. rekka3000

    rekka3000

    Joined:
    Feb 9, 2014
    Posts:
    46
    Hi guys!

    So I made a breakthrough with the post processing shader and got it to do what I wanted! I'm posting my project and a screenshot. Feel free to improve and share the improvements here :D! Using the toon shader that came with Amplify so remember to remove the inbuilt outline.



    Edited: Decided to update the file as i've added a few more improvements such as color correction on line color, and a few other things.

    Things that need fixing or improving:

    1. Need to find ways to remove noise from the incoming normals and improve quality of depth.

    2. I'd also like to improve the line thickness and make it more uniform.

    3. Would like to make it easier to get a good look across the board with only minor slider adjustments.

    4. Node simplification / cleanup.
     

    Attached Files:

    Last edited: Mar 4, 2018
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    I duplicated the ASE toon shader and renamed it in ASE, the inspector doesn't show the properties and the consoles spits out errors. It's with the latest ASE in the asset store.
     
  6. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    also both the original shader and the duplicate lose connection to custom lighting every now and then.
     
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    another bug: I was changing the sibel graph, then undid everything and the output node disappear, I get this instead
     
  8. sazberryftw

    sazberryftw

    Joined:
    Dec 12, 2016
    Posts:
    39
    Awesome! Will check it out. :)
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,510
    Unfortunately, we were not able to replicate this one. Can you replicate the issue in a new empty project? If so, please describe your steps.

    Thank you for reporting the issue, we were able to replicate it on our side. We'll let you know as soon as we have any new developments.

    Thank you for your continuous support and feedback, we really appreciate it!

    Amazing progress, great to see it in action!

    Thank you for sharing it with the community, we really appreciate it. If you're interested, we would be happy to check it out and possibly include it in the official package.


    Sad to hear that the available material did not fulfill your requirements but we are open to requests. Which areas did you find lacking in terms of video tutorials and documentation?

    We have actually put a lot of work into our wiki documentation, including node information, and several tutorials. I'm not entirely sure if it's the tutorials or our approach in publicizing them that didn't work well here; let us know, your feedback is crucial!

    We don't have any advanced water tutorials, might you be referring to a community video?

    Our learning resources are available in the official wiki bellow:
    Amplify Shader Editor Wiki

    You do not need to be an expert shader programmer but there are some concepts that you will need to learn in order to build shaders with a visual node editor. The editor itself is very intuitive, you will get the hang of it in no time. If you are unfamiliar with shader programing, I recommend checking the book below.

    Unity 5.x Shaders and Effects Cookbook

    Thanks!
     
    Last edited: Mar 5, 2018
  10. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    restarting unity fixed this...
     
  11. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    291
    That could be an issue with our parser. There are a few issues with how we read those parameters that have been fixed on our side, just not released yet so it could be it. We'll check that tomorrow. Thx for the report.

    Uhmm, that should had been fixed by now, can you try creating an empty project and test it there? I'm now suspecting some sort of plugin interference. Before, the issue was due to undo system being broken but it should be fine since we fixed it. I'm kinda lost on what to search for since we can't reproduce it.

    There is an issue with the detection of templates and when unity's importer kicks in. If yours is the same case we have fixed it already but it'll only be release in the multipass build which is now in the testing phase.

    Are the other two issues also gone after restarting? They seem to be related to the main one but I just want to be sure.
     
  12. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    besides the issue with Sobel, which also happens with every other shader, no. that fixed in the download web page?
     
  13. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,502
    Has anyone made clay with ASE?
     
  14. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    291
    Not yet, we found it when creating multipass, we could try to retrofit the fix but since multipass is just around the corner I hope you can wait a few more days for it.

    We check the other issues, thx for reporting ;)

    Ahhh that makes more sense now. There are a bunch hotkeys and special graph functionality that eventually becomes hidden. We are preparing a new tutorial video just for these quick tips. I'll make sure to include the "hold" aspect of those.

    That makes sense. Right now the search is simply returning the first hit which is being ordered by their categories. We also want to add search keywords for the entries to be able to search more intelligently. We would like to keep the categories in the search somehow so I'm not sure how we are going to accommodate your request but I totally understand it and I agree with it. I need to think on that. Thx for the suggestion :)
     
    laurentlavigne and brisingre like this.
  15. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    238
    Hi,

    I have created a custom Material Attribute drawer, which @sazberryftw described. I.e. being able to toggle the ability to edit fields, based on other fields values. E.g. A field is not editable if the toggle switch is ticked. I have decided to share, I have attached a unity package, which just needs to imported into your project to use this attribute.

    The format of the attribute is as followed
    Code (csharp):
    1. EditableIf(Field you want to check, Comparison, Value to make comparison true)
    The valid comparison terms are:
    • EqualTo
    • NotEqualTo
    • GreaterThan
    • LessThan
    • GreaterThanOrEqualTo
    • LessThanOrEqualTo
    Note: Vector and colour fields have extra parameters that can be used for the comparison

    In the following examples I have used a float field to demonstrate the ability to edit the field being turned off/on, but this should work for any field type.

    here are some Examples:
    Toggle:
    Toggle Is true

    EditableIf(_UseThing,EqualTo,true)


    This will allow the value to be edited, if the Toggle box is ticked
    Note: you can pass false in instead of true, to invert this option.

    Floats:
    x Equals value

    EditableIf(_float1, Equalto, 1)

    This will allow the value to be edited, if the property _float1 is equal to 1. (_float1==1)
    Note: NotEqualTo is also a valid argument which will do the opposite of this example. EditableIf(_float1, NotEqualTo, 1) (NotEqualTo != 1)


    x Greater than value
    EditableIf(_Float1,GreaterThan,1)

    This will allow the value to be edited if the property _float1 is Greater than 1. (_float1>1)
    Note: GreaterThanOrEqualTo Can be use to make the value inclusive. EditableIf(_Float1,GreaterThanOrEqualTo,1) (_float1>=1)

    x Less Than value
    EditableIf(_Float1,LessThan,1)

    This will allow the value to be edited if the property _float1 is Less than 1. (_float1<1)
    Note: LessThanOrEqualTo Can be use to make the value inclusive. EditableIf(_Float1,LessThanOrEqualTo,1) (_float1>=1)

    Colour:
    x Equals r,g,b,a

    EditableIf(_Color0,EqualTo,255,255,255,255)

    This will allow the value to be edited, if the property _Color0 R,G,B and A value all Equal 255. (_Color0.R==255 && _Color0.G==255 & _Color0.B == 255 && _Color0.A == 255)

    x Equals alpha
    EditableIf(_Color0,EqualTo,null,null,null,255)

    This will allow the value to be edited, if the property _Color0 Alpha value is Equal to 255. (_Color0.A == 255)

    a Greater than blue
    EditableIf(_Color0,GreaterThan,null,null,125)

    This will allow the value to be edited, if the property _Color0 Blue value is Greater Than 125. (_Color0.B > 125)
    Note: as I do not want to check the Red or Green Values, i have entered "null" for the parameter
    Note: I have not inputted a value to check for Alpha, as i do not want to check it. Simularly, if I wanted to Only check the Red Value I could have used EditableIf(_Color0,GreaterThan,125)



    Like wise with floats GreaterThanOrEqualTo, LessThan, LessThanOrEqualTo comparison terms can be used for colours.

    Vector:
    Vector Checks work the same as colour checks. unfortunately, a limitation is that vector checks can only be integers.

    Texture:
    x Does Not have a Texture

    EditableIf(_TextureSample0,Equals,null)

    This will allow the value to be edited, if the property _TextureSample0 does NOT have a texture

    x Does have a Texture
    EditableIf(_TextureSample0,NotEqualTo,null)

    This will allow the value to be edited, if the property _TextureSample0 does have a texture


    Note: There is a limitation that you can not use multiple property drawers at a time on the same field. I.e. if you have a [toggle] property on the same field, you might not get the expected results. I have solved this for standard property drawers(https://forum.unity.com/threads/drawing-a-field-using-multiple-property-drawers.479377/) so it might be possible to port this solution to material property drawers.

    I hope you enjoy :)


    Edit:
    Updated version: https://forum.unity.com/threads/bes...der-creation-tool.430959/page-60#post-3416166
     

    Attached Files:

    Last edited: Mar 7, 2018
  16. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you so much for sharing this with the community, it will be extremely useful for testing with the custom attribute system! Do you mind if we include it in the ASE package and Wiki, giving full credit to yourself?
     
    hopeful likes this.
  17. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    238
    :) yeah sure feel free to include it into the package/wiki. I can comment the code if that would be of help?
     
    hopeful likes this.
  18. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    440
    Any idea when we can use this for HD SRP? Will this be attempted after HD is 100% finished, or is there an earlier point?

    [Edit -- basically, I would rather use you guys than have to poke at the new Shader Graph stuff]
     
  19. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you! If you have the time to provide commented code I'm pretty sure many users would find it extremely valuable, we'll leave it at your discretion.


    Thank you for your support! Although we can't offer a specific date, we want to support HD SRP as soon as possible and we're currently working on it.
     
  20. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    All of these updates are awesome. I'm still waiting eagerly for multipass rendering and hair shading models so I can move forward with my shading suite.
     
  21. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    238
    Please find attached an updated version of the EditableIf Attribute. I have added code comments.

    I have also added support for Hex value colours:

    i.e.
    EditableIf(Color 0,EqualTo,#FFFFFFFF)

    Checks to see of _Color0 Field Is Equal To White (255 alpha)
     

    Attached Files:

  22. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83
    How could I increase the speed of Sin Time? There are outputs for slower speeds, but I'd like a faster option.

    I looked at the Sin node, but don't understand 'input value must be in radians unit system' (from the wiki).
     
  23. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thanks, we're looking forward to see more of your creations!


    Thank you! Could you please submit it through our Contribution Form, so that we may share your contribution in the main package? Don't forget to read the Submission Terms and Requirements, thanks!


    Hello! Even though a radian value is expected, depending on the type of effect you're trying to create, you may choose to use any value with the Sin function. One possible solution for producing the Sin Time wave effect with greater speed would be to use both Float and Time nodes with a Sin node, as per the screenshot below.



    Please let me know if this helps, thanks!
     
    deab likes this.
  24. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83
    Thank you that's perfect!
     
  25. markashburner

    markashburner

    Joined:
    Aug 14, 2015
    Posts:
    194
    Hi will it be worth buying Amplify Shader Editor and will it work with Unity 2018? Or will it cause problems with their shader graph?
     
  26. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! We've actually released a public announcement regarding Unity 2018 and its Scriptable Render Pipeline, you can check it out on our website.

    In short, Amplify Shader Editor supports Unity 2018, will support the creation of SRP compatible shaders and, at its current state, it's still the go-to solution for flexible shader development on Unity, with premium support, fast iteration times and new upcoming innovative features that are planned for 2018!

    Additionally, the main ASE package includes a growing collection of shader samples ( +50 ), and we're currently releasing both Beginner level and Longer Misc video tutorial series ( open to requests ).
     
  27. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    385
    Hi there, Sorry if this has been answered before, but I couldn't find an answer in the info/docs.

    I need a shader just like the Standard Shader but which allows the 'detail maps' (diffuse and normal) on android/ios - Can I use Amplify to make one?
     
  28. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    I have a custom shader that allows me to add detail maps on my models based on a RGB texture that will serve as a mask. I had to use an append node and lerp it.
     
  29. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    385
    Thanks for your thoughts @KRGraphics - actually I think I maye have been reading out of date information. It looks like you can turn 'Detail Normal Maps' on now in Edit/Project Settings/Graphics/Tier Settings... I've yet to try though. The info gave me enough encouragement to carry on with my wrapping and mapping :)
     
  30. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    I created my shaders after watching videos on how Paragon was done
     
  31. Crocomodo

    Crocomodo

    Joined:
    Nov 21, 2017
    Posts:
    27
    Sorry I've been busy with work and not login for a long time. The outline is vertex offset, that means its zdepth is lesser than the mesh itself. So I set Zwrite In outline node to off to let the mesh render over outline regardless of outline's depth.
     
  32. sazberryftw

    sazberryftw

    Joined:
    Dec 12, 2016
    Posts:
    39
    Hi, that's okay! I'm a little confused though because it's not turning ZWrite off that gives you a silhouette, it's turning ZTest Mode to Always. I don't understand how you can achieve a usable effect this way when it makes your mesh render backfaces in front and renders the mesh in front of everything else in your scene?

    silhouette.PNG
     
    Last edited: Mar 9, 2018
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, it's definitively possible, we do provide some nodes to facilitate the use of detail maps such as the Blend Normals and Lerp.


    Thank you for sharing these tips!
     
  34. davidosullivan

    davidosullivan

    Joined:
    Jun 9, 2015
    Posts:
    385
    Thanks for getting back to me- looks like I might have to do this even though it appears you can turn detail normal maps on for mobiles if you want now.

    the problem I'm having now is that I want detailmaps and lightmaping since the object is going to be static. So I'm not sure how I need to go about this... would I be right in thinking that I should put my base UVmap in channel 0, leave channel 0 free for the lightmaps (this is the channel I was using for the detail map and works with the standard shader- but that only lets you choose between 0 and 1 regardless of how many channels you model actually has- and importing my object with 'Generate Lightmaps' appears to overwrite this UV set) and then have my 'Detail UVs' in channel ?

    This whole channel thing is very confusing. Some places in the Unity UI it refers to UV 0/ UV 1 but on the actual imported mesh it refers to 'uv and uv2' for the same things... also a read somewhere that one of these channels is for the realtime lightmap, so would that mean I need to output my model with 4 UV channels, one with the base, another empty one for the baked lightmap, another empty one for the realtime lightmap and then a final fourth one for my detail map?

    Or is it the shader that determines which channels are used when you bake the lighting in Unity? In which case if I use Amplify, I could define that?

    Also will 4 UVs impact the number of imported faces? My model is already split into three because its really big....
     
  35. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    A new build was just uploaded into our website and this is a big one for us!

    We've added support to multi-pass shaders into templates which will greatly extend their functionalities.

    Since a lot have changed on the templates internal architecture and we don't want to anyone to loose work we STRONGLY SUGGEST TO BACKUP YOUR SHADERS AND CURRENT ASE VERSION BEFORE UPGRADING TO THIS ONE.

    (Apologies for the caps but we really really don't want to anyone to loose their work)

    Here are the release notes.

    Release Notes v1.4.5 dev 04:
    • New features:
      • Added support for multi-pass templates
      • Added support for Lightweight Scriptable Rendering Pipeline
    • New Shader Function:
      • Create Normal
        • Generates a normal map from an height map
    • New Template:
      • LightweightSRP
    • Improvements:
      • * Exposed Specular Color property into the Output node material list when Blinn Phong Light Model is selected
    • Fixes:
      • Fixed texture coordinates generation in templates
      • Changed initialization in 'Triplanar Sample' node to prevent null pointer errors
    For now the we are providing only one new template which is called LightweightSRP, with it you can create shaders which use the new Lightweight Scriptable Rendering Pipeline.

    Please be aware that these shaders are only compatible with the latest beta versions of Unity 2018.1 with the Lightweight SRP correctly installed and configured.

    A lot has changed with SRP so some nodes aren't supported yet, others might behave a bit differently or even have more options. Due to the way SRP works and how fast it has been changing these past months some things might break.
    We'll fix, add and extend functionality as SRP becomes more stable and we get reports on this.

    To use Lightweight SRP you first need to unpack the package called SRPTemplates which you can find under the AmplifyShaderEditor > Plugins > EditorResources > Templates > SRP folder.

    We had to do this because otherwise older versions of Unity would fail to compile correctly. We'll change this in the future when we find a good solution.

    Likewise, this build like we previously stated, only contains a basic sample using Lightweight SRP and just like the template it needs to be unpacked. You can find it under the AmplifyShaderEditor > Examples > Official >
    SimpleLightweightSRP
    folder.

    Here's a glimpse of how it looks:

    LightweightSRPSample.jpg


    Starting next week we'll be also updating the templates online documentation with all the new changes we've been developing, so you can get a grasp on how you can start creating your own multipass templates.

    If you notice that your shaders don't load correctly or are having incorrect results after compiling them, please send their version before being compiled with this new version to us ( and also the templates if not using the official ASE ones ) via the support@amplify.pt email.


    Hope you guys have a great weekend and happy shader creations!
     
    Last edited: Mar 9, 2018
  36. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    143
    Hi,

    i am trying to put together shader with opacity mask. I need to have procedural linear and spherical fill basically. I am using vertex postion and some basic things i found in example shaders, but i am not sure if i am going in right direction. The cylinder should fill from nothing to full cylinder, i tried messing around with Rotator, but it seems i can only Rotate the mask, not realy do the fill.
    I am attaching some images.

    Thanks for any help.
    Luke
     

    Attached Files:

  37. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    Sweet... I've been eagerly awaiting multipass rendering for hair
     
    Amplify_Paulo likes this.
  38. Crocomodo

    Crocomodo

    Joined:
    Nov 21, 2017
    Posts:
    27
    I set Zwrite = Off, Ztest = less in Outline node and Zwrite = on, Ztest = less in Output Node. This way I don't get backface problem you mentioned but the outline pixel will get overwrite by everything that render after it. I believe there is a better way but this is all got from trial and error right now.
     
  39. rekka3000

    rekka3000

    Joined:
    Feb 9, 2014
    Posts:
    46
    If I wanted apply light attenuation, but instead of using the attenuation node (which looks up the inbuilt texture with the code baked in) I wanted to build it from scratch can anybody make a sample of how that would look in Amplify Shader Editor? I tried doing it but I couldn't get the falloff working, doesn't seem theres a way to get light range from the light position node. If somebody could make a shader file or post the node setup for how to built attenuation without the attenuation node, that would be great!
     
  40. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    291
    I'm not really sure what kind of radial growth you are looking for but here are a couple of examples. Hopefully they'll help you get what you want. Both a based on the default cylinder and use vertex position but you can do it using UV for instance. Also you don't necessarily need the distance node (you could use the length instead) but that way you can customize the center of the effect. I'm doing both based on the Y axis (XZ outputs) but you can use any other.

    Styles.PNG radialstyle.PNG clockstyle.PNG
     
  41. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    291
    I've already did some initial tests and I can tell you it works. In fact, one of the templates we want to eventually provide is one for hair rendering.

    We still need to update the documentation but if the existing template isn't enough for now don't hesitate to ask for help.

    The outline node doesn't work for all situations. If I look at the wiki outline shader the passes are inverted. I don't know if that is what you need for your case but if you need something like the shader in the community wiki you might need a custom template for it (which was also a reason for the multipass support in this past build). We do intend to add more templates, in fact I'm working a new standard template. Adding an outline pass to it is super easy. We'll be adding these in the next week or so, if you can't wait you can try creating your own custom template.

    Uhmm thats a bit tricky, we might need some extra changes to support that, because currently both textures and matrices don't allow for custom fetches. What do you want to substitute it for? Like a different falloff texture? or maybe shader calculations?

    Adding the "fetch" features for textures and matrices is easy to add, another issue might be how to filter them in different passes. We will need to change the static switch as well. I'm saying this because I'm assuming you want it to work for points and spots only.
     
    arnoob likes this.
  42. Wekthor

    Wekthor

    Joined:
    Apr 30, 2011
    Posts:
    143
    Amazing, worked like a charm. Thanks a lot good sir.
     
    Amplify_Paulo likes this.
  43. rekka3000

    rekka3000

    Joined:
    Feb 9, 2014
    Posts:
    46
    Was thinking of changing the shader calculations to allow for different types of falloff, it’s nothing absolutely necessary but in my continued search to improve my Shader, changing falloff values would help greatly. I suppose changing the falloff texture might work, but shader calculations would be more flexible right?

    Looking at the new beta, the upcoming enhancements to lighting in the HD SRP look to be quite interesting.
     
  44. sazberryftw

    sazberryftw

    Joined:
    Dec 12, 2016
    Posts:
    39
    Ahh I see you're changing the outline settings and the general shader settings. I managed to achieve what you're explaining now. :)
     
  45. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    152
    Does this mean that we will be able to make transparent shaders that can also receive dynamic shadows?
     
  46. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Due to Unity's way of managing Lightmap UV generation and use in Surface Shaders, you will have to use channel 4 for the detail maps. The naming of the channels can become quite confusing, as it follows different standards in Meshes and Shaders, please refer to the following image for further guideance:



    Fragmented UV clusters and the amout of UV channels used influence the final vertex count.


    Transparency and shadows is quite the complicated subject, it's mostly related to rendering limitations present in most engines and not a matter than can be easily solved by making use of multipass.

    While it is possible to have a transparent object write on the zbuffer in order for it to handle shadows, its not possible to do it partially, meaning that the object will either receive the whole shadow information, or allow it all to go through.
    The intermediate solution that is present in Unity is to make use of dithering to fake this effect, but its only helpful in the casting of shadows, not the receiving.

    In sum, a custom solution would have to be written and implemented, as by default Unity provides no means of achieving what you intend.
     
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,995
    I can look at the template... the hard part is using this with custom lighting. I want to have the Marschner shading model for this one, but I can't emulate it. And the closest to this is Alloy with Kajiya Kay... I would love help getting Marschner and Kajiya-Kay into ASE...
     
    Last edited: Mar 14, 2018
    one_one likes this.
  48. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, we're still working hard on the Multi-pass documentation which will provide all the necessary information on how to develop templates that support it, we'll be sure to let you know as soon as it's done.

    Amplify_Paulo has already begun working on a template for hair, it'll be included in the main ASE package in the near future.

    Our developers are fully committed to this new feature and are doing their best efforts to provide proper documentation and samples in a timely manner, thank you for your patience and understanding!
     
    KRGraphics and one_one like this.
  49. JBT27

    JBT27

    Joined:
    Jul 13, 2016
    Posts:
    197
    For a landscape mesh, I'd like to create a shader that applies textures according to slope. I am very noob to this, though not to working in 3D and graphics. I am thinking I'll have to set up a tree that calculates the slope first; kind of stuck at the starting gate and would appreciate some pointers please.
     
  50. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, depending on the implementation you intend to use for this type of effect, a simple way and good starting point would be to Lerp between textures using the World Position or Vertex Position nodes as Alpha.

    We provide a few samples that you can examine for further examples, such as the EnvironmentGradient and the TerrainSnowCoverage ( which is adapted in this post with a different method for calculating the snow coverage effect ).

    Please let me know if this helps, thanks!
     
    JBT27 likes this.
unityunity