Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    Wow, that's awesome!!! Thanks a lot KRGraphics! Tomorrow evening I return home and test your zip file. Many thanks and best regards
     
    KRGraphics likes this.
  2. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    I think I still have some problem with setup. When I look on skin from top to down - it darker, when I look on it from down to top - it much lighter. Even if character stays in shadow. When camera moves the change in color is quite noticeable.
    What am I missing or what should I change to stabilize it or disable?
    skin_compare2.png
     
  3. Deleted User

    Deleted User

    Guest

    @montyfi
    Your transmission map is too bright, so it is getting transmission for the entire head. You only want it to be strong in areas that really need it like the ears, bridge of the nose, etc.
     
    KRGraphics likes this.
  4. montyfi

    montyfi

    Joined:
    Aug 3, 2012
    Posts:
    548
    Uhm, I don't use any. How can I create one? Tried to use packer and set body diffuse texture as metallic but I didn't notice any difference.
     
  5. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    The transmission map is the alpha channel in the skin texture. Use photoshop or something similar to add or edit an alpha channel. Open the skin texture of the examples to see how it has been made.
     
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    For transmission maps, start with a range of grey like .15, and then paint in the rest with a mid range grey. If you have substance Painter, you can combine it on export...
     
  7. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Not a problem man. Also if you have the latest alloy, the shader is now all in one. You'll be able to see everything. Enjoy
     
  8. NVYVEStudios

    NVYVEStudios

    Joined:
    Mar 4, 2015
    Posts:
    31
    Just gonna drop a quick screenshot here... Alloy in action, in our game P.A.M.E.L.A. Thanks @xenius and @n00body for the wicked shaders, tool-set, and top notch support! :)

    Promenade_Screen.jpg
     
    KC1302, chelnok, montyfi and 7 others like this.
  9. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    @NVYVEStudios
    The lighting looks really good in P.A.M.E.L.A. I think I've read somewhere, you used deferred lighting for it. I have a hard time, decide between those two rendering modes. In this article I've found, there's said, directional lights are really heavy and expensive. I don't know in what relation that might be (20-30% performance or whatever).

    Could you share some experience with the deferred lighting in your game that might be interesting and help others to decide maybe. I already know the technical stuff about the two modes. I'm more interested in, let's say an overal feel and the quality in some situations.
     
  10. NVYVEStudios

    NVYVEStudios

    Joined:
    Mar 4, 2015
    Posts:
    31
    @Zyblade

    Hm, it depends on a few factors that vary between projects, and I'm by no means on expert on the subject when it comes to in-depth technical analysis. We're using deferred, for the following main reasons:

    -You can use many more real-time point/spotlights than possible with forward rendering, without incurring a heavy rendering cost
    -Many higher-end image effects actually require deferred rendering (SSR, SESSAO) to work properly or at all
    -The "quality" of lighting is better, ie point/spotlights can all use shadows if you do desire, and affect surfaces more correctly

    Most of those were mentioned in the article you linked. Forward rendering is cheaper with a single directional light, so long as you aren't bothered by the other issues. Depending on your pipeline, the image effect restrictions may be deal breakers as well. Hope that helps!

    edit: if you're interested, I gave a talk at Unite Boston about a whole range of aspects of our visual pipeline. I don't go super in depth in terms of pros/cons of different workflows, it's mostly focused on what we're using, but it may be of interest to you. There is a short bit about Alloy in there as well:



    Shoot me a PM if you'd like to chat further. :)
     
    Last edited: Jan 29, 2016
    KC1302, Hormic, xenius and 4 others like this.
  11. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    @NVYVEStudios
    Thank you, I'll watch the video. I'll pm you for sure sooner or later for more/other stuff maybe :)
     
    NVYVEStudios likes this.
  12. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    I'm using a cubemap for my lighting, generated from an .exr image provided by Substance Designer. As soon as I add a directional light, my material on my object gets washed out to white. Even if I play around with the lighting settings such as intensity (even setting that to 0), it doesn't change the washout. I can even set my exposure on my Skybox to 0 and that doesn't change anything either. Any suggestions or something I'm missing?

    Thanks.
     
  13. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @adamz: Which of the deferred override shaders do you have active in your graphics menu? If the transmission/skin one, do you have the Alloy deferred renderer plus component added to your camera?
     
  14. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,211
    I forgot to add that, thanks.
     
  15. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Is the decal shader similar to the one described here?
     
  16. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Elecman Same concept, few different design decisions. Plus our decals support all of the property groups that our Core shader does (rim, emission, POM, etc.).
     
  17. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Excellent! If a projection system is included as well (flat plane would do), that would be fantastic.
     
  18. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Elecman We eventually want to tackle projection, but the member of our team who does that side of things is currently being murdered by his university studies, so it'll have to happen once he's free.
     
    Elecman and punk like this.
  19. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    Hi, we have problem with Material Map Channel Packer, when I click to open Material Map Channel Packer, empty windows open and Exeption popup in Console:

    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[Alloy.PackedMapDefinition].get_Item (Int32 index) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    Alloy.MaterialMapChannelPackerDefinition.get_PackedPack () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/MaterialMapChannelPackerDefinition.cs:207)
    Alloy.AlloyCustomImportObject.get_PackMode () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportObject.cs:59)
    AlloyMaterialMapChannelPacker.OnGUI () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyMaterialMapChannelPacker.cs:222)
    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-runtime-and-classlibs/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    And that window cant be closed. We use Unity 5.3.1f1 and Alloy 3.3.3.
    It is some fix for it?
    Thanks for answer.
     
  20. Deleted User

    Deleted User

    Guest

    @lukas.chrapek
    Okay, this is likely a packer definition corruption issues. Try doing the following:
    1. In the "Project" inspector, go to "Alloy/Scripts/MaterialMapChannelPacker/Editor/" and delete the asset file "packerDefinition".
    2. In the "Project" inspector, go to "Alloy/Packages/" and open the package file "Alloy3_3_3_ShadersAndEditorCore" and import that file again.
    Let me know if that solves the problem.
     
  21. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    @n00body
    Thanks, that solve problem with that window.
    Also I have question, it is possible some kind regenerate all textures what I packed with Material Map Channel Packer?
     
  22. Deleted User

    Deleted User

    Guest

    @lukas.chrapek
    Yes. You can use the "Project" inspector's search feature to search for "_Alloy" files, select all, right click, and select reimport.
     
  23. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    The more I polish my graphics the more I appreciate what an amazing job you've done with alloy, just wanted to share a new pic and say thanks again for making such an awesome set of shaders :)

     
    flyingburrito likes this.
  24. flyingburrito

    flyingburrito

    Joined:
    Mar 30, 2015
    Posts:
    22
    It's been awhile since I used Alloy and I recently updated to 3. I noticed that the core material no longer has the Cubemap and Reflectance RSRM option that was there before. What happened to that and how do I add cubemap reflections to core materials now?
     
  25. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Assuming you are using unity 5, you use reflection probes. When roughness is zero ie smooth, the material will have a mirror reflection and when its ie rough it will have none, objects will auto magically pick up the nearest probe. You can create a probe with 'Custom' selected in the drop down and use a custom map or bake the surroundings or add it in the lighting panel if you want to define a global map. Probes then override the global one. They have a box that represents the affected area, its the new physically based way and it takes a little experimentation to get used to, but once you do, it actually makes a lot more sense, the results are far more superior/predictable than the old map per material way

    well something like that anyway check out the unity reflection probe docs for a more sane explanation :)

    (note real time probes are SUPER expensive avoid them)
     
    flyingburrito and Hormic like this.
  26. Deleted User

    Deleted User

    Guest

    @flyingburrito
    Yeah, Alloy 3 has been such a dramatic change in terms of structure that it might as well be a totally different product from Alloy 2. For a crash course on some of the new shaders:


    For anything else, please check out our website:
    https://alloy.rustltd.com/
     
  27. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    I was wondering if there is some documentation on how to actually use substances with Alloy. I have found how to use the shaders in Substance designer and Substance painter, but what do we actually do when using them?

    I have never used substances before, but since I am considering buying Substance Live, I thought I should make sure they work with Alloy. Do I still need to use the channel packer and if so, do I need to extract the maps necessary from the Substance material?
     
    Elowan and Elecman like this.
  28. MornFall

    MornFall

    Joined:
    Jan 11, 2013
    Posts:
    160
    Hello Alloy guys !

    I have a special request to make, if at all possible, regarding the speedtree PBR shader :

    First, thanks a lot for making a PBR speedtree shader... seems like speedtree corp itself wont do it...Thankful you guys are here for us !
    The issue is : In speedtree, the "Detail" map, also uses a normal map --> a detail normal map.
    the speedtree shader in unity does not have it, but if we could have that,in the alloy speedtree shader, that would be awesome, and would solve a lot of my "moss" issue....

    Pretty much the same reason why this guy is angry :
    http://www.speedtree.com/forum/archive/index.php/t-3548.html

    In any events, thanks for Alloy !
     
  29. Deleted User

    Deleted User

    Guest

    @Teila
    Sorry about the late response. Life and outside projects have been delaying our work on Alloy lately. To answer your question, please watch these videos:





    @Feydwin
    Yes I can add a detail normal map. If I had known that that was an optional output from SpeedTree then I would have made it available in our first shader.
     
    Teila likes this.
  30. Teila

    Teila

    Joined:
    Jan 13, 2013
    Posts:
    6,932
    Thank you!!! No worries about the timeliness. I have plenty of stuff to do. :)
     
  31. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    Is there a way to turn of the automatic distance based tessellation? If I change the angle of go closer to the object, the tessellation factor changes automatically and the heightmap is wobbling around.

    edit: Hm, seems it's intended, for LOD seamless the tessellation factor, but somehow it happens too early in my case, so I can see my ground acting like water.
     
  32. Zyblade

    Zyblade

    Joined:
    Jul 1, 2014
    Posts:
    141
    Another thing I reckognized is, the reflection of a point light. It's visible from top view, but not at a certain angle. With the standard shader, the reflection is visible at any angle. See appendix.

    edit: okay, that was the occlusion channel. Nevermind.
     

    Attached Files:

    Last edited: Feb 10, 2016
  33. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Is it possible to have an emissive deferred decal?
     
  34. Deleted User

    Deleted User

    Guest

    @Elecman
    Do you mean an alpha-blended decal with emission as an option, or do you mean a purely emissive additive-blended decal?
     
  35. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Not sure, but it's for emissive text, common in a cockpit. The text will be a separate transparent texture so it is not baked into the albedo. The idea is to save texture resolution by projecting the text as a separate texture. The albedo of the panels is a single color anyway.

    This is the effect I am after:

    Overhead day.jpg

    Overhead night.jpg
     
  36. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    Hey Guys,

    Alloy 3.3.4 Is Now Live On The Store

    The biggest change/added feature is that we've added Arealight functionality to directional lights (known as disc lights). Ever been bothered by the fact that your sun specular highlight on smooth materials is this dippy little dot? Well worry no more, you can now properly give it some actual size (full energy conserving and such). I personally suggest ranges no higher than .3/.4 for most normal usage, but your mileage may vary based on your aesthetic needs. This does behave a bit oddly near the top of its range, but we kept the upper bound high wide in case you want to use it for vfx-ee things like lightning strikes.

    The first two shots below are the loot scene with _only_ the directional light active, no ambient.
    DiscLight_Shot1.png
    DiscLight_Shot2.png
    DiscLight_Shot3.png


    Changelog:
    Version 3.3.4
    =====================
    Shaders:
    - Added support for directional disc area lights.
    - Added support for enabling Unity attenuation.
    * Enable via config flag.
    - Fixed where the material inspector visualize shader wasn't compiling on the Mac OSX Metal build target.
    - Fixed a PS4 compilation issues in the Deferred Skin post-process shaders.

    Tools:
    - Updated the area light control to support radius on directional lights for disc lights.
     
    montyfi, punk, Skolstvo and 1 other person like this.
  37. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    The area directional light is a fantastic addition. I can't wait to add it to my project.

    I think I have noticed a bug in alloy specifically related to area lights. If you change a point light color via script, the light becomes bugged. If I use an hdr color, the specular highlight becomes huge. If I use an LDR color the light intensity becomes very faint. After clicking on the light object it goes back to normal.

    This obviously doesn't happen when using Unity default lights.
     
  38. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Skolstvo: It's not a bug per say. If you need to programmatically change intensity, color, arealight size you need to do a GetComponent on the AlloyAreaLight script on the light, not change it in the light itself.

    The reason for this is that we're hijacking the alpha value of the light color to pass the area light size through the system, so if you change it manually, everything will break.
     
  39. Skolstvo

    Skolstvo

    Joined:
    Dec 21, 2015
    Posts:
    107
    Good to know. Thank you.
     
  40. Deleted User

    Deleted User

    Guest

  41. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    was the problem with wrong named "packed map output" fixed in this release?
     
  42. Deleted User

    Deleted User

    Guest

    @Elowan
    Can you please elaborate? I'm not sure what you mean.
     
  43. Elowan

    Elowan

    Joined:
    Aug 14, 2013
    Posts:
    106
    Xenius wrote in a conversation not long ago:

    It has to do with nameing outputs in substance designer to be auto-assigned in alloy/unity... or maybe for the shader in substance designer viewport, not 100% sure ;)
     
  44. Deleted User

    Deleted User

    Guest

    @Elowan
    Yes, we fixed that.

    @All
    The next few point releases will be light on the new features, and focus on bugfixes. Next I'll be looking at a bug in our Hair HighQuality shader, and optimizing our deferred skin shader.
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    i assigned the alloy deferred lighting shaders (see frame debugger), then opened the demo scene…
     
  46. Deleted User

    Deleted User

    Guest

  47. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    ohh, i was not aware that there are different deferred lighting shaders, fixed.
     
  48. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    Hi, I enable Unity attenuation in config file, all the deferred shaders work great. But the forward shaders still use alloy attenuation, I have reimport the shader folder, but not work.
     
    Last edited: Feb 16, 2016
  49. Deleted User

    Deleted User

    Guest

    @wdw8903
    Odd. I could have sworn it worked in my tests. I will check again later tonight.
     
  50. wdw8903

    wdw8903

    Joined:
    Apr 2, 2015
    Posts:
    48
    And in my test, unity light flare won't work if my project has alloy. Is it a bug of alloy? @n00body
    Edit: not alloy bug. my setting is wrong.
     
    Last edited: Feb 17, 2016