Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @OP3NGL That isn't something you implement for a generic shader set dude. There are far too many game-specific implementation factors. Otherwise it would have been deployed via a 'plug and play' system by Nvidia, instead of a 'here's a bunch of tools for you to build something'.

    Plus, it's GPU-vendor specific. You can't reliably build a perf. window around its usage unless you have a commensurate system for AMD gpus. Lastly, it still has huge bugs in it. So yeah... we're not touching it.
     
  2. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Hey, do you find what was causing the issue? I am expireincing something similar, if speedtree is instansiated at runtime.
     
  3. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    By the way, should we expect something new from you like "AlloyLoop" when unity 2018 and SRL will be released?
     
    Flurgle likes this.
  4. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    @MarkusGod I'm very excited to see what they do with SRL and other stuff
     
  5. Radishface

    Radishface

    Joined:
    May 4, 2017
    Posts:
    15
    Yeah, the issue was the way normals are setup in SpeedTree. Due to the way Alloy handles translucency, the normal gets flipped based on the light direction. Since normals in SpeedTree are usually projected in a dome shape, Alloy flips them in a wrong direction, thus they will look dark.
    What you can do is try and leave SpeedTree normals at their default (each leaf card having their own normals), and also disable rotating leaf cards in SpeedTree modeler. Also, you can try adjusting AO strength in Alloy shaders, since the default AO is way too dark. That should help you solve your issue.
     
    Last edited: Feb 5, 2024
    MarkusGod likes this.
  6. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Ok, i am finally figured out, Alloy flipping normals only when shader defines A_TWO_SIDED_SHADER keyword, so if we comment out this:
    Code (CSharp):
    1. #ifndef A_TWO_SIDED_SHADER
    2.       #define A_TWO_SIDED_SHADER
    3. #endif
    In Assets\Alloy\Shaders\Feature\SpeedTree.cginc we get theese results
    upload_2017-11-14_19-2-33.png
    upload_2017-11-14_19-2-46.png
    I am not sure if the lighting is correct but it looks better than black backfaces.
     
    Last edited: Nov 14, 2017
    Radishface likes this.
  7. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Ok, I forgot about shadows and tangentNormals, so I forked alloy on GitHub and will publish "Not that bad fix" there.
    upload_2017-11-14_20-4-7.png upload_2017-11-14_20-4-53.png upload_2017-11-14_20-5-10.png
     
    Last edited: Nov 14, 2017
  8. XRA

    XRA

    Joined:
    Aug 26, 2010
    Posts:
    265
    **edit** figured it out mostly, some unneeded gamma to linear conversions

    anyone have a version of the Alloy Substance Designer viewport shader that works with their latest 2017 releases? or know what to change within the Designer 6.0 viewport shader?
     
    Last edited: Nov 15, 2017
    MarkusGod likes this.
  9. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Is there a way to mass edit multiple Alloy Core Materials, I want to turn all the metallic sliders down?
     
  10. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    you can write a simple editor script, that will iterate through array of materials and change thier property. (_Metal in your case)

    https://docs.unity3d.com/ScriptReference/Material.SetFloat.html
     
  11. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
  12. Deleted User

    Deleted User

    Guest

    @Don-Gray
    You can also just select multiple materials and edit their common values in the inspector.
     
  13. Don-Gray

    Don-Gray

    Joined:
    Mar 18, 2009
    Posts:
    2,278
    Hi, @n00body, yeah I thought so, must be because I'm using 2017.3.b10.
    Instead of the option to edit, I get a message, "There's a problem with the inspector. Reselect the material to fix.".
    If I have more than one Alloy material selected.
    Will have to wait until this Unity version is officially supported, thanks!
     
  14. Deleted User

    Deleted User

    Guest

    @All
    Sorry for the long delays. Day job has been super demanding of my time and energy lately. On the bright side, I've gotten a SUPER helpful crash course in Git.

    @MarkusGod
    Now that the code is out in the open, I can just ask you directly. Can you post the contents of the file "Alloy/Shaders/Definitions/SpeedTree.cginc"? If I recall correctly, I had to add a "aTwoSided(s);" to that to make it work correctly.

    EDIT:
    I finally added GitHub repos for the Alloy Substance Designer+Painter preview shaders. You can find them here:
    https://github.com/Josh015
     
    Last edited by a moderator: Nov 23, 2017
    chelnok, MarkusGod and Don-Gray like this.
  15. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    This is my fisrt shader editing experience, so i probably done tons of mistakes.
    I have not changed anything in Defenitions/Speedtree, but to a someother files, https://github.com/markusgod/Alloy/commit/7ae92d4fa22d68f771f1ffb19eb6b5e5d92bf6d5. I'm pretty sure that should not be done in a such way, but it fixed problem for me(I guess:oops:).
     
  16. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    Ok I just need to ask..
    is Alloy either dead or dying?
    I mean I want to make a really awesome new game. It may take me a couple years to finish.
    Should I stop using Alloy? Can I trust it to still be stable and bugs fixed?
    I can understand why rust won't develop it further, but will it still be maintained?

    Thank you
    --Joshua
     
    TaleStorm and chelnok like this.
  17. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    168
    Just thoughts:
    If it really takes you several years to finish, you probably should place graphics in the last development positions. Since I think when and if unity 2018 comes with scriptable render loop most of the shader-based systems will depreciate and update for full unity srl support.
     
    ksam2, PennysBrain and jammer42777 like this.
  18. jammer42777

    jammer42777

    Joined:
    Apr 21, 2014
    Posts:
    116
    thank you
     
  19. Deleted User

    Deleted User

    Guest

    @jammer42777
    Alloy isn't dead, but the updates will be a little slower. I just don't have the time or energy to dedicate to it like I used to, so I had to scale back a bit.

    Also, sorry about the delayed response. I've been dealing with a nasty situation at work that has been sapping all my energy lately. Thankfully it was FINALLY resolved this week.
     
  20. SammmZ

    SammmZ

    Joined:
    Aug 13, 2014
    Posts:
    174
    I'm excited how cool is the Alloy skin shader work. Literally, the best solution I ever try. But one thing does not work for me - Post Effect Ambient Occlusion. I try both new unity's post processing stack and Amplify AO - both gave me same weird artifacts when the camera is closer to object. Did anyone made it work? Any solution?

    upd. As I understand AO doesn't work with Alloy skin in Deferred Mode. Only in forward mode compatibility...

     
    Last edited: Dec 10, 2017
  21. Deleted User

    Deleted User

    Guest

    @pigglet
    We do have a deferred version of our skin shader, but it is less flexible. If you can live with that, then that version will work with deferred AO.
     
  22. SammmZ

    SammmZ

    Joined:
    Aug 13, 2014
    Posts:
    174
    @n00body
    Oh, I see! Thanks. I'll stick with the Forward mode than
     
  23. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Ok, forget about my previous issue. I need to add custom light map to my model but don't know If there is any slot for this purpose with alloy?
     
  24. SammmZ

    SammmZ

    Joined:
    Aug 13, 2014
    Posts:
    174
    Is it possible to add second decal to the forward skin shader?
     
  25. Deleted User

    Deleted User

    Guest

    @ksam2
    Sadly, no. We only support lightmaps through the official Unity channels.

    @pigglet
    Sorry. That doesn't really add much general value to the shader set.

    ALL:
    Sorry for the late replies. Works been a pain, and I've been sick. Alloy update incoming.
     
  26. Deleted User

    Deleted User

    Guest

    Alloy 4.3.0 for Unity 2017.3 is live on the Asset Store and Github.

    This one got delayed as I originally wanted to convert the new "Standard Particle" shader to Alloy, but kept getting side-tracked. So I decided to get minimal Unity 2017.3 support out first, and push the new shaders to a later release.

    Try it out and give us feedback. Thanks.

    Changelog:
    ## 4.3.0
    ### Shaders
    * Added Unity 2017.3 support.
    * Moved "Legacy" and "Mods" into the "Alloy" folder as part of the transition to open-source.

    ### Integration
    * Updated Substance Designer preview shader to version 2017.2.
    * Updated Substance Painter preview shader to version 2017.3.
     
    Last edited by a moderator: Jan 19, 2018
    Kolyasisan, ksam2, punk and 1 other person like this.
  27. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
  28. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ksam2: We are not doing further feature development for Alloy, as mentioned in the post when we open sourced it. It is simply in maintenance at this point.
     
  29. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    I think there is still a bug with alloy translucency. It effects objects under roof too, for example inside a building you still get transparent on objects.
     
  30. ctfan

    ctfan

    Joined:
    Mar 25, 2015
    Posts:
    13
    Hey there,

    So i'm having some bugs once i put Alloy into my VR scene.The error i get is coming from my leap motion scripts. Particularly MinValue(0),telling me i need to add Attribute to it.This fixes it but FR drops from 90 to like 19.

    Here's an example.

     
  31. Deleted User

    Deleted User

    Guest

    @ksam2
    Can you post images highlighting the problem?

    @ctfan
    Okay, it looks like there's a name collision between MinValue in our code and theirs. I might need to namespace it on our end to fix it.
     
  32. ctfan

    ctfan

    Joined:
    Mar 25, 2015
    Posts:
    13
    So i read through the old alloy thread but discussions stopped at a grey area. is there a solution for shortening load times when importing new alloy shaders? Some of the builds can take hours over here.
     
  33. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    @xenius Does this mean that you won't modify Alloy to use the new Scriptable Render Pipelines?
     
  34. Deleted User

    Deleted User

    Guest

    @ctfan
    That was actually a problem on Unity's end that they fixed WAY back in Unity 5.0. The compile times are practically imperceptible now.

    @Corvwyn
    I'm not ruling anything out, but I currently don't have a solid idea of how our shaders will plug into their new pipeline. I'll have to take a look at the API they expose for it.
     
  35. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    Are there any good / bad news on this?
    I think Alloy skin shader is the best one around but with this issue it's unusable, at least for me.
    Sometimes characters look like glowing orange aliens. It's especially noticeable when I use a dynamic weather system such as Tenkoku.
     
  36. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    Same. As far as I've been told it's impossible to work around this issue because of limitations. I know Uber and Pre-integrated skin does cast shadows but as far as shadows and translucency is concerned, you're going to have to compromise, because you'll need to turn down your shadow bias anyway, which is going to result in ugly, inaccurate/incomplete shadows. I've tried to find a work around this issue using every skin shader available out there and unfortunately they all pretty much have these issue.
     
  37. Deleted User

    Deleted User

    Guest

    @Hexer_ @Abuthar
    Okay, I have a workaround until I can make a more proper control. Basically, on the "Alloy Effects Manager" component in the "Skin Scattering" section there is a property called "Absorption". It specifies the amount of color absorption for transmission as a function of thickness. If you crank all the values up to something like -100, it will effectively disable transmission on our skin shader.
     
  38. Deleted User

    Deleted User

    Guest

  39. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    395
    Is the documentation going to be made available? I just stumbled on this and it looks really useful. But with no documentation and no examples (they are depreciated), I'm a bit lost.

    Edit: I finally found the documentation. The plugin in Unity, and the listing, and the first post all go to https://alloy.rustltd.com/documentation which is a dead link, But I found from the sites announcement the documentation is now at http://www.alloy.rustltd.com/docs/
     
    Last edited: Feb 18, 2018
  40. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Hello, can someone give me a hint? I was watching the crash course and it mentioned I need to change the built-in shader for deferred rendering to the alloy one. this changes the way lights behave, they become more realistic but dimmer. can I skip this part and just use the core shader or is it required?
     
  41. Deleted User

    Deleted User

    Guest

    @ceebeee
    Well that's embarrassing. I updated our GitHub code so that the menus now point to the correct URLs where applicable. This will be available in the store the next time we push a new package.

    @LunaTrap
    In deferred mode, you're stuck with our lighting and material model for all deferred materials. The only way you can mix and match is if you use the forward renderer only.
     
  42. LunaTrap

    LunaTrap

    Joined:
    Apr 10, 2015
    Posts:
    120
    Thanks, but wait, I'm using a deferred decal system I got at the assets store, does that mean I can't use this system with Alloy?
     
  43. Deleted User

    Deleted User

    Guest

    @LunaTrap
    I specifically tried to use the same G-Buffer layout as Unity so that our lighting code would work in that case. Though I admit I've never officially tested such integration, so YMMV.

    If you have any problems, please let me know.
     
  44. Teosis

    Teosis

    Joined:
    Jan 24, 2018
    Posts:
    22
    Clicking on the alloy core shader I've noticed a couple of errors listed in inspector window.
    Unity version 2017.3.0f3

    Shader error in 'Alloy/Core': failed to open source file: 'Assets/Alloy/Shaders/Definition/Core.cginc' at line 214 (on d3d11)

    Compiling Vertex program with DIRECTIONAL LIGHTPROBE_SH _EMISSION EFFECT_BUMP
    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_FULL_HDR



    Shader error in 'Alloy/Core': failed to open source file: 'Assets/Alloy/Shaders/Definition/Core.cginc' at line 351 (on d3d11)

    Compiling Vertex program with _EMISSION
    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_FULL_HDR

    Shader error in 'Alloy/Core': failed to open source file: 'Assets/Alloy/Shaders/Definition/Core.cginc' at line 323 (on d3d11)

    Compiling Vertex program with LIGHTPROBE_SH _EMISSION UNITY_HDR_ON EFFECT_BUMP
    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_FULL_HDR
     
    Abuthar likes this.
  45. RigoCL

    RigoCL

    Joined:
    Sep 22, 2015
    Posts:
    9
  46. Abuthar

    Abuthar

    Joined:
    Jul 12, 2014
    Posts:
    92
    I've got 2 questions... How do i make my own lookup textures for skin?? I've tried in photoshop but it never comes out right, even following the way the default one is made. Second, i'm not finding any documentation on AlloyEffectsManager>SkinSettings>AO Color Bleed. What does this do exactly? I haven't seen any changes when manipulating these values.
     
  47. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    i got a question, is there a way to modify the core shader to support double sided? & add a check button if i want a double sided enable?
     
  48. Deleted User

    Deleted User

    Guest

    @Teosis
    Questions:
    1. What Alloy version?
    2. Did you get it from the store or Github?
    3. Did you do a full directory blowout before installing it?
    @RigoCL
    Unfortunately it is not available anymore, and we've even removed the menu link from the latest code on Github. That pack fell behind a long time ago and we just never had the time to update it.

    @Abuthar
    That LUT is actually from a script that came with a "Pre-Integrated SSS" article that generates it based on skin depth absorption values. We're actually misusing it since it is supposed to be based on N.L and curvature, but we're using N.L and translucency. It's not really that different than making any other kind of light warping texture, you just have regular lighting for the zero translucency and full scattering at max translucency, with values interpolated in-between.

    @OP3NGL
    If you want to add that, then I recommend making a copy of "Core.shader" and "Definitions/Core.cginc" to a new folder, patching the "#include" directives inside each file to the new folder, and changing the menu path.

    Sorry for the delays all. Life's been super busy again.
     
  49. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    509
    Hello,

    According to the asset store page, it has a support for unity 2017.1.3, but I just upgraded from 5.6.3 and Im getting this error when trying to build. Also I am not getting this error in unity 2017.3, but I want to use 2017.1 instead.

    Code (CSharp):
    1. Shader error in 'Alloy/Human/Hair/HighQuality TwoSided': invalid subscript 'pos' at Assets/Alloy/Shaders/Framework/Forward.cginc(574) (on d3d11)
    2.  
    3. Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK FOG_EXP2
    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
    5.  
    The build is automatically stopped after getting this error.

    EDIT : I updated the package from the asset store and Im no longer getting the error!
     
    Last edited: Mar 19, 2018
  50. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Please stop selling a package with a high price of 125$ and saying sorry life's been super busy!
    If I was going to sell something 125$ I would establish a support team first.

    It's been more than 6-7 months I'm asking for unity wrinkle map support on skin shader but no on care.