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

    Deleted User

    Guest

    @Anglerteam Games
    Unfortunately no, there is nothing we can do on our end with Unity 4.x since this is a limitation of its Light PrePass deferred renderer. However, Unity 5.x will have the option for a more traditional deferred renderer, which will enable proper specular light color. Until then, your designers will have to compensate for it.
     
  2. BabyDinoHerd

    BabyDinoHerd

    Joined:
    Mar 27, 2014
    Posts:
    21
    Thanks for the info -- do you have any links for that? Or would you happen to know if that's a 5.0 feature, or just some time in the 5.x release cycle?
     
  3. Deleted User

    Deleted User

    Guest

  4. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Anglerteam Games : Hi Hi! There's no way around this right now sadly. Unity simply isn't using a fullcolor buffer. The data simply isn't there.

    HOWEVER Unity 5 will have a full multi-G-buffer deferred rendering mode, where this, and several other problems that exist with light pre-pass will be a non-issue.

    Wish I had better news for your current use in Unity4 :-/.

    EDIT: Whooops, simul-response from two of us :p
     
  5. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey Xen,

    I'm going to install the new version of the shaders and see how that works on Mac sometime on Sunday. Do I have to delete the entire Alloy folder and start from scratch, or can I overwrite it?

    If this solves the mac problems for transparent and skin shaders, I will be very happy, as I'm running a completely indoor project thats deferred. Outside of that, its looking great ... thanks so much for the great package!
     
  6. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @DGordon: You shouldn't need to delete anything if you're installing over a version of 2.x Hope it works well for you! Please let me know if it doesn't.
     
  7. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Thanks. I assume that I have to double click the new package that was imported? Sorry, I just want to be clear so I don't kill my project :) ... although I'll back it up before hand just to be safe.
     
  8. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey Xen, one last thing. I'm very unfamiliar with using IBL cubemaps (read: 0% experience). As I mentioned above, my project is complete indoors ... is there anything to gain by creating cubemaps for reflection, or is the default in the Alloy shader (rsm or something like that, at work, cant check) what I should be using? If there is something to gain, do you recommend any specific way for creating cubemaps (ie: is Marmoset what I would want to be using)?

    Sorry if this isn't directly related to Alloy, but it falls under how to maximize its potential, and this is the one area I still feel like I don't have a grasp on.

    Thanks,
    Dale
     
  9. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @DGordon: The question you're asking really doesn't have a simple answer, and is actually something I've fought with a lot. There are several issues at play:

    IBL really doesn't work terribly well in interior spaces (IMHO). There's simply too much un-occluded light energy that gets added to everything, which has a sort of flattening effect, and washes out some of the beautiful contrast one gets in one's lightmaps. In addition, one needs to use box-projected cube-maps from something like skyshop if one wants glossy reflections on environment objects, which necessitates building one's environment out of axis-aligned cuboids.

    Honestly, at this point I find myself using pre-filtered cubes less and less for such circumstances, and just using Candela SSR, just because it adds next to no production-time to its use, whereas setting up good looking IBL that plays well, doesn't have issues, etc. is a multi-day-swearing-fest from my experience.
     
    KRGraphics likes this.
  10. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey Xen,

    I did an update and then opened the Alloy2_ShadersAndEditor package, closed Unity, and reopened. My textures still tear on skin (and assuming the other problem as well).

    Is there anything specific I was supposed to do?
     

    Attached Files:

  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    @DGordon I can attest to this as I am currently setting up a demo for an interior scene and using cubemaps for a small interior is very swear inducing. I will be adding candela real soon to my pipeline as it has damn near raytraced quality. And plus, the workflow for having the correct cubemaps (for exteriors and interiors especially) include

    1). You have to bake out GI FIRST!! This is a painful wait where you have to let the scene bake lightmaps. And if you don't like the results of the bake, you have to do it AGAIN. In reality, light energy has already taken place. I used to capture cubemaps first and then bake GI, but it looked totally wrong to me. (I really like Enlighten and Spectra GI, and I hope @xenius and @n00body are watching that thread :). )


    2.) Then you have to capture multiple probes... in Skyshop, I would recommend capturing the cubemaps using zones or if you are like me who has a sadistic level of patience, I would capture cubemaps for each object (I just do it for effect). And if you don't like it, go back to step 1.

    Yeah, so just use Candela :)
     
  12. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hi, I'm hoping someone here can check through my Alloy pipeline for rendering an interior scene (single room) and give me the thumbs up? I'm DX11, Deferred, Linear, OculusRift.

    What I'm looking at is:

    1. Create Alloy materials for each of the objects in the scene - Digression: Using CrazyBump to create maps. Alloy suggest using plane white for Spec? Should I not use my CrazyBump spec map?
    2. Setup lights and create Directional Lightmaps (as suggested by Alloy)
    3. Create Skyshop box mapping for additional light interactions
    4. Set the Alloy reflection to SkyShop
    5. Set all Alloy materials to AmplifyTexture/Alloy materials and create virtual texture
    5. Enable Candela reflections for added effect, adjusting the Alpha of diffuse to handle reflection

    Does that sound about right? I'm finding it difficult to get all these different plugins to play well together.
     
  13. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @silentslack: Alright *cracks knuckles*

    1. The spec map crazy bump makes is.. old school-style. You need a real roughness map for the 4th input for the packed map. If you're super lazy, taking the crazy bump spec map, inverting it, and shifting it brighter into the .6-1.0 luminance range can get you by. The spec channel of the packed map can be left mid-grey if you're not feeling adventurous/don't know how the values map.

    2. check
    3. I've run into some weird issues with this step. I find sometimes doing the probe-at-position step with skyshop works best BEFORE you set the reflection mode of the shaders you're using to skyshop. Otherwise the light can end up summing up and up and up. So be careful :p
    4. yup
    5. There's no amp2 texture support yet for Alloy materials. We're working on it with Amplify though. It'll be an option in Alloy 3.0 (a whole set/option for that integration)
    6. yup

    best o luck!
     
  14. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    :D Awesome, thanks for the feedback. Cool, I will try your spec map invert method for the roughness map and see how I get on. So this will generally mean I will end up with solid colour maps for Metallic and Spec slots but an occlusion texture for the Occlusion slot, inverted spec texture for the Roughness slot and finally a normal texture for Normal slot. Cheers!
     
  15. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @silentslack: My pleasure! Do feel free to posts cool shots here when your scene is finished :)
     
  16. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455

    Hello, you still never explained to me how to prepare a substance file to except your packed map workflow, please respond.
     
  17. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @AlteredPlanet: There's some videos in the thread by artfx showing how he set things up. Regarding a more end-to-end usage of SD4, we don't currently have a tutorial explaining everything. The link/node by artfx packs the channels together, though I don't know if he updated internally to use the new usage.

    @ARtfx: do you have an updated version of that node?
     
  18. AlteredPlanets

    AlteredPlanets

    Joined:
    Aug 12, 2013
    Posts:
    455

    Thank you for responding, can you post a link to the video?
     
  19. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
  20. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    Instead of having to keep updating files, I have attached a image showing how to create the AlloyPM node and name it in the SD Attributes panel. The example happens to be the setup for copper. This image also shows how the AlloyPM looks in the SD viewport by using the Alloy provided shader for SD.

    It is much simpler now than when I first posted the video as no sRGB to Linear nodes are required, since Unity will do this for you by you changing your sbsar format to RAW in the Unity Inspector.

    The RGBA node in the attached image comes inbuilt with SD.

    EDIT: Due to the "packed" map not being part of Unity you will need to select "Generate all outputs" in the Unity Inspector to view the AlloyPM, then drag n drop it into the Alloy shaders slot.
     

    Attached Files:

    Last edited: Sep 10, 2014
  21. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Actually, speaking of candela, you mention about using the alpha channel in the diffuse channel... how would this work for things like the skin shader?
     
  22. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @Neptune: Honestly (and disclaimer, this is just my _opinion_ on this). I wouldn't worry overmuch about Candela and skin. Skin is _incredibly_ diffuse, and the roughness maps used tend to be super smooth, so actually using just a solid value for skin as far as Candela is seeing is most likely fine.
     
  23. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Good to know... I am definitely going to be adding this to my tool set, very useful for small levels and won't have to set up cubemaps.
     
  24. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Been getting these types of errors alot im using alloy 2.1 and skyshop 1.09.

    Maximum number (64) of shader keywords exceeded, keyword MARMO_LINEAR will be ignored
    Maximum number (64) of shader keywords exceeded, keyword MARMO_RGBM_INPUT_ON will be ignored
    Maximum number (64) of shader keywords exceeded, keyword MARMO_RGBM_OUTPUT_ON will be ignored

    Things like this theres a bunch of them but they always start out saying maximum number etc... any info would be great. Thanks.
     
  25. Deleted User

    Deleted User

    Guest

    @Migueljb
    It's saying you have too many shaders using multicompile keywords and exceeding the multicompile keyword limit for Unity. The only way to fix this is to delete shaders from sets you aren't using in order to reduce the count. This is a major problem that will be fixed in Unity 5, but we are stuck with it for earlier versions.
     
  26. AGeorgy

    AGeorgy

    Joined:
    Sep 16, 2013
    Posts:
    42
    Hi guys! Your Elemental Sword demo is great! Could you allow to download Elemental Sword demo project.Of course without shaders, TC Particles, Marmoset Skyshop, Amplify Color and other proprietary software.
    Just want to see and learn from.
     
  27. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @AGeorgy: Due to the way skyshop, etc. works, to pull everything out of the project for distribution would be to terminally break it. It would be a mostly-black scene. The best I could do was to include the sword itself, which is in the Alloy package.
     
  28. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hi, I've upgraded to 4.5.4 and it seems like I'm not getting my Alloy materials behaving correctly (they were fine on 4.5.3)? I'm running DX11, linear and deferred. I have restarted Unity multiple times as stated in the readme. I had to wipe my shader cache directory due to an unrelated bug but not sure if this would have an effect?

    Here is a pic of what I'm seeing:
     
  29. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @silentslack: In general, wiping the shader cache directory can have some.. weird behaviour. Though this might be a pain in the ass, have you tried right-clicking the alloy directory in your project view, and clicking reimport?
     
  30. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Thanks once again @xenius - fixed
     
  31. HemiMG

    HemiMG

    Joined:
    Jan 17, 2014
    Posts:
    911
    Is there something wrong with the OSX standalone demo? I downloaded it and tried to run it, but nothing happened. If I try to launch it manually from the terminal, I get "Operation Not Permitted." I've checked the permissions and everyone has read/write/execute permissions so it isn't a permissions issue.
     
  32. Deleted User

    Deleted User

    Guest

    @philwinkel
    Alloy 2.x uses Normalized Blinn Phong with an arbitrary roughness mapping similar to Black Ops 2. Unity 5's standard shader currently uses Normalized Blinn Phong with a smoothness parameter that is close to, but not quite the same as Disney's roughness mapping. SD4 uses GGX with Disney's roughness mapping, but their specular is too dark.

    For Alloy 3, we are currently moving all our shaders, including the SD4 preview shader, over to using GGX with Disney's roughness mapping. Like Unity 5's standard shader, we will also be using Disney's diffuse brdf that takes roughness into account. As for the things that will stay the same, our SD4 shader currently has an option to apply specular AA. Also, we use ambient occlusion to dynamically generate specular occlusion for Direct and Ambient lighting. Finally, we support specularity control, while SD4's physical shader locks it to a fixed value.

    Does that answer your question?
     
    Last edited by a moderator: Oct 2, 2014
    KRGraphics and p87 like this.
  33. Deleted User

    Deleted User

    Guest

    @DGordon
    Sorry about the long delay in my response. So quick question on your problems with the Skin shader on MacOSX. Do the black visual errors appear on every object you try, or just skinned meshes?
     
  34. Deleted User

    Deleted User

    Guest

    @HemiMG
    That demo is pretty old at this point, and probably no longer functioning properly. If you want something more up to date, check out the webplayer demo on our website:
    http://alloy.rustltd.com/

    PS.
    We're hoping to get some new demos put together for the release of Alloy 3.
     
  35. Wilbert-Blom

    Wilbert-Blom

    Joined:
    Aug 13, 2011
    Posts:
    109
    What would be better (performance-wise):
    - use only Alloy shaders (even if the object is just a solid color) or
    - use Alloy shaders for the objects that 'need to look really good' and standard Unity shaders for the rest ?
     
  36. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    kind of, haha.. thanks for all of the detail, thats good to know. I'm still kind of a derp when it comes to shaders though.

    I'm trying to find a workflow that I can use now and transition to the Unity PBR shader when it comes out. I tried out the unity 5 beta today and played around with the standard shader. It seems like the PBR shaders in substance designer are close enough to the standard shader.

    I have no idea what i was doing wrong with the alloy SD4 shader or why everything looked so shiny..
     
  37. fivepointsevenn

    fivepointsevenn

    Joined:
    Aug 20, 2014
    Posts:
    32
    Is it going to work on mobile?
    The beginning of the thread says "we're waiting for mobile hardware to catch up". Now with iPhone 6, Metal and stuff, can this be used on mobile?
     
  38. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    I'm not an expert on the issue, but from what I understand mobile needs to support linear color space before PBR is viable. Anton mentioned on twitter that mobile will supposedly get linear color space support at some point in Unity 5x.

    I think it is probably doable already, with hardware like NVIDIA SHIELD tablet out in the wild. It's just probably not going to look right without linear color space. I'm not sure if the "no linear color space" issue is a Unity limitation, or a limitation of mobile devices - I think it's a unity issue?
     
    Last edited: Oct 6, 2014
  39. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @philwinkel @5pointseven: My understanding is that part of the difficulty is a weird OpenGL ES limitation where one can't change linear/gamma mid-frame-draw, and that the legacy gui is drawn in gamma no matter what. Last time I spoke to someone they were still figuring out how to deal with it, to be able to support linear on mobile. My info might be out of date by now tho.
     
    p87 likes this.
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys... just having some fun rendering with IBL. I love how Alloy holds up extremely well with just HDR renders and no lights whatsoever. Screenshot-2014-10-12-22.31.jpg Screenshot-2014-10-12-22.19.jpg Screenshot-2014-10-12-22.41.jpg
     
  41. xenius

    xenius

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

    I just wanted to mention (as I got a PM regarding some issues), the current version of Alloy (2.1) will _not_ work in the Unity 5 beta. Don't even try importing it. Turbo-broken-pants.

    So none of you fear though, we already have a new version of Alloy kicking. It's in _early_ alpha stage now. If you're currently investigating your Unity 5 pipeline, have beta access, and would like to field test the Alloy3 alpha (and don't mind using unfinished software), feel free to PM me with your invoice # and email, and I can hook you up with it.
     
  42. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    649
    Hey, its not a problem. I believe I've only run into the error on my npcs + their equipment, as those are the only things I bothered trying it on. It happened when I used the skin shader or a transparent shader. If that isn't enough information, please let me know. I'll gladly do some tests if it helps you guys track it down at some point.
     
  43. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Hi I'm trying to nail down the Quixel NDO/DDO workflow for Alloy. Not sure if this is best directed to Quixel or you guys but I'm struggling to find which settings I should be using. I create my AO and Normal maps in NDO fine. But I'm slightly confused when using DDO to create the correct texture output for Alloy - I can't match the preview I see in 3DO with the final result in Unity.

    DDO comes with plenty of calibration profiles, with Unity being one but I don't think this is applicable to Alloy? Is there a calibration profile that aligns with Alloy or what changes must be made to the DDO output to correct work with Alloy?

    Thanks!
     
  44. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I would recommend not using dDo for use with Alloy. You need something with instant feedback such as Substance Designer or Painter. You will be spending a lot of time with endless tweaking and the results will not match.

    If you have a high res source, use xNormal for baking AO.
     
  45. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Yes I've been struggling all day! Ok, I think substance is the way to go. Thanks for the feedback.
     
    KRGraphics likes this.
  46. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    If you can afford it, pick up Substance Painter. It's like Photoshop so you'll feel right at home. There isn't an Alloy shader for it yet but for now, create your textures, export them to a folder. Then in Substance Designer, set up the file so that you can see the complete model with textures and make sure the material is set to Alloy (you will have to load this in). And each time you export your texture from Substance Painter, SD will automatically update. And the best part, no damn layers to worry about.

    Edit: Purchase the Substance Indie Pack
     
  47. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Amazing, thanks for the tips. Running on the trial of Designer at the moment, quite a bit to take in but think this + Alloy is a winner. Cheers!
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    And take a look at painter as well
     
  49. KarelA

    KarelA

    Joined:
    Dec 30, 2008
    Posts:
    422
    Hi Anton. Quick dummy question before buying Alloy. Will the update from 2.0 to 3.0 be free?
     
  50. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @KarelA: It is indeed! PM your skype info and I can give you setup instructions and an alpha package.
     
Thread Status:
Not open for further replies.