Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. Karearea

    Karearea

    Joined:
    Sep 3, 2012
    Posts:
    313

    Does... This mean an announcement is imminent?
     
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Good morning, Alloy Team... I hope all is well. I have been working on my characters and I was wondering if there is a way to modify the skin shader so I can actually have more scatter depth, like this? I am trying to create a character with very translucent skin, and most games I have been looking at has skin like this... would be nice to have in an update.

     
  3. eco_bach

    eco_bach

    Joined:
    Jul 8, 2013
    Posts:
    1,352
    Are Alloy Physical Shaders usable on mobile(Android OpenGLES2 or3)? If so is there possibly a demo I could try?
     
  4. foetoid

    foetoid

    Joined:
    Nov 14, 2012
    Posts:
    7
    How would I go about adding a secondary emission texture to the core shader?
     
  5. GWStudio

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    97
    Where to put gloss map ??!!
     
  6. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Karearea
    For the time being, no. It's looking like we'll be dogfooding it first, and seeing how it performs in some of our internal projects before we release it to the public.

    @KRGraphics
    We've been over this before, Alloy is limited by Unity's pipeline. Everything that you can manipulate is already available.

    @eco_bach
    Theoretically it should work as long as your phone supports linear rendering in Unity. We've never had an opportunity to test it though.

    @aymn
    Alloy uses metal-roughness material inputs like those in the Substance tools, as well as a packed map system for reducing storage and increasing efficiency at runtime. So you will need to invert your gloss map into a roughness map and use our packing scheme ((R) Metal Mask, (G) AO, (B) Specularity, (A) Roughness). You can either do this manually, or via our built-in packer tool under the menu "Window/Alloy/Material Map Channel Packer".
     
  7. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @foetoid
    That's a bit tricky, but I'll try to walk you through it. Alloy uses a system for maximizing code re-usability by breaking each shader up into modules:
    • Shader file
      • Typically there are two of these, one with tessellation and one without, stored in the SM5 and SM3 folders respectively.
      • At the top, you will see the shader name and menu path to it.
      • Beneath that you will see all the parameters of every property group.
      • Beneath that is a series of passes:
        • Passes: ForwardBase, ForwardAdd, ShadowCaster, Deferred, Meta
        • Each has shader feature flags corresponding to the features that they support.
        • Each references the shader's Definition header,as well as a pass-specific header.
    • Definition header
      • This file has a callback that defines what the shader does.
      • You'll see a bunch of function calls named after each of the property groups from the shader.

    So to modify Core you must do the following:
    1. First you need to copy the Core shader and definition header files to a different folder.
    2. Then you need to modify the copied shader file to have a different shader name and to point the header "#include" statements at your copied header.
    3. Then you will need to paste the property group for Emission2 in the properties section.
    4. Then you will need to paste the shader feature for Emission2 down in each pass that needs them.
    5. Finally you will need to go into the definition header and add a call to "aEmission2(s)" towards the bottom of the function.

    Does that help?
     
  8. Ruchir

    Ruchir

    Joined:
    May 26, 2015
    Posts:
    84
    Hello , I am getting a lot of errors after importing the package in unity 5.6 b8:(
    (in the scripts not the shader)
     
  9. gremberman

    gremberman

    Joined:
    Aug 10, 2014
    Posts:
    128
    Quick stupid question - does it works with Relief Terrain Pack (RTP) and UBER shaders? o_O
     
  10. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Ruchir
    We're in the process of upgrading Alloy to support Unity 5.6. Please be patient.

    @abrasive
    Yes, but with caveats. UBER is partially supported in deferred mode via a custom deferred override shader, but won't receive Alloy area lights on forward-mode shaders. RTP has the same problem, and also requires a patch to kill highlights for black specular splats.
     
  11. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    IMPORTANT NOTE:

    Please please please heed this warning. There is a major bug in the current beta version of Unity 5.6 that 100% breaks Alloy's lights. It has been fixed on Unity's trunk, but we will not know if it makes it into 5.6.0, or the first patch build, until that version actually drops. That means, DO NOT upgrade your projects to 5.6 with alloy in them until you get the all-clear message from us. We will post here once a functional update _and_ a version of unity that is not broken for it is released and everything is safe and functional.

    Apologies for the inconvenience, but this one was 100% out of our control. Someone at unity mucked up a core light method dropping a term in the color transfer to shader, and there's no way we can/could work around it on our end.
     
    Corvwyn, punk, Crossway and 3 others like this.
  12. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    412
    Thanks for the early heads up, i shall reschedule my dev plans. Wanted to do a major lighting overhaul early next month.
     
  13. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    74
    standart shader is working in my android project, alloy shader not (GLES3, Samsung S6)
     
  14. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @fuzzy3d
    Can you be more specific than "not working"? Any error messages?
     
  15. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    Good news everyone!

    The latest Unity Beta (5.6.0f2) fixed the issue that was holding us up. So we're once again moving full speed ahead to get Alloy 3.6 ready for when Unity 5.6 drops.
     
    fuzzy3d, KarelA, AcidArrow and 4 others like this.
  16. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    74
    sorry my late reply, win: GoClever Insignia 800 WIN tablet, android Samsung S6 phone
    color space linear, no errors, no crash
    standart_alloy.png
    unity 5.5.1f, GLES3
     
    Last edited: Mar 28, 2017
  17. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    260
    Is there a way to output a color greater than 1 through emission? Unity's standart shader can do that through a small window with a number next to the emission property. This is pretty useful for us.
     
  18. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    444
    5.6 is out can you guys update the software?
     
  19. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @fuzzy3d
    Sorry about the delayed response. This week has been all about getting Alloy ready for Unity 5.6. I'll get back to you after that.

    @Kolyasisan
    Our emission feature uses an HDR color picker.

    @AlteredPlanet
    We wrapped Alloy 3.6 this week, so now we just need to get it though the asset store submission process. We'll hopefully be able to make an announcement this weekend.

    Stay tuned.
     
  20. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    444
    @AlteredPlanet
    We wrapped Alloy 3.6 this week, so now we just need to get it though the asset store submission process. We'll hopefully be able to make an announcement this weekend.

    Stay tuned.[/QUOTE]

    whats new in 3.6
     
  21. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @AlteredPlanet
    Mostly just Unity 5.6 integration. The biggest change is that our area lights now natively use Unity's Light color and intensity channels. This means that animation clips and light scripts will now work with Alloy without modification.

    The full list will be part of our update. Please stand by.
     
    punk likes this.
  22. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    444

    everytime I upgrade to a new version of unity textures have to be reimported , any idea why?
     
  23. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @AlteredPlanet
    That's an unfortunate limitation of how we manipulate texture mip levels to get around Unity's attempts to overwrite them. We can't do much about it until Unity has a proper API for that task.
     
  24. n00body

    n00body

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

    Please try it out and let us know what you think. Cheers!

    Changelog:
    Version 3.6.0
    =====================
    Shaders:
    - Added Unity 5.6 support.
    - Added "Particles/Anim Alpha Blended" shader.
    - Changed "Details*" shaders to have proper Alloy inspectors.
    - Changed most shaders to have new controls:
    * "Render Queue" for sort order.
    * "Enable Instancing" toggle.
    * "Specular Highlights" toggle.
    * "Glossy Reflections" toggle.
    - Changed RenderingModes to work correctly with shader replacement.
    * "Cutout" tagged as "TransparentCutout".
    * "Fade" tagged as "Transparent".
    * "Transparent" tagged as "Transparent".
    - Changed SpeedTree GeometryTypes to work correctly with shader replacement.
    * "Frond" tagged as "TransparentCutout".
    * "Leaf" tagged as "TransparentCutout".
    - Fixed CarPaint shaders to have "SpecularTint" property.

    Scripts:
    - Changed Area Light component menu path to "Alloy/Alloy Area Light".
    - Changed Area Lights to work with Unity's light inspectors, including the new "Light Explorer".
    * Now uses Unity Light component's color and intensity directly.
    * You'll need to manually update your scripts and animation clips to point to the Unity light fields.
    - Removed "Animated By Clip" option from AreaLight components.
    * Now works with animation clips and third party script tools out of the box.
    * You'll need to manually delete references to it from your animation clips.
    - Renamed "Alloy Deferred Renderer Plus" component to "Alloy Effects Manager" to clarify its usage.
    * Now listed under "Alloy/Alloy Effects Manager" in the component menu.
    * Please write down your old settings before doing the update as you may need to re-enter them.
    * You may only need to toggle the component to restore its command buffers.

    Integration:
    - Added support for "VertExmotion".
    - Updated Substance Designer shader to 6.0.
    * UV scale support.
    - Updated Substance Painter shader to 2.5.
    * Specular Level channel support.
    * Parallax Mapping support.
     
    Last edited: Apr 1, 2017
  25. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Alloy area light doesn't work with Tenkoku sky sun or other sky assets like Azure. but it works on a directional light. please fix this issue as I remember it's an old issue.

    Why it shouldn't work with Tenkoku sun when it's a directional light too.
     
  26. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Crossway
    Did you read the Changelog I literally just posted?
     
  27. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    I can't update to new version! I'm using Unity 5.5.2f1 but it doesn't allow me to download new update.

    Also I can't update to Unity 5.6 cause it's not compatible with lots of assets yet. is there a way to use new update with Unity 5.5.2f1?
     
  28. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Crossway
    No. The new Alloy version depends on changes made in Unity 5.6, including the light fix. It won't work with prior versions.
     
  29. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    444
    if I delete alloy out of my project , upgrade then add it back in after upgrade will that fix the reimport issue?
     
  30. chelnok

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    673
    Well i'm not dev, but i would say kinda; no need for reimport, but for sure you need to import all after you delete alloy from your project and add alloy again. What is your problem anyway, just curious.
     
  31. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    What about solving only that issue for Unity 5.5.2f1 version? cause I doubt if I can upgrade to Unity 5.6 any time soon.
     
  32. AlteredPlanet

    AlteredPlanet

    Joined:
    Aug 12, 2013
    Posts:
    444
    everytime I upgrade to a new version of unity textures have to be reimported
     
  33. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Crossway
    I repeat, I can't solve that light issue in prior versions of Unity because the fix depends on changes made in 5.6.

    @AlteredPlanet
    I already told you, the import issue is because of a Unity limitation. For the time being, you just need to do the reimport after each upgrade. It's really not that complicated, just do a search for "_Alloy" files, select all, right click, Reimport.
     
  34. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Looking forward to playing with this... probably gonna wait a bit before I update anything to ensure kinks are worked out on Unity 5.6. I am curious to what specular level control is
     
  35. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Hey guys... I just downloaded the latest Alloy build and none of the packed maps in my assets update even if I am hitting the regenerate button. I also made sure to migrate my materials beforehand and deleted the old folders before updating.
     
  36. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    Having a similar problem after updating. Packed map textures showing 4x4 in size even after reimporting.
     
  37. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @KRGraphics @Korindian
    That's odd. Are you absolutely certain you have Alloy 3.6 installed (check the changelog)? Are there any errors in the console?

    For future reference, you don't need to run the migrator anymore. That was a one time thing.
     
    KRGraphics likes this.
  38. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Yep... I even blew away the folder and closed Unity right after... and then reinstalled... I'm gonna try it once more after I finish this lightmap bake...
     
  39. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Here is the errors I am getting... in relation to Alloy and the packer...

     
  40. netincome2

    netincome2

    Joined:
    Nov 8, 2014
    Posts:
    14
  41. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @KRGraphics Import the alloy package again (without deleting). The packer definition file didn't import for some reason.
     
    KRGraphics likes this.
  42. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @netincome2
    We're looking into it now. According to another member of my team there have been reports of directional light issues with custom shaders in Unity 5.6. We'll be looking into where the problem is occurring while we get Alloy 3.6.1 ready.
     
    Crossway likes this.
  43. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    441
    Thanks for the hint... I couldn't reimport the alloy package using the Asset Store import button as it says there's nothing new to import. However, I deleted only the _PackerDefinition asset, then imported Alloy into an empty project, then copied over the _PackerDefinition file to the existing project and the problem was solved. Just needed to reimport all the _Alloy packed map files again.

    Edit: Sorry, just realized n00body mentioned reimporting that particular file over a year ago. Forgot.

    Anyway, hope this helps someone else with the same problem. Also wanted to thank you guys for always keeping Alloy up to date with the latest Unity features and releases. It's very much appreciated.
     
    Last edited: Apr 3, 2017
  44. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975

    I'll give it a shot.

    EDIT: No luck getting alloy to work properly :(
     
    Last edited: Apr 4, 2017
  45. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    Here is another error when I reimport everything without deleting...

     
  46. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    Hey!

    we have upgraded our unity to 5.6 & using the latest alloy
    have re-import the _alloypm & we encounter these errors

    dont know how to fix

    the 1st one we have duplicates of these errors 4 times
    the 2nd one we have these 12 times
    Code (csharp):
    1.  
    2. scifi_katana_AlloyPM has no post-processing data! Please contact Alloy support.
    3. UnityEngine.Debug:LogError(Object)
    4. Alloy.AlloyCustomImportAction:OnAlloyImport(Texture2D, OnAlloyImportFunc) (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:54)
    5. Alloy.AlloyCustomImportAction:OnPreprocessTexture() (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:144)
    6. UnityEditor.AssetPostprocessingInternal:PreprocessTexture(String)
    7.  
    Code (csharp):
    1.  
    2. UnityEngine.Debug:LogError(Object)
    3. Alloy.AlloyCustomImportAction:OnAlloyImport(Texture2D, OnAlloyImportFunc) (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:73)
    4. Alloy.AlloyCustomImportAction:OnPreprocessTexture() (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:144)
    5. UnityEditor.AssetDatabase:Refresh(ImportAssetOptions)
    6. Alloy.AlloyCustomImportObject:GenerateMap() (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportObject.cs:144)
    7. Alloy.AlloyImporterSupervisor:Update() (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyImporterSupervisor.cs:76)
    8. UnityEditor.EditorApplication:Internal_CallUpdateFunctions()[/code[
     
  47. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @KRGraphics @OP3NGL CRAP! It looks like a serialized file was damaged in the packing process. We'll have a fix out tomorrow!
     
  48. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @OP3NGL: I have to wait til Josh wakes up to get a proper fix together. Until then, try replacing the contents of your Alloy->Scripts->MaterialMapChannelPacker->Config with the files in this zip, and tell me if it fixes things.
     

    Attached Files:

  49. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    I got it fixed... just restarted Unity and the problem fixed itself :D
     
  50. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    659
    we updated project to 5.6 (with 491 alloyPM textures), and alloy to 3.6
    after initial update we need to regenerate alloyPM textures (with custom editor cause you cannot select all of them and regenerate)

    all goes well, but after generating lightmaps (mixed lights) console give us this :

    and all scene is dark now :)

    UPDATE
    After restarting unity - all is pink and console says:


    UPDATE 2
    After deleting lightning data and turning off mixed lightning + restarting Unity - all is ok, so it seems that mixed lightning or something else is causing the problems
     
    Last edited: Apr 4, 2017