Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I need something to looks like displacement on my skin! normal maps isn't enough for me. I thought maybe POM could help me with that.

    Also when I add detail map I lose all roughness on my model!
     
  2. Deleted User

    Deleted User

    Guest

    @Crossway
    Please list your Alloy version, Unity version, and screenshots of before and after detail maps. Thank you.
     
  3. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Ok thanks, I'll send screen shot, also I've mentioned Legacy skin shader doesn't work with SEGI. is there any way to solve this?
     
  4. Deleted User

    Deleted User

    Guest

    @Crossway
    The Legacy Skin shader is forward-only, which is why we deprecated it in favor of our new deferred-compatible Skin shader. SEGI is a deferred-only system, which means you just have to use Alloy's deferred-compatible shaders if you want to use them together.

    @ksam2
    Basically the same answer to you. Until that changes, there is nothing I can do on my end.
     
  5. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    What hoops do I need to jump through to import Alloy into Unity 5.3.6f1? This is the last Unity that will support the Web Player, and will be the version I will be using for some time.
     
  6. Deleted User

    Deleted User

    Guest

  7. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    I have it. Is there a more painless way to distribute to earlier Unity versions? Or has Unity broken the Asset store variable version upload somehow.
     
  8. Deleted User

    Deleted User

    Guest

    @StaffanEk
    The store has been a little unpredictable during the beta. Maybe it will work better now that 5.4 is officially out. You can give it a try if you like, but if the Changelog says "5.4.1" then it gave you the wrong version.

    Let me know how that goes.
     
  9. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    @n00body

    I tried it with 5.3.6f1 and it gave me the newer version.
     
  10. Deleted User

    Deleted User

    Guest

    @StaffanEk
    Okay, then just use the package I gave you. That's the best we can do since you won't be using the latest version of Unity.
     
  11. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @StaffanEk: Yeah, it's F***ing stupid. As soon as you download a 'later' version of an asset, the store will _never_ serve you an earlier one, regardless of which unity version you use.
     
  12. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I have a question about the skin shader setup... looking at your YouTube video "Alloy 3 Crash Course", the skin shader has Scattering and Transmission properties. Was this moved to the camera instead? It seems like it was because when I add "Alloy Deferred Rending Plus" script to my camera, those options are available and they're not included in the material. Maybe I'm not setting my skin up correctly. I would think that those should be independent so you can change scattering/transmission per object, not globally on the camera.

    Also the Red Channel is for metallic, or at least thats what the 'Skin Textures' drop-down says. Shouldn't that override the Metallic slider under the drop-down 'Main Physical Properties'? If I don't change the Metallic slider under 'Main Physical Properties' to 0, then the scattering doesn't use the map assigned in the Alpha channel of my texture.

    I would like to be able to use the texture to control metallic, that way if I have a character with metal on its face, it will work correctly. It doesn't seem like the Metallic or Roughness inside the texture does anything...

    Thoughts? Thanks.
     
  13. Deleted User

    Deleted User

    Guest

    @adamz
    That video is about a year old now, and the Skin shader has changed a lot since then. The old Skin shader was forward-only, while latest version has the forward-only "Skin (Forward)" and the deferred-compatible "Skin" shaders. The reason the deferred-compatible one has to make some of the settings global is due to storage constraints in Unity's G-buffer. So if you want full control per-material then you have to use the forward-only shader.

    All the sliders, including metallic, work by scaling the value sampled from the packed material map texture. The effect you observed is the metallic component crushing scattering and transmission which is a feature of both the "Skin" and "Transmission" shaders. This mimics the real world behavior of metals where they have a completely black albedo and absorb all scattered light. So you totally can use the metallic mask to control where the effect is applied.
     
  14. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    My gray-scale maps assigned to the Red and Alpha of my texture don't seem to change the Metallic or Roughness of the material. Only the sliders seem to work. I've tried setting the sliders to 1 and 0, and then changing the maps in those from white to black with no effect.
     
  15. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Even the transmission map in my Alpha doesn't change the amount, only the Metallic slider makes a difference too.
     
  16. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Actually never mind... I started a new project and re-imported Alloy and now it all works. Nor sure what happened but thanks.
     
  17. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    Hi all
    We have little problem with Unity and Alloy. We have Unity 5.3.5f1 and Alloy version 3.3.5. When I work in project with materials, when I duplicate already existing Alloy material and then we try to rename it Unity just crash without any warning screen or message, it is 70-80%percent chance that Unity crash, I happens on all computers in our small studio.
    Can somebody give us some advice about it, we also use other scripts like Scion Post Process effects, HBAO, Unity's SSR, some SVN stuff in unity.
    It is happen only on this version of Unity, before we dont have this problem.

    Thanks for help
     
  18. Deleted User

    Deleted User

    Guest

    @lukas-chrapek
    I'm not sure what advice I can offer on this particular issue. If it was working before with the same version of Alloy on a prior version of Unity then it is probably a problem with Unity. My only recommendations are to either report the bug to Unity and see if they can help you out, or upgrade to the latest versions of Unity and Alloy and see if that alleviates the problem.

    I wish I could do more, but without an error message or log it is outside my ability to diagnose and fix. :/
     
  19. lukas-chrapek

    lukas-chrapek

    Joined:
    Sep 13, 2015
    Posts:
    31
    @n00body

    Thanks anyway, i tried delete Alloy and install package again and for now its holding good, but also maybe something in project cause crash, because new projects with Alloy works fine... but one more reason for udgrade to new Unity 5.4
     
  20. Deleted User

    Deleted User

    Guest

    @Caeru
    Did you follow the "Advanced Setup" section of our Getting Started documentation page to set up deferred transmission support?
     
  21. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    No I did not. I will go through that now. Thanks!!
     
  22. Deleted User

    Deleted User

    Guest

    @Caeru
    Please note that SpeedTree stores their transmission data in the alpha channel of their specular maps. Our shaders are set up to read it from there, so be sure to set that map in the Transmission section of the material inspector.
     
  23. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    I have done that. It is looking much better now. Thanks!
     
  24. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I'm using RTP too. now when I place "Alloy Deferred Shading" on the graphics section, RTP looks bad with a heavily specular effects. so because of that I should use RTP deferred shading instead of "Alloy Deferred Shading". this will harm Alloy quality? is there any other way?
     
    Last edited: Aug 23, 2016
  25. Deleted User

    Deleted User

    Guest

    @Crossway
    Most Alloy features will flat out not work if you don't use our override shader. Can you please post screenshots?
     
    Crossway likes this.
  26. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    With RTP Deferred Shading it looks correct like below pic.



    But when it's on Alloy Deferred Shading it looks like this.



    Is there a way to combine this two shading with each other?
     
  27. Deleted User

    Deleted User

    Guest

    @Crossway
    I will look into what they are doing, and see what modifications need to be made to our shaders.
     
    Crossway likes this.
  28. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
  29. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    Hello,
    Just bought Alloy and I have such error:
    Assets/Alloy/Scripts/MaterialInspectors/Editor/FieldBased/Drawers/AlloyFieldDrawerFactory.cs(14,26): error CS0019: Operator `==' cannot be applied to operands of type `UnityEngine.Rendering.TextureDimension' and `UnityEditor.MaterialProperty.TexDim'
    My present project is huge so I thought it interacting with something but in newly created project it seems that the error still persists.
    My Unity version is 5.4.p2
    Maybe it's related with bad unity version recognition or something ?
    My header of the package looks like this: "unity_version":"5.3.0f4","pubdate":"07 Apr 2016","version":"3.3.5"

    Any advice ?

    Edited: I was able to grab proper version on workstation where Unity 5.4.p2 was newly installed, so it was related with Asset store that grabbed bad package I think.
     
    Last edited: Aug 23, 2016
  30. Deleted User

    Deleted User

    Guest

    @Killersan
    That particular error was addressed when Unity 5.3 was released, so I suspect it is a bad Unity version match
     
  31. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    Yes, exactly, it seems that on workstation where older unity still exists it grabbed me older Alloy, but on newly installed 5.4.p2 it was fine.
     
  32. Deleted User

    Deleted User

    Guest

  33. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    Hi, how do I add diffuse scattering to Deferred Skin Shader?
    I can see it in Forward Skin Shader but not in Deffered Skin Shader.
     
  34. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Is there a technical reason why the vertex color splats are called 0,1,2,3 instead of R,G,B,A? Seems the latter would make a whole lot more sense.
     
  35. Deleted User

    Deleted User

    Guest

    @Hexer_
    Please do the "Advanced Setup" section of our included "README" file.

    @StaffanEk
    It was an arbitrary decision.
     
  36. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    @n00body, thanks for answering.
    I followed the instructions and when I set metallic to 0, the skin looks washed out.
    I tried setting metallic to 0.1 or 0.2 to get around washed look but now the skin is too red for dark skinned characters.
    It just looks wrong.
    Sadly, I can't recreate the skin I had with the older skin shader. Anyone has any idea?

    Maybe I could use a legacy shader?
     
    Last edited: Aug 25, 2016
  37. Hexer_

    Hexer_

    Joined:
    Aug 25, 2016
    Posts:
    94
    @n00body, I settled for kinda optimal options where I reduced Skin Scattering weight to 0.2 so it now looks the closest to the old look.
     
  38. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    When I increase roughness on a metal (For car paint material) it looks like below pic.



    Is that possible to make them a little darker? It's too shiny.
     
  39. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Crossway can I see a screenshot of the entire material's editor
     
    Crossway likes this.
  40. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I'll check that issue later, for now I have a bigger problem. as everyone know Relief Terrain Pack has it's own "deferred shading" that solves issue of specular on terrains. but now I have to use Alloy too and after replacing Alloy Deferred Shading on graphic section I have problem of heavily specular on terrains again!


    I can't use RTP and Alloy together now.
     
  41. Deleted User

    Deleted User

    Guest

    @Crossway
    Don't go posting code from paid frameworks! We already have access to the RTP package on our end, and are actively looking into the terrain issue.
     
    Crossway likes this.
  42. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Luckily RTP tucks everything away but a deferred answer to both RTP and UBER, you both offering functionality you can't supply alone, would be great for deferred
     
  43. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Sorry I removed it, this specular issue on terrains usually appears when the direction light intensity is high, above 2.0 or more. tom mentioned before if we render terrain on forward this will be solve but as lots of assets like AO or Segi doesn't work with forward I can't use this method.
     
    Last edited: Aug 31, 2016
  44. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    As Tom said:
     
  45. Rtyper

    Rtyper

    Joined:
    Aug 7, 2010
    Posts:
    452
    Hi, I've just been switching over to using Alloy in my current project, and it's really working great so far! The one problem I'm having at the moment is with animating lights. I have an animation clip made in Unity that animates the light intensity, so I changed it to animate the AlloyAreaLight intensity property instead. For some reason though, the changes only take effect when I select the light object in the hierarchy. It seems like the .Intensity setter that rebinds the light isn't being called when the value is changed by the animator, but I'm not sure how that could be the case.

    Is this a bug somewhere or am I doing something wrong? Thanks!
     
  46. rainisto

    rainisto

    Joined:
    Jul 19, 2015
    Posts:
    35
    Hi, I bought your asset and have been playing out with it, great stuff!

    One request/question: is there any way / shader script to make a shadow catcher / shadow matte texture that would work with Alloy? (I'm working with a VR / AR project.) I'd love to make a transparent texture that renders only the shadows that fall onto it.

    I have these for the normal Unity shaders, but can't find anything that would work with Alloy... :/
     
  47. Trideka

    Trideka

    Joined:
    Mar 24, 2013
    Posts:
    16
    Hi,

    I'm having a pretty big issue with the SpeedTree shader with Alloy 3.4.1 on Unity 5.4.0p4

    Just testing with the sample trees from SpeedTree, I've converted the materials over to the Alloy shaders. In both the scene view and the game view, the trees appear white - depending on how I pan the camera (though not enough to trigger an LOD change).

    This is in Linear Forward rendering. HDR is off as this is for a SteamVR project.

    Note that the shader issue cuts diagonally as the camera is is translated horizontally.


     
  48. Deleted User

    Deleted User

    Guest

    @Rtyper
    One of our other customers solved this issue in the past, and I am waiting on them to get back to me about how. I'll keep you posted.

    @rainisto
    I've never heard of that approach. Can you point me to the solution you use for Unity's regular shaders?

    @Trideka
    The SpeedTree shaders use our Transmission effect which, for the time-being, means you need to follow the "Advanced Setup" steps in our README to get it working. Our next release will have a forward-only variant of the SpeedTree shader that isn't dependent on the Deferred Plus camera component.

    Sorry for the inconvenience.
     
    Last edited by a moderator: Sep 6, 2016
  49. Trideka

    Trideka

    Joined:
    Mar 24, 2013
    Posts:
    16
    Thanks n00body
     
  50. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455
    Hi there,
    • So when would I really use instancing ... docs say that

    • Objects that use lightmaps, or are affected by different light or reflection probes, can’t be instanced.Also does it working static objects?
    How do use instancing in 5.4?
     
    Last edited: Sep 7, 2016