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:
    522
    @reddotgames: We're working on it. There's some sort of import/serialized file error happening that's messing with our packed maps.

    As for the mixed lighting, we're also trying to figure that out. I'm getting reports from other colleagues that ours isn't the only 'custom' stuff that isn't playing well with Mixed Lighting. More soon.
     
    KRGraphics likes this.
  2. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @reddotgames
    I've isolated the problem. We'll be stress-testing the fix tonight.
     
  3. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    659
    Great news thanks! We are waiting for fixes than (we could also test it if you can send me "fix" package via PM)

    P.S we are using Alloy in every material in our latest game (also with some custom alloy based shaders). We are more than happy with results!


     
  4. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Alloy 3.6.1 for Unity 5.6 is live on the Asset Store

    It seems to mostly be working now. Try it out and give us feedback. Thanks.

    Changelog:
    Version 3.6.1
    =====================
    - Shaders:
    * Fixed the compiler errors that happened when using new shadow masks mode.
    * Fixed issue where baked light occlusion was not being applied to first directional light in forward mode.
    * Fixed the issue where the first directional light wasn't rendering in forward mode with lightmaps enabled.

    - Scripts:
    * Fixed issue with packer on first import where it could not detect "_PackerDefinition.asset".

    EDIT:
    @reddotgames
    Good timing. The upload just finished. Pretty slick game there. Interested in being featured in our website's Showcase page? ;)
     
    punk likes this.
  5. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    659
    @n00body Thanks - will check that asap from office :) About showcase - sure, but we could only use few shots that are live for public. Could you send me PM?
     
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    I was about to ask about that :(
     
  7. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Wow :)
     
    punk likes this.
  8. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    112
    @xenius using untiy 5.6.0f3 speedtree error: upload_2017-4-5_11-25-28.png
     
  9. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    thanks for the config files, no more errors!
     
  10. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
  11. LostPanda

    LostPanda

    Joined:
    Apr 5, 2013
    Posts:
    112
    thanks! All is ok...
     
  12. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    381
    It's been a while since I posted a pic here, all Alloy in this shot, finally got an official website www.bridesofvampira.com

    plantDetails.png
     
    n00body and daville like this.
  13. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    122
    Hey there!

    I'm currently thinking about how to reduce my material count, and it raised some questions.

    1. Car Paint
    Is it possible to somehow use two coloured textures for the primary and secondary colour in the "Paint" tab? I use this shader often enough to have enough objects that could be combined into one material, but changing the paint colours is a lot more important than the albedo, so it doesn't work right now.
    Or would be using textures for this be even worse from a performance standpoint than having multiple materials?
    (I absolutely love this shader, by the way! I didn't use it for cars yet, but it's just perfect for stylised stuff. It actually makes for great cloth.)

    2. Detail tab
    Is there a way to use multiple detail textures in one shader? Using a RGBA mask texture instead of a single channel (kind of like splatmaps in terrains).
    Also, is it possible to use different tiling for the colour and the normal? Maybe I'm just weird, but I sometimes use different textures for the two slots that need different tiling.
    Hmm... I guess I could write a custom shader and inject Alloy into it? Seems like a waste though, as the Alloy editor is really nice (thank you for the good work on this).

    Have a nice day!
    - KW
     
    punk likes this.
  14. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Sorry about the late reply.

    Can you give me some more details:
    1. Are you running Deferred or Forward?
    2. Is the whole car using Alloy shaders, or just the body?
      • If so, which shader is on the body?
    3. Can you get me a simplified repro scene for testing?

    Thanks.
     
  15. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    1. You're not the first to ask for that feature. Originally we were keyword-limited, but I believe they raised the limit enough now that we can take a look at it. As for performance, its a tossup. On the one hand, now your shader has a texture that takes up space and must be loaded by the shader. On the other hand, you now have a much more batch-able material.
    2. That would probably have to be a Mods shader, since that's a feature I can't really apply across the board since I would want to have vertex colors as a mask option and they are treated as color data in most shaders.
    3. It's very unlikely that I would add that option as there's already a lot of overhead from us allowing as many texture transformation options that we currently do. Not to mention it would be a giant retraining and migration headache for all the existing artists and materials that currently use Alloy.
     
    Last edited: Apr 10, 2017
    KWaldt likes this.
  16. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    74
    Hi,
    1. Forward rendering path.
    2. Body- Alloy car paint, glass and plastics parts Alloy core.
    3. How can I send data?
    Thank you.
     
  17. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    hey, i encountered this problem when starting on a new scene...

    err.PNG

    What's going on?
    (things i have already done: reimport alloy shaders, done the migrater )
     
  18. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @OP3NGL
    You don't need to run the migrator anymore. That was a one time thing. As for the appearance, did you try restarting the editor?
     
  19. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @fuzzy3d
    PM me a dropbox link to your package.
     
  20. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    Hi

    We got this error during build. We did have it before, we are on latest version 3.5.2 for Unity 5.5.1f1. And we are aiming for DX11. And in build I did see any issue with that shader.

    Shader error in 'Alloy/Glass/LowQuality': Program 'aFragmentShader', error X4510: maximum number of samplers exceeded. ps_3_0 target can have a maximum of 16 samplers (on d3d9)

    Compiling Fragment program with DIRECTIONAL SHADOWS_SCREEN DYNAMICLIGHTMAP_ON _EMISSION EFFECT_BUMP _DISSOLVE_ON _RIM_ON VTRANSPARENCY_ON _DETAIL_MULX2
    Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING SHADER_API_DESKTOP

    Also we have little issue with Unity 5.6, Alloys (version for Unity 5.6) and lights and we don't know if it's Unity issue or Alloy issue. I will describe it.
    We have effect for cannon fire, where we spawn particle and point light with script on it, where script telling light how long and fast will turn on and off, etc. When light is spawned in first frame light act like it have very high intensity (like 1000x something, basically white ball of light), but only in first frame. But in light and script intensity is setup to low value something 0.000001 or something like that.
    I bet that this is Unity 5.6 issue, but one never now.

    Thanks for answer.
     
  21. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @lukas-chrapek
    1. That error means that between lights, lightmaps, and material features you've exceeded the maximum number of textures (ie. 16) allowed on that shader. You need to drop a feature on that material and recompile that shader to fix it.
    2. Can you PM me a repro scene with just the light and script?
     
  22. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    n00body

    1. I think I found shader what can cause it, thanks for help.

    2. I very glad to send you some test scene, but right now our project have lots of issues on 5.6, I am not able to make that scene, becasue lot of script are connected with our system for saving and gamemanager and everything start to broke up :D, we will wait until next version released and than try to switch to new version. As soon as II will able make that scene I will contact you with details.
     
  23. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    restarted editor, problem stays... in the end, i have to recreate a new material for every object, & that was fixed...
     
  24. rsklnkv

    rsklnkv

    Joined:
    Sep 8, 2012
    Posts:
    59
    Hi

    Is there a way to assign Transmission mask from custom surface shader?
    I've read about copying include files and using some Alloy features, but I haven't seen a way to write data for transmission or skin
     
  25. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @rsklnkv
    Currently no, since Unity's Standard lighting models don't support it yet.
     
  26. KWaldt

    KWaldt

    Joined:
    Nov 1, 2013
    Posts:
    122
    Hey there!

    Is it somehow possible to use substances in the material packer? I have quite a few of them because of gametextures.com and Substance Source (so manually creating an Alloy output for all of them would be annoying), and I know that I could export the outputs as bitmaps and use them in the packer, but that's quite a hassle.

    Best Regards,
    Kristina Waldt
     
  27. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @KWaldt Substances can't be packed because they're not ever actually 'textures' on disk, and the packer can only operate on actual texture files.

    I just spoke with someone at gametextures today about this, and their plan to make their texture 'injector' be configurable in terms of what maps, in what configs it spits out. Once they do that, you'll likely be able to do the packing on that side. Until then there really isn't an option other than manually doing it (or having your substance graphs output a map that is already packed).
     
  28. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    alloy shaders supports Light Probes?
     
  29. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @OP3NGL
    Yes. It supports Unity's light probes, LPPVs, non-directional/directional lightmaps, dynamic lightmaps, etc.
     
  30. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,416
    How does alloy fair against unity standard shader in terms of rendering performance?

    I am aware that allow does pack more features than standard shader but if you just set them up to be the same feature wise how do they compare? I read a lot about cool features or extra goodness but i would like to know about its base speed comparision. Is allow the same performance as unity standard shader and just gets worse as the other extra features are added?
     
  31. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @castor76
    It's comparable, but more expensive due to us having standardized certain features such as Area Lights, Specular Occlusion, etc. It is efficient enough for our VR work, if that helps.
     
  32. IDreamofIndie

    IDreamofIndie

    Joined:
    Dec 24, 2014
    Posts:
    37
    Hello,
    I have been trying to solve the cause of the white artifacts shown below that appear in a android build.
    Sometimes the entire face of a dice will have the white blotchy artifacts on them. I don't know much about shaders, or even if the shader is the cause of the issue.

    Its a simple scene with one directional light set to mixed, the dice and table are using Alloy core shaders .
    The tables lighting is baked and the dice is realtime. There is a light probe group in the black area of the table and one baked reflection probe in the center.

    I found a possible solution here (last post):
    http://answers.unity3d.com/questions/813761/specular-and-normal-map-artefacts-problem.html
    but I dont know enough about shaders on where to do what is stated.

    Any help on what is causing this issue and/or possible solutions would be appreciated.
    Thanks BuildComparison.png
     
    Last edited: Apr 29, 2017
  33. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Alloy 3.6.2 for Unity 5.6 is live on the Asset Store

    Try it out and give us feedback. Thanks.

    Changelog:
    Version 3.6.2
    =====================
    Shaders:
    - Added new config option A_USE_BLACK_SPECULAR_COLOR_TOGGLE to allow killing specular lighting per-pixel.
    * Useful for RTP integration.
    - Changed "Decal/Multiplicative" and "Decal/Ambient" to add missing alpha visualize option on Main Textures Base Color map.
    - Completed internal API overhaul.
    - Fixed metallic channel not correctly affecting translucent shadows.
    - Fixed baked occlusion shadows in injection header shaders.
    - Fixed lightmap shadow mixing support.

    Scripts:
    - Changed Camera inspector to now provide an easy button for adding Alloy Effects Manager components.
    - Fixed AreaLight issue where using script to set intensity to zero could cause light to blow out in intensity.
    - Removed the "Material Migrator" menu item.

    Integration:
    - Improved HX Volumetric Lighting integration with "Decal/Additive" shader.
     
    Corvwyn, xenius and punk like this.
  34. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    141
    Hi, i know that alloy has a plugin for substance designer. so the view from sd is the same result as in unity.

    But my question is, can alloy generate 4k substances? unity only can 2k because the render is with cpu and not with gpu.

    Thank you :)
     
  35. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @Neo-Gamefactory: Alloy doesn't modify the substance engine, so any limitations that it has remain the same.
     
    Neo-Gamefactory likes this.
  36. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    141
    You are speedi :) that was fast.
    Is it possible for alloy, as a new feature to force the render (generating) the substances with the gpu or is it to difficult?

    In SD it looks so nice with 4k and unity only can 2k :( so bad :(
     
  37. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @Neo-Gamefactory No there isn't. The substance plugin is a native integration, and there's no way to modify how it functions.
     
    Neo-Gamefactory likes this.
  38. Neo-Gamefactory

    Neo-Gamefactory

    Joined:
    Oct 18, 2012
    Posts:
    141
    Okay thank you :)
     
  39. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Hey guys. After updating to last version still Area light script doesn't work on the Azure sun light or Tenkoku sun directional light.
     
    Last edited: May 17, 2017
  40. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    4,538
    Hi,

    Is this still mandatory with 5.6 ?

    Ensure 'Antialiasing' on the Quality Setting your are using is set to 'none', or HDR will be silently disabled on your camera
     
  41. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Sorry about the delayed response. I had to move this past week.

    @Crossway
    We'll be putting out a fix in an upcoming update. For now, go to the file "Assets/Alloy/Scripts/AreaLight/AlloyAreaLight.cs" line 92 and change "void Update() {" to "void LateUpdate() {".

    @zenGarden
    No, but only on hardware that supports MSAA on HDR targets. Otherwise yes.
     
    Crossway likes this.
  42. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Alloy 3.6.3 for Unity 5.6 is live on the Asset Store

    Try it out and give us feedback. Thanks.

    Changelog:
    Version 3.6.3
    =====================
    Scripts:
    - Fixed issue where AreaLights needed to update after all other light updates and animation clips had run.
     
    Crossway likes this.
  43. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    My team bought meshbaker plugin to do mesh combine n texture atlases, how will it fare with the current alloy shaders?
     
  44. psych77

    psych77

    Joined:
    Mar 1, 2017
    Posts:
    51
    Assets/Alloy/Scripts/MaterialInspectors/Editor/FieldBased/Drawers/AlloyFieldDrawers.cs(51,31): error CS1061: Type `UnityEditor.MaterialEditor' does not contain a definition for `EnableInstancingField' and no extension method `EnableInstancingField' of type `UnityEditor.MaterialEditor' could be found. Are you missing an assembly reference?

    Keep getting this.. any ideas?
     
  45. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @OP3NGL
    It should work just fine as long as you can generate packed maps from the generated atlas textures.

    @psych77
    Please provide your Alloy version and Unity version.
     
  46. psych77

    psych77

    Joined:
    Mar 1, 2017
    Posts:
    51
    Unity 5.5.1f1
    Alloy 3.6.3
     
  47. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @psych77
    The latest version of Alloy only works with Unity 5.6. Update the editor, then it will work.
     
  48. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    Hi all

    I have one question about transparent stuff, especially particles and glass. We have situation like this, see picture bellow, for particles we use Additive (Soft) and for door glass we use Low Quality Glass (but also High quality glass have this "issue"). So it is bug or it is unity limitation for this kind of stuff (g buffer and S*** :D that is mine bet, that it is "feature" of Unity) ? And it is better to avoid it. Thanks for answer.

    Edit: But i think that only playing with Render Queue values will help with this problem.

     
    Last edited: Jun 2, 2017
  49. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Oops. I forgot to apply the new unified volumetric API to the particle shaders. I'll try to have it ready in the next release. ^_^;
     
  50. Dashiva

    Dashiva

    Joined:
    May 15, 2017
    Posts:
    2
    Hi

    I have a question. Am I the only one with the problem where the area-lights handles disappear when installing Alloy?
    As soon as I delete AlloyLightEditor.cs the handels reappear.
    This happens both in my Mainproject and as well in a Testproject only with Alloy installed.

    Unity 5.6.1f1
    Alloy 3.6.3



    Best regards
    Marco