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

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Trying to stay away from that...
     
  2. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Neptune/AlteredPlanet: Yeah, there are some limitations in terms of simulfeatures with the skin. It is, like so many other things, a limitation of SM 3.0 texture samples, and the other features available in the shader. For Alloy 3.0, we might be able to reconfigure things a touch, but in general, having metal and skin on the same texture canvas wasn't something we prioritized considering it was much more convenient workflow-and-texture-sample wise to pack the skin data into the packed map. Also, in response to your comment AlteredPlanet, shaderforge isn't compatible with Alloy. We're entirely separate frameworks, as SF outputs straight cg shaders, and ours is built to the Unity Shaderlab spec.

    I can talk to Josh though about the idea of adding metallic modification back into the skin set, maybe as its own separate mask, in Alloy 3.0. Shall have to see if doing so would bump some other feature back out.
     
  3. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    That sounds cool xenius... I was doing work last night and the topic of metallic lipstick came to mind :). Also, I will have a character who, when he takes damage will have metal under the skin... would be very interesting to do, especially with using Substance Painter
     
  4. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    Also, for everyone who hasn't played with POM yet, I wanted to throw up a couple quick screenshots so you can see the difference. It's a somewhat expensive effect, but if you're really trying to fake depth using a texture, and have a solid elevation/bump/relief map to use on the texture, the effect can be striking. Be aware though, that POM _doesnot_ play well with hard-surface modelling workflows.

    POM1.jpg POM2.jpg POM3.jpg
     
    KRGraphics likes this.
  5. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I wonder what the performance hit would be on a skeletal mesh character... not that I plan on using this on every character
     
  6. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    Wow thanks for POM, looks really good. Those screenshots you uploaded don't do POM justice! My texture isn't the best (still learning substance designer and it looks kind of noisy), but it shows the extra depth added with the new POM shader:



    its not using full POM height either, at this viewing angle I can't do full POM height because it'll get artifacts unless you set the POM samples really high. but if you're in a top-down kinda game where the camera is looking down from above, you could get away with more POM height and it would look great
     
    KRGraphics and Deleted User like this.
  7. FogGobbler

    FogGobbler

    Joined:
    Mar 25, 2009
    Posts:
    147
    *sigh* I wish I could update... I left my computer on over night while the update was running, but this morning the installation was still stuck. No luck :-/ . I wonder why I´ve got these shader-compiling-problems..
     
    Last edited: Aug 7, 2014
  8. Deleted User

    Deleted User

    Guest

    @FogGobbler
    Sorry dude. But take heart, we are hard at work on a feature for Alloy 3.0 that will finally solve that problem. ;)
     
  9. FogGobbler

    FogGobbler

    Joined:
    Mar 25, 2009
    Posts:
    147
    That.
    Sounds.
    Awesome.
    :)
     
  10. Deleted User

    Deleted User

    Guest

    @philwinkel
    Any chance we can get that image with Bump, Parallax, and POM for comparison? :)
     
  11. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Thanks for the new 2.1 update enabling sbsar to work.
     
    KRGraphics likes this.
  12. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    That looks PURTY!!! I can't wait to use this on a moving character :)
     
  13. Deleted User

    Deleted User

    Guest

    @Neptune_Imaging
    POM is not suited for deforming meshes. It's barely suited for curved meshes. For that case, you will need tessellation, since it requires the silhouette be handled.
     
    KRGraphics likes this.
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I am HAPPY AS HELL to hear this... and I will be even happier when Unity/Allegorithmic increase the SBSAR res to 4k
     
  15. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Perhaps a future update :D
     
  16. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Yeah, I created a custom SD/Alloy Node for SD to pack my Material Map inside SD, bypass sRGB sampling so I can simply publish my sbsar and then drag the Material Map into the slot inside of Alloy. I tweaked my SD node so I see the results of the Material Map inside of the SD viewport when using the Alloy Shader. I also added a Roughness slider to the Node in SD to replicate the Roughness slider in Alloy to view changes in the SD viewport. A few more tweaks to polish some controls and it should be good. Very happy so far.

    I am only a couple of days new to Alloy, so am just understanding it's workflow, but so far it is doing what I want.
     
    KRGraphics likes this.
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I would love to see how you did this. I'm looking more forward to the SBSAR work flow. I have two characters already set up in SD, especially for texture swapping.
     
    Last edited: Aug 8, 2014
  18. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    sure- bump, PM, POM. bump is the flattest looking one, PM appears to raise up a little, and POM is where it appears to drop down.

    PM and POM are on full height, just to show the full effect

     
  19. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    I use the sbsar workflow in Alloy, not bitmaps. My Material Map is a sbsar Output I drag into the Material Map texture slot. I had a look inside the Alloy SD shader to see if adding the Material Map as an auto output was possible but it has 8 samplers already. At least the manual drag n drop works though. Couldn't do that pre Alloy 2.1, big thanks to the Alloy guys for enabling that :).

    The Node is about 90% where I want it to be, but I have a number of other nodes for Alloy I am using it with so just testing/tweaking the full suite at the moment . BTW, I also made a new Multi Material Blend node without the border/edge bleeding you were getting on the native version ;).
     
  20. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I would love to see this workflow... I've been banging my head on publishing a SBSAR. I hope you'll share the wealth :)
     
    Last edited: Aug 8, 2014
  21. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys, specifically xenius, what is the workflow with Substances using Alloy? It would be cool to get the short version of this since I've been anxious to get this working
     
  22. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    what issues are you having with substances? Alloy comes with a shader that you can load in Substance Designer. Just make sure your substance graph has all the outputs that alloy is looking for. In the substance graph, the alloy shader will directly pull from ambientOcclusion, height, roughness, specular, etc, etc, in other words it does not use the packed material map when you're previewing in designer.

    you can set up an rgba merge node and pipe that into an output to create the packed material map for alloy, and it'll be available as an output from your substance when you load it in unity.

    more info about using the SD4 alloy shader here: http://alloy.rustltd.com/?page=blog&post=using-substance-designer-4-alloy-preview-shader
     
    KRGraphics likes this.
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I already know about this... I meant as far as publishing the substance is concerned.
     
  24. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    what is the problem; what issues are you having?
     
  25. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I need to publish the SBSAR and I am running into errors
     
  26. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    255
    Thanks Xenius. I think I can try that, but I do not think it is going to work too well. For now I will keep this textures/material without Alloy.

    I will be posting some screenshots here soon, but first I have to finish some more work! Thanks so far, looking forward to more of your stuff. Gonna try out the new POM shading now!
     
  27. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Here is what to expect for the future of Alloy.. :) Hair and Eyes shaders are in the books, stay tuned. Screenshot 2014-08-10 18.14.06.png
     
  28. cubez

    cubez

    Joined:
    Dec 29, 2007
    Posts:
    57
    The Alloy FAQ states the following:
    Does anyone know if this is still the case? Or if not, when "soon" is going to be. I would really like to use deferred rendering on OSX. :)
     
  29. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Screenshot 2014-08-12 20.55.02.png

    A new render from Alloy... This is probably the most detailed and realistic I will get with this... enjoy
     
  30. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Neptune: Do you have any facial morphs yet so we can see the character with an expression, possibly gritting their teeth?
     
    KRGraphics likes this.
  31. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I am trying to figure out how to get this work in Substance Designer with blended normals... at the moment I am packing all of the textures together
     
  32. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I finally got the substances working. Now to solve the alloy part, which needs the pack map output or the proper naming because at the moment, the effect I am testing (The Midas Curse) doesn't trigger the metallic like it's supposed to.
     

    Attached Files:

  33. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    I made a quick video showing my workflow between SD and Alloy (Unity plugin). You will need the attached .sbs node I created to do this.

    This workflows allows you to design and view your graph using the SD Alloy shader provided by the Rust Ltd guys and also allows you to export your sbsar and output a AlloyPM (packed map) for use inside of Unity.

    video 1 - shows the SD workflow
    refer this updated post http://forum.unity3d.com/threads/al...ework-by-rust-ltd.212354/page-12#post-1738571

    video 2 - shows the setup in Allow/Unity
    Here is a preview of it working in Alloy PBR Metals substance product I have created for the Asset Store to use in Alloy. the sbsar is 4kb and contains about a dozen metal presets, height map input, plus a few other settings.

    refer this updated post http://forum.unity3d.com/threads/al...ework-by-rust-ltd.212354/page-12#post-1738571
     
    Last edited: Aug 18, 2014
    Deleted User and KRGraphics like this.
  34. cubez

    cubez

    Joined:
    Dec 29, 2007
    Posts:
    57
    Subtle poke for my earlier asked question. :) I'm thinking about purchasing Alloy, but this depends on whether or not I can use deferred rendering on OSX with Alloy. I know the official FAQ states not yet, but I don't know if this FAQ is updated for the latest 2.1 version.
     
  35. Desktopdaydreams

    Desktopdaydreams

    Joined:
    Nov 20, 2010
    Posts:
    154
    @xenius sorry, just had chance to get back to you.

    We're actually plugging specular maps into the alloy shaders but we don't seem to be getting great results.

    In terms of maps, we're on dual at the moment as directional gave us lots of odd results.

    Cheers ;)
     
    Last edited: Aug 14, 2014
  36. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @cubez: Honestly, I'm not sure if its working right now. Its been an on-again-off-again thing for the past year. One Unity version things will work, but not in the webplayer, then an update happens, webplayer, good, something else broken. The deferred renderer has been a S***-show on OSX throughout the 4.x release cycle. I don't have an up to date mac here to actually test it, so I can't give you a confirmed yes or no :-/

    @desktop Dreams: PM me your skype name! I want to see what you guys are doing in terms of feeding maps in. I can probably give you some direct advice over voice/screenshare in about 5 minutes that will vastly improve things for you.
     
  37. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @ARtfx: Thank so _so_ much for sharing your time and expertise with the alloy user community here. It's a tremendous value, and we all deeply appreciate it!
     
  38. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    No problem xenius. Still working through the Alloy specs, so will tackle the other shaders soon.
     
  39. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @artzfx: I just realized, while working with your node, that I think this workflow is missing one SUPER critical element, which is the packed map contents coming from SD4 aren't bypassing SRGB sampling. (I.E. when we make an alloy pm with the packer in unity, its then set to 'bypass srgb sampling'.

    So... if we want to use sbars, this needs to be fixed, and it doesn't look like right now, that can be set on the unity side.

    Artfx, do you know if in your packing node, the input can be modified like this: pow(color, 1/2.2) ?
     
    KRGraphics likes this.
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I took the liberty of fixing the node this morning, and everything is now working as expected, and the pack maps are similar to the ones Alloy generates. The initial sbs file was converting a linear image, and when in unity it converted it again, making everything dark
     
  41. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    @xenius: I just updated the Node with the findings Neptune advised to me this morning and have replaced in my post above with the newer version.
     
    KRGraphics likes this.
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    A word of warning about the changes, any existing texture work will have to be edited to compensate for the gamma correction. I used this as reference. The SBSAR file will be gamma corrected. I will post a comparison shot in a moment with the models, still trying to solve the pack map differences. When the Alloy Material Packer is used, it is already performing the gamma correction. With the SBS, we are doing it ourselves. Also, your node needs one more tweak. When exported as a substance, the normal map is inverted. You can fix it by using RGBA Split>Invert grayscale on y (plug the y from rgba split into this node)>Rgba Merge (don't forget to plug the invert node on y)>Normal map output
     
    Last edited: Aug 15, 2014
  43. Deleted User

    Deleted User

    Guest

    Quick note:
    The pow(color, 1 / 2.2) fix should only be applied to the RGB values, and not that A as that part is always linear regardless.
     
    KRGraphics likes this.
  44. AaronClark

    AaronClark

    Joined:
    Oct 14, 2013
    Posts:
    39
    Alloy mostly works in deferred on OSX on my Mac pro using a FirePro D500.
    For the most part everything renders the same as forward though a couple things I did notice can be seen in the attached image:


    The other materials look okay though.
     
  45. Deleted User

    Deleted User

    Guest

    @AaronClark
    One thing that might be screwing them up, and I apologize for not noticing this sooner, is that I forgot to include a "exclude_path: prepass" flag for the translucent shaders. We will work to remedy this problem.
     
  46. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @artzfx @Neptune_Imaging : Hey, I wanted to let you both know, I just had a wonderful talk with the folks at Allegorithmic. They're going to add in a proper 'bypass srgb sampling' option that can be checked on the procedural texture inside an sbar in Unity. I'll have more info on the time-table soon, but this is where this gamma correction should actually be happening (doing it in a substance node to compensate is actually resulting in data fidelity loss).

    So @artzfx, I would likely hold off a bit longer on releasing your more complex preset node until this fix is in, or the data in the packed map will be interpreted wrong/lossily.

    I'll keep you both posted, as I'll likely get a testing unity build with the fix to check out first.
     
    p87 and KRGraphics like this.
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    That is awesome to hear. In the mean time, I'll continue working as normal.
     
  48. cubez

    cubez

    Joined:
    Dec 29, 2007
    Posts:
    57
    @AaronClark Thank you for taking the time tell me (and show) what works and what doesn't. Much appreciated!

    @n00body @xenius Looking forward to working with Alloy. ;)
     
  49. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    @xenius, that's great news, thanks for the update :)
     
  50. AaronClark

    AaronClark

    Joined:
    Oct 14, 2013
    Posts:
    39
    Looks like the next Alloy update should correct the issues I pointed out with the translucent shaders in deferred on OSX, great support from Alloy.
     
Thread Status:
Not open for further replies.