Search Unity

Alloy Physical Shader Framework by RUST LTD.

Discussion in 'Assets and Asset Store' started by xenius, Nov 20, 2013.

Thread Status:
Not open for further replies.
  1. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    hello xenius,
    we are currently considering alloy. do your POM shader support lightmapping and IBL from marmoset?

    ty
     
  2. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ndoxx Yes it does. All of the core shaders support both POM, and skyshop reflections.
     
  3. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    Hello xenius,

    Please inform on how I could make alloy packed map? I need to make packed map from substance material, and the problem is material packer could not use procedural texture for input.
     
    Last edited: Aug 17, 2014
  4. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    Last edited: Aug 17, 2014
    KRGraphics likes this.
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    +1 Maybe that is a nice workaround for the sbsar files... but we can't change anything directly unless we go into debug mode
     
  6. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    hehe, thanks for your info. i already export all my substance into bitmap :p

    more question, where in substance i could get occlusion, roughness and specular? i try to use bump for occlusion, gloss map for roughness and specular map for specular but the result does not look realistic enough. it is better if i set custom value, but the material looked flat :)

    thanks
     
  7. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    @xenius, I sent you an email today with an updated sbsar.
     
  8. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Are you using Substance Designer to generate your substances or are they precompiled .sbsar file you have purchased ?
    You would use Specularity in Alloy. You can use an initial mid grey setting for that.
    Roughness depends on the surface of your material.
    Substance Designer has a node to calculate Ambient Occlusion.

    If you can provide some more info on what your workflow is I can maybe help you with the outputs you need.
     
  9. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    hello artzfx,

    thanks for your info, initially i just used purchased sbsar, but, as sd4 got substantial discount, i purchased that :p.

    so, my question is what is the best way to get realistic output from sd4 to put into packed channel?
     
  10. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    You can use a RGBA Merge node in SD. Connect your Metallic, AO, Specularity and Roughness nodes into the appropriate RGBA channels. To setup your Output nodes view this video I made.




    NOTE: I have asked the Alloy guys to check something for me today so waiting for confirmation on my output quality in Alloy. However, this video shows the step by step to follow once you have your substance with Alloy Packed Map in Unity. No sound for this video.

     
    KRGraphics likes this.
  11. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    wow thanks, i will try it soon
     
  12. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    hello, i just tinker with alloy, substance, and beast LM, i got one problem with beast.

    I am using directional light in my scene, but I got problem when i bake with beast and directional lightmaps.

    upload_2014-8-19_9-44-39.png

    as you can see, in the shadowed section, i still got specular highlight, which i believe is wrong.

    Could you advice where on the shader i could fix this?

    Thanks.
     

    Attached Files:

  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I normally use Dual Lightmaps when I create exterior scenes. Are shadows enabled with the directional lights?
     
  14. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    That looks like a light leak issue, whereby Unity is seeing a hole/gap in your geometry.

    Is the portico a separate piece of geometry to the wall? if so place a cube (flattened to fit) inside the portico/eave where the leak is happening.
     
  15. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    yup, shadow is enabled, as you can see in the left side of the window.

    as for the portico, it is different geometry than main wall, but as you can see, the shadow is already there, but the specular highlight is also there. maybe it is problem for directional lightmap?
     
  16. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    @xenius, could it be that my problem has to do with alloy shader are ignoring shadow when calculating specular highlight using skyshop cubemap? my problem gone if i use rsrm cubemap, though i only use standard cubemap.

    could you confirm this?

    Edit: problem solved, my bad i forget to update my skyshop cubemap. Thanks for all the helps :)
     
    Last edited: Aug 20, 2014
  17. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    Hi @ndoxx . I'm at Unite atm, so i cant talk much. Alloy doesn't ignore shadows in any mode. However, remember that the cubemap isn't going to be occluded by anything. Its a cubemap, so it sending in lighting energy towards your surface, regardless of whether its in shadow or not.
     
  18. angelodelvecchio

    angelodelvecchio

    Joined:
    Nov 15, 2012
    Posts:
    170
    Hello ! is this great shader pack already compatible with unity 5 ?

    Thank you
     
  19. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys... here is a render of the Alloy skin shader with an expression of pain... I will do more later, but for now, I hope this will demonstrate the kind of detail I am going for. At the moment, I am still not completely done with the process but in a future guide, I want to show how I go about doing all of this. Screenshot 2014-08-22 12.28.42.png Screenshot 2014-08-22 12.28.59.png
     
  20. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey,

    I'm getting strange artifacts when using deferred rendering and the skin shaders / transparent shaders. Patches of discoloration appear all over the model and move around.

    The sword seemed a bit strange as well, but that may just be my settings, I didn't bother playing with it very much in deferred. Everything looks fine in forward.

    Thanks for your help!,
    Dale

    [Edit]

    Ah, I just saw that you guys are having issues with deferred in OSX. That makes sense now. I assume that I should hold off and just use forward rendering then. ... Makes my decision easier ;).
     

    Attached Files:

  21. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    Hello,

    I got another problem with lightmapping. I use directional lightmap, and when i applied the lightmap, i lost my specular highlight.

    Here is the problem :

    upload_2014-8-23_8-31-47.png

    and this is the supposed result, which is working using realtime shadow :



    thanks.
     

    Attached Files:

  22. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    If I would were you, I would use Dual Lightmaps. It will eliminate the issues you are having wit disappearing speculars.
     
  23. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    i see, do you have to use directional lightmap with deferred rendering? or it can be used with forward rendering?
     
  24. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I haven't used a forward rendering pipeline since Unity 3 :( so I couldn't tell you. Try using Dual Lightmaps and I think your problem will go away.
     
  25. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    ok, i will try, but what is the problem with directional lightmap so this problem occurs?
     
  26. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ndoxx: You will only be able to both use Directional Lightmaps, and get further real-time light effects blending over them (like keeping your directional light set to real-time only and shadow-casting), when using deferred lighting mode. This is a Unity-thing, not an Alloy-thing.
     
  27. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey,

    I was just wondering if theres an ETA on getting deferred to work with OSX, or am I stuck with forward rendering if I want to release on the mac?

    Thanks,
    Dale

    PS: Besides that, awesome package ... well worth the price!
     
  28. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @DGordon: Our team is still in transit from Unite, but as soon as we're all back, we have something we can try to fix things for you. Can you pm me your skype name and invoice #? When we have it ready to test I can pass you a beta build of it before we push it as an update to confirm things!
     
  29. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Has anyone bothered to merge Alloy with RTP3 at this point?
     
  30. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @DGordon: Considering rtp3 and alloy are frameworks constructed in very different ways, merging them wouldn't be possible. We will be providing a high-end terrain solution once Unity 5 comes out (as we're currently waiting to do all things terrain-and-foliage related til we can work with speed tree).
     
    KRGraphics likes this.
  31. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Ah okay. I'm currently using a (broken) version of RTP3 ... I gave it a shot and it broke parallax (oops!), but it still allows me to use a bunch of nifty features (layer saturate/brightness/normal maps/and some other nice things that are still better than default terrain). I'll just continue prototyping with this in the mean time ...

    Do you have any idea what the eta on that is? Obviously I don't mean a hard date ... rather, months, half a year, more, etc? A terrain package sounds great ... the shaders are wonderful, I just don't want to use the default terrain with them considering I have quite a bit of terrain in this project ... just trying to figure out my options before I go full speed.

    Thanks!,
    Dale
     
  32. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @DGordon: To be on the safe side I'll say months, as I have no idea when U5 will actually be released. Terrain shaders are a bit of a nightmare as well due to SM3.0 limitations. I've still been puzzling over whether there's a better approach than what's been done thus far.
     
  33. dxmachina

    dxmachina

    Joined:
    Jul 4, 2012
    Posts:
    66
    Hi Guys,

    Quick question... Does Alloy use GGX Reflection model?
     
  34. Deleted User

    Deleted User

    Guest

    @dxmachina
    No, we chose to go with Normalized Blinn Phong because it was easier for us to match it to a variety of Phong-based IBL solutions, as well being able to easily pre-bake specular AA for this BRDF into our packed material maps.
     
  35. dxmachina

    dxmachina

    Joined:
    Jul 4, 2012
    Posts:
    66
    Thanks for the quick reply!

    What's the situation with deferred + OSX? I see a couple comments above.
     
  36. Deleted User

    Deleted User

    Guest

    @dxmachina
    We're currently testing a fix for that and hope to push out a 2.1.1 update soon (like early next month). Apparently the MacOSX version of Unity really doesn't like it if you make a forward-only shader without tagging it as "exclude_path: prepass" and then use it in deferred mode.
     
  37. dxmachina

    dxmachina

    Joined:
    Jul 4, 2012
    Posts:
    66
    Thanks again!

    I enjoyed the talk at Unite. Would you consider providing informal best-practices notes for your skin/hair shaders? Other than preparing the correct texture maps are there any other tricks or hints specific to your Skin/Hair shaders that I could pass on to my character modeler?
     
  38. ndoxx

    ndoxx

    Joined:
    Jul 7, 2013
    Posts:
    17
    @xenius Hi, i want to integrate alloy with silhouette correct relief mapping.

    Could you point out to documentation when i could write my own shader using alloy core?

    Thanks.
     
  39. Amirbaa

    Amirbaa

    Joined:
    Sep 1, 2014
    Posts:
    6
    I have problem with cubemaps in alloy shaders. When I select cubemap it doesn't effect anything, it stay empty slot.
     
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Do you have it set to Skyshop or RSRM?
     
  41. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    Hi everyone!

    I wanted to let you all know we just pushed a minor update to Alloy.

    OSX USERS! Would you please give this update a shot, especially in deferred mode? We think we've finally hammered out a bug that was making things like the skin and translucent shaders behave oddly in that mode.

    Version 2.1.1
    =====================
    Integration:
    - Substance Designer
    * Updated Alloy preview shader to use the new SH diffuse lighting feature.
    * Added a new shader to render using packed material map rather than individual channels.

    Bug Fixes:
    - Fixed the translucent & skin shaders to render correctly in deferred mode on MacOSX.
    - Fixes issues when using skin shaders with Candela in deferred mode.
     
  42. AaronClark

    AaronClark

    Joined:
    Oct 14, 2013
    Posts:
    39
    Everything in the demo scene looks correct in both forward and deferred on OS X 10.9.4.
    The SD packed shader loads up and seems stable, not sure if all the features are working as not had time to play with it much yet.
     
  43. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572

    Getting it now, thank you :)
     
  44. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Hi xenius,

    The Alloy SD shader views nicely, however the AlloyPM SD shader views flat... no spec, reflection etc. It seems to only pick up the Diffuse and Normal outputs, not the "packMap" output.

    I presume the Identifier/Usage in SD for the AlloyPM output should be "packedMap"?

    Thanks.

     
    Last edited: Sep 3, 2014
  45. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ARtfx I looked in the shader and it looks like Josh named the usage "packed" Could you give that a shot?
     
  46. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    BAM! that worked perfectly :). I searched the shader before posting above and found "packedMap" so was using that. So the "Map" suffix gets dropped when entering for usage etc I presume.

    Thank you.
     
  47. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ARtfx Basically in the shader, you'll see a line like this:
    <sampler name="packedMap" usage="packed"/>

    Note how its defining the usage name at the end. The sampler name is what the shader uses internally. :)
     
  48. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Cool thanks xenius. I presume it is a limitation of the Unity SD integration that does not allow you to auto generate and populate the texture slot in Alloy for the packedmap?
     
  49. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @artzfx: yes it seems to be so. I think they only populate the unity standard types.
     
  50. BabyDinoHerd

    BabyDinoHerd

    Joined:
    Mar 27, 2014
    Posts:
    21
    Deferred Specular Color?

    I've really enjoyed what I've explored with Alloy so far, and deferred rendering certainly has its advantages.

    However, the nice specular reflections produced by PBR can be very distracting when they're the wrong colour, as in the case of many different colours of lights. I know Unity is takes the specular color from the diffuse color, and it seems like Alloy is doing the same thing, with its own tweaks and corrections.

    So, a red and green point light above a smooth unoccluded dielectric ends up with yellow specular highlights: http://i.imgur.com/Afs40wL.png.

    Is there any way around this? Beyond, of course, keeping lights of significantly different colours out of range of each other?
     
Thread Status:
Not open for further replies.