Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

Discussion in 'Assets and Asset Store' started by xenius, Mar 2, 2015.

  1. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    I don't know if this had been asked before but Is it possible to have the deferred decal shader work multiplicatively on ambient occlusion? Is that even possible to do with Unity?
     
    Last edited: Feb 16, 2016
  2. Deleted User

    Deleted User

    Guest

    @Skolstvo
    Not ambient occlusion by itself. However, we could have a specialized multiplicative decal shader that only affects the ambient lighting. Is that what you meant?
     
  3. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    @n00body

    Yes. That would be perfect.
     
  4. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    Maybe a stupid question - but how does the skin-shader work exactly?

    I mean regarding the texture maps, it needs.
    For example, how to generate the mask for the (R) Channel (scattering-mask) of the packed texture? Are the masked areas need to be black? Can the whole mask be just white (or empty), when I do not want to apply a scattering mask?

    And the "Transmission thickness" in (A) iof the BaseColor Map - does black mean "thicker"?

    Last but not least, the "translucent" parts, defined by the thickness map should glow in a red-ish color. How to archieve that? Is it done by the shader´s "Tint" + "Weight" sliders under the "Transmission" tab?


    kind regards
     
  5. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    Ok, I found some explaination how the maps are working in the crash course video!

    Only thing remains is, what is the Tint color/instensity good for? (under "transmission") ?
     
  6. Deleted User

    Deleted User

    Guest

    Last edited by a moderator: Feb 17, 2016
  7. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    Yes, but in the documentation, there is no word on how the mask is working nor, how the "thickness map" will be interpreted. (this is important stuff to me). But the transmission thing is kind of well documented, thanks for pointing me to that!
     
  8. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    Can we use alloy deferred skin with uber deferred? I change the "alloy deferred uber.shader" file to include StandardSkin.cginc, but the alloy deferred skin shader still looks wrong.
     
  9. Deleted User

    Deleted User

    Guest

    @Elowan
    The mask just allows you to specify which parts will be lit as skin and which parts will be lit like a Core material (ie. white is just skin shading for the whole surface). As for the transmission/thickness map, please read our docs:
    https://alloy.rustltd.com/documentation/transmission-maps

    @wdw8903
    Sadly no. UBER uses the free G-Buffer channels differently from us for their transmission system. As a result, our deferred transmission and skin effects are mutually exclusive with theirs.
     
  10. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    well, UBER has 4 translucency setup for deferred rendering, which is helpful for different translucent object. I want have different skin type for character and monster, is it possible?
     
  11. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    Could you do a quick write-up on how to use the Terrain Shader: 4 Splat TriPlanar please? I'm running Unity 5.3.0of4. When I select my terrain and choose the Settings tab in the inspector, I chose Custom under Material and assign: Alloy>Nature>terrain>4 Splat TriPlanar and I get this error: "Cant use materials with shaders which need tangent geometry on terrain, use shader in Nature/Terrain instead." Thoughts?
     
  12. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Did you create a new material first and assign the shader to that material? Probably, but thought I would ask. :)
     
  13. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    I did create a new material and tried to assign it in the Terrain > Settings tab, in the Material: Custom area.
     
  14. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Did you go into the Preferences and make changes? You need to set it to use Alloy as the standard shader.

    I remember having the same problem as you and figuring it out..but can't remember how. :(
     
  15. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    If you're referring to the Graphic Settings, I have the Deferred and Deferred Reflections set to Alloy. Is there another just for Terrains? It's not under that tab...
     
    punk likes this.
  16. Deleted User

    Deleted User

    Guest

    @wdw8903
    If you want different skin types and UBER deferred transmission then you will need to use the forward-only version of our skin shader.

    @adamz
    Looks like you stumbled onto a bug in our TriPlanar terrain shader. I'll prep a fix for the next release.
     
  17. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    I want to use deferred shader as more as possible, alloy skin shader is necessary for me, not uber transmission, so if alloy skin shader can set different type in deferred, that will be great.
     
  18. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    I did some research for the tessellation shader and want to ask, if it possible to add a "distance" slider to control when the shader begins with auto adjusting its tessellation factor based on the distance. I want to hide this effect from the player, as it looks strange if it starts too early.

    Thanks
     
  19. Deleted User

    Deleted User

    Guest

    @wdw8903
    Even in that case, you will still need to use the forward version of our skin shader for all the non-human characters. We can only support one skin material for our deferred path due to the limitations of the data we can store in the G-buffer.

    @Zyblade
    While Unity does provide a distance-based tessellation function we don't support it and adding support for it would require making another set of tessellation shaders. See Unity's breakdown of the tessellation variants:
    http://docs.unity3d.com/Manual/SL-SurfaceShaderTessellation.html
     
  20. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    @n00body What causes the tessellation triangles to move aroung while zooming? I thought it was due to the auto distance adjusting feature, but if you say alloy doesn't support it(which is fine to me as culling/lod objects is enough for me), there must be some other reason. I could record a little video later today if you don't know what I mean by "wobbling tris while zooming", hard to describe for me.
     
  21. Deleted User

    Deleted User

    Guest

    @Zyblade
    Well the triangle edges change length on screen so the amount of tessellation adjusts based on that rather than distance from the camera. I'm not a tessellation expert, so I don't know what else to tell you.
     
  22. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Does this work on all platforms? I am a Wii U developer and interested in taking a closer look at this. Also, how does performance compare to the Unity Standard Shader?
     
  23. Deleted User

    Deleted User

    Guest

    @magique
    We don't support the WiiU. As for performance, our shaders are heavier because we use a more sophisticated material lighting model as well as area lights.
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks for the information.
     
  25. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Hi, is there any way to use Wrinkle map with alloy skin shader?
     
  26. Deleted User

    Deleted User

    Guest

    @ksam2
    Currently no. That's a fairly advanced and specialized feature, so it's not a high priority on our list of potential additions.
     
  27. Deleted User

    Deleted User

    Guest

    @Elecman
    Oops. Sorry, your question was lost in the shuffle. Yes, we support both alpha-blended and additive mesh decals, both with masked emission support.
     
  28. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    No problem, thanks :)
     
  29. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Is there a tutorial to replace Unity terrain shader with Alloy terrain shader splat map ?
     
  30. zmaxz

    zmaxz

    Joined:
    Sep 26, 2012
    Posts:
    143
    Hi !!
    Is there any way to use "double sided" with Alloy_Core shader ?
     
  31. Deleted User

    Deleted User

    Guest

  32. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    I never changed terrain materials, thank you.
     
  33. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Anyone experiencing the same issue when opening the Material map channel packer editor the editor is filled with these errors ?:
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)AlloyMaterialMapChannelPacker.OnGUI () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyMaterialMapChannelPacker.cs:214)AlloyMaterialMapChannelPacker.UpdateDefaults () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyMaterialMapChannelPacker.cs:262)Alloy.AlloyCustomImportObject.get_PackMode () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportObject.cs:59)Alloy.MaterialMapChannelPackerDefinition.get_PackedPack () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/MaterialMapChannelPackerDefinition.cs:207)System.Collections.Generic.List`1[Alloy.PackedMapDefinition].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)Parameter name: indexArgumentOutOfRangeException: Argument is out of range
    This starts to happen after I upgraded my project from Unity 5.3.2f1 to 5.3.3p1. The screen is displayed blank and I'm not able to close (ctrl-F4 seems to be the only possibility).
    .
     
  34. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @cygnusprojects: Have you tried deleting the whole alloy dir, doing a fresh install, and when you import the ShadersAndEditors Sub-package, do it _twice_ to make sure it actually imports all of the files?
     
  35. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Yeps, life's back to normal after completely reinstalling and importing twice. Thanks.
     
  36. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    Is it possible to make blood on weapon with alloy?
     
  37. Deleted User

    Deleted User

    Guest

    @justtime
    You need to be more specific in your question:
    1. Do you mean being able to paint a convincing looking blood material onto a sword?
    2. Do you mean being able to dynamically apply blood decals
     
  38. justtime

    justtime

    Joined:
    Oct 6, 2013
    Posts:
    424
    I mean both =)
     
  39. cygnusprojects

    cygnusprojects

    Joined:
    Mar 13, 2011
    Posts:
    767
    Hi @xenius, @n00body,

    Are you aware of any issue with SSAO and the deferrred linear pipeline as stated here. I'm using SSAO Pro in my project but also tested with the standard SSAO effect and the using with the skybox bleeding is occuring. Using the forward rendering mode does fix the issue but that's not what I want when using Alloy. I noticed you are have Sonic Ether SSAO listed as Alloy ready here. Does this mean that I need to buy Sonic Ethers solution when I want SSAO in a project using Alloy?
     
  40. Deleted User

    Deleted User

    Guest

    @justtime
    1.) Yes, you can make a convincing blood material.
    2.) This one is more up to you, as we don't have a specific implementation of a splattering system.

    @cygnusprojects
    I'm continuing this conversation in that thread. Thanks.
     
  41. rfcrocha

    rfcrocha

    Joined:
    Jul 18, 2014
    Posts:
    23
    Hi guys.

    I've been playing with the character shaders and here's my results so far. No albedo/roughness maps for the skin yet.
    main render.png

    Here are some problems I'm having

    I can't get both, eye caustics + eye cornea highlight. It would be cool to have since the caustics add another dimension to the eye. Here's a screen of highlight only.

    eye highlight.png

    About the skin, if I have a back light every "thin" part will pop. I can get a bit around this with the transmission shadow weight but I kind of lose the effect where it should appear. Any way around this?

    backlight problem.png

    With the hair I'm having this glowing edges if the planes are only one mesh. Is it possible to fix it?

    hair problem.png

    Other thoughts:
    - it would be cool to add some limbal ring behaviour. Check the paragon link at the bottom.
    - is it possible to get some scattering around the shadows so they can blend in better?
    - is there anyway to smooth the transition from the hair planes to the skin?

    Here's a cool talk about character shaders to get some inspiration -
     
    Deleted User and xenius like this.
  42. Deleted User

    Deleted User

    Guest

    @rfcrocha
    Yeah, the character shaders are always a work in progress, especially after our last big release.

    Eyes
    That's a limitation of the Deferred Eyeball shader, which is looking like a wash at this point. I'm gonna take another stab at a forward variant in the future.

    Skin
    Can't really help you on that one. That's firmly in the "tweak until it looks good enough" category.

    Hair
    I see the problem. Not sure what is going on there. When I have the time, I'm going to look into a hair approach that doesn't require so many alpha passes. Also, yes I have seen the video from Epic. I was planning to investigate their techniques, but I got sidetracked with trying to fix other issues we're having.

    Thanks for the feedback.
     
    rfcrocha likes this.
  43. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Any plans for more vertex blended stuff? These things are pretty cool for our workflow - like in the Order. If not then no worries - appreciate the great work done so far!
     
  44. Deleted User

    Deleted User

    Guest

    @hippocoder
    Can you be more specific on what functionality you would like to see?

    EDIT:
    For example, we're adding Detail mapping support to the TriPlanar versions of the Vertex Blend and Terrain shaders in our upcoming 3.3.5 release.
     
    Last edited by a moderator: Mar 3, 2016
  45. mkgame

    mkgame

    Joined:
    Feb 24, 2014
    Posts:
    592
    Hello,

    I'm now on my vehicle/unit environment script for my RTS game. I still want to have wetness, dirt and snow. I found a way for wetness, and that is the specularity settings for "Directional Blend" shader or "Decal" option for core shader and on the main shader I just lower the roughness. The dirt is the texture on the "Direction Blend" shader or on the "Decal" option. A good looking snow is still a problem.

    For an RTS game, is the "Directional Blend" shader much more expensive than the "Decal" option for the core shader? (10k tiris vehicles, max 20-30 on screen, not for mobile :) )

    Are your shader able to make a 3D looking snow, which is then blend from the top? When yes, is it expensive? Should I sooner use a predefined snow mesh for the vehicles (I saw one asset for creating 3D snow meshes.).

    Is there any shader which is able to blend from 2 directions with different textures? Dirt from bellow and snow from above.

    Do you have any better suggestions for wetness?

    Thanks in advance for your answers.


    By the way, your shaders are awesome, I just want to know how far I can go at this time with your shaders. Even if nothing can be done better, I have still a good looking result.

    Got this result with decal option. 4 vehicles left side with decal, 2 right side with original texture.
     

    Attached Files:

    Last edited: Mar 7, 2016
  46. Leon-Reis

    Leon-Reis

    Joined:
    Sep 1, 2014
    Posts:
    8
    Alloy have a huge bug on the last version. I have many 3* Party scripts as UnityCar and IRDS , and the Alloy is getting errors on the last version. On the early version was perfect.
    What i know so far , Jose Garrido creator of IRDS tool , said to me to only import the primal scripts . well i discovery the problem was the ( Pro Standart Assets ) , i think there are some shaders you made , that is making a bug with otheres shaders . So please Fix it. I cant use Alloy for now.
    Here i am sending 2 pics, 1* all working and other with the red warnings.
    All Working.PNG Alloy errors.PNG Alloy errors.PNG
     
  47. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Leon Reis: Saying you're having a problem with '3rd party scripts' in general doesn't give us nearly enough information to help you specifically.

    I would start by deleting alloy completely from your project, reimport it, then import the _whole_ Alloy ShadersAndEditors packake. Alloy will not function without its editor scripts. The errors above look almost like there are pieces of two versions of alloy in your project. Best to do a clean install.

    If that does not resolve your problem, and you can find _the_ specific other asset that is conflicting with Alloy, please email the specific errors, name of 3rd party asset, etc. to Alloy@rustltd.com
     
  48. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Also keep Alloy in root dir, it doesn't like being moved to subfolders, and check your shader keywords aren't over the limit (too many shaders in project).
     
  49. Leon-Reis

    Leon-Reis

    Joined:
    Sep 1, 2014
    Posts:
    8
    And how do i know how much shaders do i have ? This is new for me. What i know all scripts are ok without alloy ,but on this version o got this problem.
     
  50. Leon-Reis

    Leon-Reis

    Joined:
    Sep 1, 2014
    Posts:
    8
    My Friend i really am working more or less 13 hours , trying to figure out what is goin on. As i said , when i deleted the Pro standart Asset from IRDS , all worked . But i dont know why the alloy is bugging. I tryed everying from the 0 ,,but the problem is, For Exemple , i have 4 3* Party Scripts working with alloy, and lets say i put one more , and the alloy bugs , So ( the logic is , my last 3* Party script , ade Alloy bug , so to have sure , i DELETED my last 3* party script .But the alloy never back to work, and i back to the zero. I send to you my email on your website . Its hard to fix this.