Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

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:
    516
    [​IMG]
    [ ASSET STORE LINK ] | [ ALLOY WEBSITE ] | [ SHOWCASE ] | [ DOCS ]|[ CRASH COURSE VID ]
    We here at RUST LTD. are overjoyed to announce that Version 3 of our Alloy Physical Shader Framework is now released! We've spent the entirety of the Unity 5 beta cycle rebuilding Alloy from the ground up, taking advantage of all the new incredible features Unity 5 has to offer, and battle-hardening the set through extensive testing alongside the delightful folks at Camouflaj for their game Republique Remastered, and with countless other artists who've soldiered through the beta process with us.

    [​IMG]
    The breadth and depth of the set has been expanded dramatically, accessible through the best custom inspector we've ever built. Features such as Masked Scrolling Emission, Detail Mapping, and Team Color masking can now be dropped onto an Alloy material with two clicks, freeing you to mix and match features without having to search for some overly verbose shader name in a maze-like hierarchy.

    [​IMG]
    Alloy 3 also contains a full Character-Oriented Suite, including Pre-Integrated Skin, Parallax Eye and Eye Occlusion Layer Shaders, and several permutations of Anisotropic Hair. The package comes with a sample scene containing the character seen in the shot here, to help give you a starting reference for skin-specific map data, and best application of parameters.

    [​IMG]
    Of note as well is that with version 3, Alloy now fully supports DX11 Tesselation. Every single shader in the set now has an SM5 Tessellation variant, for those of you who just can't get through the day without drowning your GPU in triangles :).


    To get started, check out our 90 minute crash course video, that'll give you a broad overview of how to use the set!
     
    Last edited: May 13, 2015
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Congrats on the release, guys... you have truly outdone yourselves in many ways... I am proud to be an alloy user. I wish I could attend the GDC (I'll actually be in that area on Friday)...
     
  3. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    389
    Congats guys! I am using Alloy 3 for my project and i could not be happier :D
     
  4. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    567
    Woohoo! Great job guys :). Alloy 3 is a big step forward and easy to use.
     
  5. VertexFiend

    VertexFiend

    Joined:
    May 2, 2013
    Posts:
    107
    Andromeda Station is a recent convert to the ways of Alloy and we love all the things it does! Amazing work you guys! So excited to see what you are cooking up next!

    Here's our Orbital Reentry Craft interior with all Alloy shaders running in Unity 5!

    [​IMG]
     
  6. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    Awesome stuff @VertexFiend !!! I can't wait to reeeally play around with it after GDC.

    To everyone else, I wanted to post a link to our announcement blog post:
    http://alloy.rustltd.com/blog/index.php/2015/03/03/alloy-3-0-released/

    So you guys know for the future, in general we'll be posting on this thread for short announcement summaries/links/sweet pics, and answering questions you might have, while keeping the longer-form stuff like tutorials, large image sequences, etc. on the blog.

    Anywho, enough for now, gotta work on some booth-talk materials that I totally should have done last week.

    -Anton
     
    VertexFiend likes this.
  7. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    GOOD NEWS EVERYONE! With Unity 5's new pricing structure, Alloy isn't pro-only any longer! Whether you're an indie user that's been eyeing the package, or an asset-seller making high fidelity work, life just got 100x better today :)
     
  8. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    Hiiiiiii Guys,

    [​IMG]

    The GDC 2015 Expo begins today. Check out some of the sweeeet stuff being shown off by myself, Nvyvve and Camouflaj! http://alloy.rustltd.com/blog/index.php/2015/03/04/alloy-3-gdc/

    Also, for those of you who couldn't make it (or didn't want to go in the first place :p), don't worry. I'll be released builds of all these sweet demos once I'm back from GDC (and have a bit of time to polish up the UI/controls/etc.).

    -Anton
     
    Wambli and VertexFiend like this.
  9. aigam

    aigam

    Joined:
    Dec 31, 2005
    Posts:
    170
    Hi!

    How easy is to tweak the shader properties so it can be mobile friendly?

    Your product looks very cool!
     
  10. KC1302

    KC1302

    Joined:
    Jan 11, 2014
    Posts:
    94
    Hi! Congrats with the latest release. Very usefull, especially love the alloy.glsl for substance painter.

    But there is a slight minor issue. The alloy core shader isn't absorbing/reflecting incoming light from my environment (global skybox). Could this be a shader issue or am I doing something wrong.
     

    Attached Files:

  11. KC1302

    KC1302

    Joined:
    Jan 11, 2014
    Posts:
    94
    Here are my Substance Painter settings with Alloy.glsl. I presume the settings are correct.
     

    Attached Files:

  12. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    @aigam
    We're not explicitly supporting mobile at this time. We're waiting for OpenGL ES 3.0 and Metal hardware to become more commonplace, and for Unity to figure out how to support linear-space on mobile. Currently a lot of mobile devices won't let you switch from gamma to linear and vice versa at runtime, and Unity still needs gamma for their UI even when in Linear mode for everything else.

    @KC1302
    I've sent you a PM. Can we continue this conversation there? Thanks.
     
    aigam likes this.
  13. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    Last edited: Mar 6, 2015
  14. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
    Is there a summary of what Alloy offers above the new physically based shader of Unity 5 ?

    Thanks
     
  15. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
  16. nasos_333

    nasos_333

    Joined:
    Feb 13, 2013
    Posts:
    6,246
  17. Licarell

    Licarell

    Joined:
    Sep 5, 2012
    Posts:
    432
    With your Point and area lights, do they cast shadows? Even with an animated character?

    Also any plans for a plane and tube area light?

    Also if I may IES patterns for your lights?
     
  18. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    @Licarell
    Basically we made it so that our area lights override the Point and Spot lights for forward and deferred mode. So they receive the shadows that you would normally get from those light types. If you want the original behavior for those light types, you just set them to size zero.

    As for other area light shapes and IES patterns, those are a no go. Frankly, the way we hijacked Unity's light inputs to make these work was a major hack. Even if we could get the data describing other lights into the shaders, we would need to use dynamic branching to switch between them because Unity doesn't let us define keywords for new light types.
     
  19. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    583
    Let us know ASAP on that fix for Painter 1.3.

    Thank you,

    Gary
     
  20. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
  21. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    @Licarell IES Light types do tend to have a spherical representation. They're rarely implemented any differently in a real-time context. Instead one needs to generate a panorama/6-sided cookie representation of the IES profile, and use that as a cookie for the point light. I've seen it done a bunch on arch-viz projects in Unity. Do note that this cookie will _not_ be passed into Enlighten (which just reads it as a regular point light).

    Regarding tube/plane area lights: While these are theoretically possible, they wouldn't be ideal for both the reasons @n00body mentioned, and that there isn't anything approaching an efficient way to handle shadow-casting from them. We made a decision early on in the development of Alloy 3 that we didn't want to make any lighting modifications that would actively break functionality, or create special cases (such as having a light type that couldn't case shadows/be occluded).

    A tutorial video centered around the lighting changes with Alloy 3 is #2 on my list (behind a general usage overview), so you can expect that sometime very soon after GDC is over!
     
    Don-Gray likes this.
  22. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    583
    Thank you sir.
     
  23. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,419
    Juts two things i see in the package are not so good :
    - The hair looks really bad like a simple object with normal map
    - The skin shader effect is no very noticeable.
    But the others are really good.
     
  24. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    With the hair and skin, I suspect you are running into the packed maps not reimporting problem. Did you see our quickstart video for solving this problem:


    EDIT: Things are a little haphazard right now, but documentation and tutorials will be our number one priority post-GDC.
     
    Last edited: Mar 6, 2015
  25. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,419
    I'm not a buyer of the product.
    Just seeing that image , i don't see any hair using planes and alpha textures , it's just some horrible mesh.
    The skin effect using some lights around should be more noticeable, it looks more like some strange effect.
    [​IMG]
     
  26. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    @zenGarden
    That character example was made before the hair shader was done, so it doesn't use it. Also, the skin is not configured as well as it could be as our lead artist is predominantly an environment artist.

    If you want better examples of our character shaders in action, take a look at Republique Remastered:
    http://alloy.rustltd.com/showcase/republique-remastered
     
  27. zenGarden

    zenGarden

    Joined:
    Mar 30, 2013
    Posts:
    3,419
    I just say it really don't make good advert for your skin and hair shaders.
     
  28. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    Hey, @Neptune_Imaging , wanna drop a gorgeous shot or two of Aikos face on here using the skin shader for @zenGarden to see?

    Neptune here is the dude in the community here that's been doing crazy high fidelity character work, and helping us figure out what features the character shader set.
     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Sure, @xenius, these should be very impressive. These are in progress shots that have improved over time with the Unity 5 Beta. The hair is still being worked on.

    Advanced Teeth Rendering.png Advanced Teeth Rendering.png Screenshot 2015-02-04 17.46.12.png
     

    Attached Files:

    artzfx and xenius like this.
  30. KC1302

    KC1302

    Joined:
    Jan 11, 2014
    Posts:
    94


    I thought I should at least post
    @n00body
    Thanks buddy for the help!
    Alloy 3 works like a charm. Recommended +1
     
    xenius, VertexFiend and n00body like this.
  31. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    Gorgeous stuff @KC1302 !!!

    Question: for the glass in that lamp, are you a translucent core shader, or one of the glass shaders?

    Also, that ground texture is just... incredible. Did you make it, or acquire it somewhere?
     
  32. KC1302

    KC1302

    Joined:
    Jan 11, 2014
    Posts:
    94

    Hey Anton. It's me Kimman.

    Answer : I used Alloy/Glass (high quality) for the glass. Simple light-grayish bitmap with some tile-able grunge.
    The shader did most of the heavy lifting in this case.



    Answer : The ground texture is a tileable texture that I took from www.cgtextures.com. I extracted the Height/Albedo/Normal with Substance Bitmap2Material.
    For the terrain I used Relief Terrain Shader. The nice bumpy waves come from the heightmap powered by P.O.M.

    Currently adding more assets to the scene but will take a while. Majority of the normals were extracted from high-poly models.
     
    Last edited: Mar 8, 2015
  33. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    @KC1302 Hi Kimman! Totally didn't connect your Unity forum name to you. Shows how tired I am after GDC...
    Gorgeous stuff again!
     
    KRGraphics likes this.
  34. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    197
    been really interested in this pack for a while. i have some questions however.

    do your shaders cull unused code similar to the standard shader? not a fan of shader combination blank spots.

    how good are your hair shaders? sorting problems?

    cloth shading? most cloth has a lower diffuse brightness when looked at dead on.(has to do with a mix of ambient occlusion and shadowing being less visible at grazing angles due to the overlap of strands) even a basic fresnel darken/brighten would work fine here. though allowing the control of how much is applied as ambient occlusion and diffuse dimming would be really valuable.

    whats the glass shader like? is there a light direction aware one? glass is more reflective on the side thats brighter. eg: this is how you get a one way mirror.

    reflection probe based refraction maybe? if not, you may look into it as it has some cool perks. if you make the object opaque you get order independence(since its not technically transparent) and you can blend it into normal refraction to get rough refraction effects(kinda). plus its super cheap. not great on moving objects though.

    how well do these work with defferred rendering? what shaders drop to forward rendering?

    how complicated is it to write new shaders? example maybe?

    do you have a tool for packing the textures?
     
    KRGraphics likes this.
  35. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    @Cynicat

    1. Yup, the shader is using a combination of static uniforms and multicompiles. Only the stuff you're using is turned on at a given time.

    2. The hair shaders have two forms, a standard translucent, and a base one that has a cutoff between opaque and translucent regions to help you control the blending point. I haven't used it extensively (as I'm an environment artist), but the folks at Camouflaj got great usage out of it, and it was tweaked several times during their production as issues came up.

    3. Don't currently have a dedicated cloth shader (as such a form would probably be forward only). However we're using Disney's microfacet diffuse brdf which really shows its worth on surfaces at or near 100% roughness

    4. The glass shader is a two-pass translucent shader that uses a grab-pass for refraction, and then does multiplicative blending for the base-color. It is otherwise using the standard properties of the GGX brdf.

    5. Interesting idea. Do you have a reference for an example. Curious how that looks.
    .
    6. The set includes a deferred override shader. Everything fully opaque draws with it. So translucent, glass, skin, hair, transmission, and eye shaders draw forward only due to custom lighting/blending requirements.

    7. The framework has been setup in as organized a manner as possible to allow for modifications. It's still something that requires intermediate-to-advanced shader knowledge to do, but you're working on top of a meticulously organized and commented core. Additionally, we designed a mark-up language for the custom Shader UI (with inputs right in the shader file), so if you create a custom shader with the framework, you can get our fancy UI without editor scripting. We haven't assembled the full API doc for that though, expect it by around the end of the month or so.

    8. Alloy comes with a custom material map packer. There's old information on the Alloy blog about it (previous version), I'll be doing an updated video this week.

    cheers!
     
  36. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    197
    @xenius its an effect i've used before with tools like shaderforge. lack of specular convolution was a problem(not as much now that unity has reflection probes)
    heres a picture i found of jove 2.0's implementation. not a super good show of the rough refraction however.
    http://forum.unity3d.com/attachments/joveglass-png.107415/
     
  37. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    And speaking of the skin shader, I have been experimenting with the normal maps that the shader requires, especially since it is using the mipmaps that make the skin softer. But after some tests (and waiting for Alloy compile my changes), I have some ideas and inputs that will make the shaders much better, and especially artist friendly. So here it goes (and please bear with me).

    Exhibit A (Unmodified normals): In this shot, I am using the original normal maps that came directly from Zbrush with no changes to original source. Though the slider reads .8 for Bump Blur, the skin still feels hard to me artistically and modifying my normals is an ardous process.
    Screenshot 2015-03-10 15.29.59.png
    Exhibit B (Modified Normals):

    You probably can't tell in this shot, the change is so slight, but the results speak for themselves. The skin is starting to feel softer and closer to wax (not ideal for human skin but the lighting itself looks so much better now) and for translucent materials this is a very important step. And when you pull the camera back, the skin is definitely softer.
    Screenshot 2015-03-10 15.29.59.png

    How I did it:

    In the first graph, using the unchanged normals. No need to explain this one. But...
    Screenshot 2015-03-10 15.39.54.png

    To modify the normals, here are the steps.

    1). I extract a copy of the skin normal map with a Blend Node set to Copy and use a mask just for the skin parts of your mesh. (You can make this in Xnormal or paint it in photoshop)

    2). The strength is increased with an Overlay node (Lowering the opacity to something like .4).

    3.) I then split up the RGBA channels into their own channels (RGBA Split is used) so I can carefully modify them at will starting with 2 Contrast nodes for the Red and Green Channel which makes the channel stronger (will remove this later since it is not necessary anymore).

    4.) At this point, it is too crisp so I can blur it a bith with a blend node. Use smaller values until you are happy with the results.

    5.) Using the RGBA merge and plugging everything back into it, your new normals are ready for use. Drop 2 blend nodes (make sure the blending mode is set to copy) after the RGBA Merge exactly as you see it in the graph below. Lastly, normalise the changes with a Normal Normalize node.

    This setup works great for things like candlewax and makes the skin look softer. And I am hoping in an update for the character based shaders, we can have the ability to blur the normal maps per channel (it will get TEDIOUS fast to keep doing this setup in Substance Designer) especially for artistic control.

    It can be just like the bump blur, 0 is unchanged and 1 is completely blurry (it is up to the artist to get the look they way). And since red scatters the most, the red channel is the blurriest, the green channel is weaker than red, and blue is unchanged since it is the depth of the normals. Hope this makes sense.


    Screenshot 2015-03-10 15.33.53.png
     

    Attached Files:

    Last edited: Mar 10, 2015
    n00body and xenius like this.
  38. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    567
    n00body, KRGraphics and xenius like this.
  39. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    197
  40. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    567
    Yup, that was the clean look. There is a dirt and wear slider for user choice... I made up a couple more Alloy 3 samples below.

    SciFiVol1Screen1900army.jpg SciFiVol1Screen1900ss.jpg
     
    xenius and KRGraphics like this.
  41. Cynicat

    Cynicat

    Joined:
    Jun 12, 2013
    Posts:
    197
  42. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    567
    Thanks. Vol.2 will be ready soon :).
     
    xenius likes this.
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Screenshot 2015-03-11 13.47.21.png Here is a modified setup of my normal map edits. I ended up using the contrast node to strengthen each individual channel, and using more split nodes for each channel individually. Also, having a lower tint strength will aid in having some scattering effect show better. Setting your diffuse too high kills the effect.
     
  44. ShadowK

    ShadowK

    Joined:
    Sep 5, 2013
    Posts:
    4,438
    Tell me more about your terrain shader.. Hmm!
     
  45. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    516
    Mornin Everyone!

    Couple quick announcements (and a cool pic or two). I wanted to fill ya in on a little game jam I've been doing this week (that of course also turned into a bit of an Alloy workflow stress-test).

    Still no title for it yet (Working title is Rollgue). It's a hybrid physics-game and turn-based rpg with procedurally generated levels, dice on dice action, and an aesthetic that tries to capture the look of wargaming miniatures/boards.

    It's been a super fun project so far, especially as its been an excuse to use a fair number of Alloy 3's subtler features on more than a test-scene. The POM has been hugely effective, as has AO2 (for adding room-baked AO maps in addition to the specific material's AO). I think I'm using detail mapping on every damn material, and makin liberal usage of the glass-low-quality shader for all the polycarbonate/glass.

    Would you guys be interested in a rambly video where I do an aesthetic/texture/material breakdown of this project?

    7DRL_Day_5_bong.png
    7DRL_Day_5_troll.png
    7DRL_Day_6_Warlock.png
     
    twobob, Leverpastej and KRGraphics like this.
  46. garyhaus

    garyhaus

    Joined:
    Dec 16, 2006
    Posts:
    583
    NIIIIICCCCEEE!
     
  47. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    673
    @ShadowK
    Well first I need to mention that it was broken by an 11th hour API change from Unity 5. We're planning to do a point-release patch this weekend to fix that and some issues with the recent Substance Painter 1.3 update.

    As for the shader, currently we have a deferred-compatible 4-Splat terrain shader. It supports a base map with color and normal modification so you can treat splats like detail maps. We have additional per-splat parameters such as control of the specularity and tint of the specular by the base color. We also have controls for smoothly fading out splat detail and transitioning to distant terrain material parameters. Finally, our map packer tool support packing color and roughness together with Specular AA baked into it for smoother terrain shading.

    We also have tentative plans for a n-Splat terrain shader, but it looks like that one will have to drop our additional per-splat parameters and be forward-only. I'll provide more details as I have them.
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Please sir... ramble away :)
     
  49. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,669
    Hey guys,

    Just stopping by to share some modified normals for the skin shader. I am basing this on the Activision paper that I was reading and how the red channel is the blurriest and the green is still sharp, and the blue channel is treated like a cavity. And I hope in an update for the character shaders, @xenius and @n00body can give us this type of control... I have to do this in Substance Designer for every character and make sure the normal map is crunchy for this to work,


    Screenshot 2015-03-14 12.25.00.png

    I even turned the model blue to really show the scattering. And my diffuse is pretty low in this shot. The one downside I am noticing is that the roughness is correcting itself (the skin roughness is .793 and it looks smoother than it is supposed to), so if there is a way to avoid this it would be great.
    Screenshot 2015-03-14 12.28.39.png
     
    Last edited: Mar 14, 2015
    Cynicat likes this.
  50. ShadowK

    ShadowK

    Joined:
    Sep 5, 2013
    Posts:
    4,438
    Thanks for the reply. Two things I always find missing from terrain shaders is per layer parallax mapping (or POM (a bit heavy in some cases though) and some sort of texture tiling break up methodology. In UE4 we used macro variations and a greyscale (noise) overlay to add patches / remove seams. Going one step further, we changed normals based upon world position so it'd flatten over a certain distance.

    Now I'm sure I could copy that setup using shaderforge or something else, but if it happened to be part of a complete package of great shaders anyway. I'd be more inclined to buy that package :)..