Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. eco_bach

    eco_bach

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

    foetoid

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

    GWStudio

    Joined:
    Sep 27, 2016
    Posts:
    109
    Where to put gloss map ??!!
     
  4. Deleted User

    Deleted User

    Guest

    @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".
     
  5. Deleted User

    Deleted User

    Guest

    @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?
     
  6. Ruchir

    Ruchir

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

    ZoneOfTanks

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

    Deleted User

    Guest

    @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.
     
  9. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    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.
  10. KarelA

    KarelA

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

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    standart shader is working in my android project, alloy shader not (GLES3, Samsung S6)
     
  12. Deleted User

    Deleted User

    Guest

    @fuzzy3d
    Can you be more specific than "not working"? Any error messages?
     
  13. Deleted User

    Deleted User

    Guest

    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.
  14. fuzzy3d

    fuzzy3d

    Joined:
    Jun 17, 2009
    Posts:
    228
    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
  15. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    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.
     
  16. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    5.6 is out can you guys update the software?
     
  17. Deleted User

    Deleted User

    Guest

    @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.
     
  18. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    @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
     
  19. Deleted User

    Deleted User

    Guest

    @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.
  20. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455

    everytime I upgrade to a new version of unity textures have to be reimported , any idea why?
     
  21. Deleted User

    Deleted User

    Guest

    @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.
     
  22. Deleted User

    Deleted User

    Guest

    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 by a moderator: Apr 1, 2017
  23. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    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.
     
  24. Deleted User

    Deleted User

    Guest

    @Crossway
    Did you read the Changelog I literally just posted?
     
  25. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    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?
     
  26. Deleted User

    Deleted User

    Guest

    @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.
     
  27. AlteredPlanets

    AlteredPlanets

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

    chelnok

    Joined:
    Jul 2, 2012
    Posts:
    680
    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.
     
  29. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    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.
     
  30. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    everytime I upgrade to a new version of unity textures have to be reimported
     
  31. Deleted User

    Deleted User

    Guest

    @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.
     
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    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
     
  33. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    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.
     
  34. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    Having a similar problem after updating. Packed map textures showing 4x4 in size even after reimporting.
     
  35. Deleted User

    Deleted User

    Guest

    @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.
  36. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    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...
     
  37. KRGraphics

    KRGraphics

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

     
  38. netincome2

    netincome2

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

    xenius

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

    Deleted User

    Guest

    @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.
  41. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    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
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467

    I'll give it a shot.

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

    KRGraphics

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

     
  44. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    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[
     
  45. xenius

    xenius

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

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @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:

  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I got it fixed... just restarted Unity and the problem fixed itself :D
     
  48. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    707
    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
  49. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @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.
  50. Deleted User

    Deleted User

    Guest

    @reddotgames
    I've isolated the problem. We'll be stress-testing the fix tonight.