Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I'm baking my thickness map with Substance Designer. There's a bit of noise with the map, but even if i blur it I still get the harsh transitions. thickness.jpg

    Where can I get the 5.4 beta?
     
  2. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    You need to up the ray samples for this... noise can be caused by values being too low... and the 5.4 beta is still available... I am not on it...
     
  3. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Even with it blurred I still get the harshness. blurred.jpg
     
  4. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    You should not blur the maps for any reason... you need to rebake your thickness map with a higher ray count... usually 1024-2048 is enough
     
  5. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I only blurred it to show an example of a smooth gradient and what happens to the transmission.
     
  6. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    That is strange... I have never had this issue... I will have to do some tests for this
     
  7. Deleted User

    Deleted User

    Guest

    @adamz
    In the future it would be helpful if your bug description included the following: Unity version, Alloy version, an image of the material shader+settings, and an image of the deferred renderer plus camera component settings. That would give us a more clear picture of your situation so that we can more quickly diagnose it.

    If you are still interested in the Alloy beta, you just need to install the Unity beta and then download Alloy from the asset store. Double-check if you got the correct version by seeing if the changelog says "Version 3.4.0 b5" for its latest entry.
     
  8. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I'm running 5.3.5f1. Alloy 3.4.0b4. Attached are the Material and Camera Settings settings. In these screenshots the one without translucency is a gray image at an RGB of 113. The one with is set to 114.

    Also, any idea on why I'm getting the banding problem? I posted my problem on another thread, so maybe you have a suggestion.

    Thanks!
     

    Attached Files:

  9. Deleted User

    Deleted User

    Guest

    @adamz
    Apparently the asset store gave you the Alloy 3.4 beta package, which isn't compatible with the current version of Unity 5.3. So you can either download and install the latest Unity 5.4 beta, or I can dig up a package of the latest non-beta Alloy 3.3 version.

    What say you?
     
  10. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I sent you a private message. I'd like to get the one that works with 5.3 please.
     
  11. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys, just wanted to give you a heads up for those who are using the latest HBAO asset by @jimmikaelkael (works flawlessly). There is an issues with the GBuffer in the forward version of the skin and transmission shaders where you will see right through the models and on the double sided transmission the other side will not do transmission properly.

    He has a fix for this and it may have to be applied to future versions of Alloy. Here are some screenshots. No-HBAO.png Depth-Problem.png

    The only way around this is if I use the Deferred version of these shaders and I don't have the current version of Alloy. Thank you.
     
    ksam2 likes this.
  12. Deleted User

    Deleted User

    Guest

    @KRGraphics
    This isn't an Alloy issue. This is an issue for all Unity post effects that read from the G-Buffer, but are applied after the forward materials.
     
  13. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I think I heard about that. I'm going to try that temporary fix I was told to try. That should fix my issue.
     
  14. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    389
    Does anyone know why Unity is treating deferred mode as second class citizen (Maybe VR focus? Performance vs. competitor UE4 which is more 'quality' focused)?
     
  15. Deleted User

    Deleted User

    Guest

    @Flurgle
    This thread is for Alloy questions, not general Unity questions.
     
  16. Killersan

    Killersan

    Joined:
    May 27, 2014
    Posts:
    76
    Can You point me a direction how could I implement it with UMA ?
     
  17. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    I try deleting the file as you mentioned and reimport it again, but whenever I open the Material Map window, it's empty and I get "ArgumentOutofRangeException: Argument is out of range" console errors, and I can't move or close the material map window. I have to restore default layout, and I have to create a packed map in a separate project and bring those assets over to my main project.

    With 5.4 beta 22, even installing Alloy in a different project and copying over the folder creates the same problem.

    Edit: I managed to get the window working without having to use another project. Once I delete the Alloy folder, I get a lot of console spam about "Invalid pass number (1) for Graphics.Blit (Material "Hidden/Alloy/Deferred Shading" with 1 passes)", then more spam of the NullReferenceException for the MaterialMapChannelPackerDefinition. But after importing the Alloy folder again and importing ShaderAndEditorCore, it seems to be ok and I can open the MaterialMapChannelPacker window again.
     
    Last edited: Jun 27, 2016
  18. Pyroman311

    Pyroman311

    Joined:
    Aug 14, 2010
    Posts:
    87
    What would be the correct output/workflow when exporting from Quixel into Alloy?
     
  19. Deleted User

    Deleted User

    Guest

    @Pyroman311
    I honestly can't say, since our team's artist doesn't use Quixel. My best recommendation would be to output maps in the same format as UE4 if that is an export option.

    Again, just an educated guess.

    @Korindian
    Glad you got it sorted out.
     
  20. Deleted User

    Deleted User

    Guest

    I forget who asked, but here's Alloy's keywords:

    ----25 total----
    _TRIPLANARMODE_WORLD
    _SECONDARY_TRIPLANAR_ON
    _TERTIARY_TRIPLANAR_ON
    _QUATERNARY_TRIPLANAR_ON
    _MAINROUGHNESSSOURCE_BASECOLORALPHA
    _TESSELLATIONMODE_DISPLACEMENT
    _TESSELLATIONMODE_PHONG
    _TESSELLATIONMODE_COMBINED
    _PARALLAX_ON
    _BUMPMODE_POM
    _AO2_ON
    _DETAIL_ON
    _DETAILMASKSOURCE_VERTEXCOLORALPHA
    _TEAMCOLOR_ON
    _DECAL_ON
    _RIM_ON
    _DISSOLVE_ON
    _DIRECTIONALBLENDMODE_WORLD
    _ORIENTEDROUGHNESSSOURCE_BASECOLORALPHA
    _SECONDARYROUGHNESSSOURCE_BASECOLORALPHA
    _EMISSION2_ON
    _RIM2_ON
    _PARTICLE_EFFECTS_ON
    _RIM_FADE_ON
    _DISTANCE_FADE_ON

    EDIT:
    _TRIPLANARMODE_OBJECT and _DIRECTIONALBLENDMODE_OBJECT are being eliminated in our next release.

    EDIT2:
    Just realized that _EMISSION is a Unity keyword, so it doesn't count.
     
    Last edited by a moderator: Jul 14, 2016
    ksam2 and punk like this.
  21. Deleted User

    Deleted User

    Guest

    Last edited by a moderator: Jul 14, 2016
    Tethys, ksam2 and Korindian like this.
  22. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Thanks for that, really useful I'd imagine when keywords are running dry, I'll bookmark
     
  23. Deleted User

    Deleted User

    Guest

    The next version of Alloy will ship with a variant of the keyword removal tool that is specifically configured for migrating materials with our shaders. It will obliterate dead Alloy keywords from as far back as version 2.1, and will move some of our newer features over to using Unity's reserved ones to reduce our max keyword count.
     
    Last edited by a moderator: Jul 15, 2016
    punk likes this.
  24. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    That's really cool.

    Can you expand a little on the projective decal shader you said is in the works on the previous page? How is it different than the decal shaders that are there now?

    I'm also interested in the Vapor product on the rustltd.com website. How is progress on that going?
     
  25. Deleted User

    Deleted User

    Guest

    @Korindian
    The projective decals would work by using deferred projection, rather than custom authored meshes. The big problem with them right now is that they require a system to manage them and draw them after the rest of the G-Buffer, which is a little complicated. The regular deferred decals are relatively simple, since they draw just like any other object.

    Vapor is on hold for now, as our lead coder is on vacation and is currently mostly unreachable.
     
    Korindian likes this.
  26. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    About the parallax or POM I'm not satisfied with the result yet! I need a little more bump. is that possible?
     
  27. Deleted User

    Deleted User

    Guest

    @ksam2
    You need to be more specific about what you mean by "more bump". Do you mean an unlocked height scale?
     
    ksam2 likes this.
  28. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,080
    Yes, for example it's locked on 0.08. I need more
     
  29. Deleted User

    Deleted User

    Guest

    @ksam2
    Okay, go to "Assets/Alloy/Shaders/SM3/". In the sub-folders, you will find the shader files. Open whichever one you're using.

    Do a search for:
    Code (CSharp):
    1. _Parallax ("'Height' {Min:0, Max:0.08}", Float) = 0.02
    Change it to:
    Code (CSharp):
    1. _Parallax ("'Height' {Min:0}", Float) = 0.02
    That will uncap it and allow you to try higher values.
     
    ksam2 likes this.
  30. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    I want to use tessellation for my clothing. I don't see anything available for two sided, other than Tessellation > Transmission > TwoSided. Is that the best to use?
     
  31. Deleted User

    Deleted User

    Guest

    @adamz
    Yes, our transmission shaders are how we support all two-sided lighting. Is that a problem?
     
  32. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Not a problem, thanks.
     
  33. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Good afternoon Alloy crew. Quick question, would you guys have any shaders for things like grass shading and vegetation? I was thinking about using a double sided transmission shaders since there are no double sided shaders other than hair and transmission. Don't want to use double sided polygons since I'm going to use mesh paint on my surfaces.

    Kinda tempted to turn off the culling on the core shader... thoughts?
     
  34. Deleted User

    Deleted User

    Guest

    @KRGraphics
    Currently we don't have any vegetation shaders. As for Two-sided lighting, please use the Transmission shaders.
     
  35. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Looks I'll have to. I'll just turn off any transmission, since that will be overkill for all of that grass and foliage. Actually, it's like a double sided core shader :)
     
  36. xenius

    xenius

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

    Alloy 3.4.1 is live for Unity 5.4RC2 and up

    We've got a bunch of changes in this release, a few of them 'breaking' changes, but we think these are important/worth it moving forward. To summarize the BIG ones:

    1. The Detail Packed Map has been removed. This has been for several reasons. First, the existence of this map was originally predicated on the idea of maximally supporting the specular AA feature of the packed map system. As this hasn't been the case (for a myriad of workflow reasons), it ends up being a full DXT5 texture, and a texture sampler, for very little benefit. NOTE: If you need another AO layer akin to it, just add the 'AO2' property group. It draws from the green channel as well, so things should work as expected.

    2. Deferred compatible Eye shader! yaaaaaaaaaay. Anything that we can get working in deferred is a plus in my book. Keeps things cleaner overall, and changes the perf window of characters positively.

    3. Detail Property group now has an option to use the vertex color alpha for its masking. I know a lot of folk have been telling me they're making more extensive use of vertex colors, but want to tint and mask with them simultaneously. You can now do so, as the RGB will go towards vcolor tinting (multiplying against the base color based on that slider), and the alpha can be used here. Thankfully there are now some really great vcolor editing tools for unity, this one: https://www.assetstore.unity3d.com/en/#!/content/55649 being my personal favorite.

    4. KEYWORDS: You know that irritating error where Unity says you've run out of keywords? Well we've done all that is possible on that front, by doing two things. 1. We've aggressively stripped unnecessary keywords out of Alloy. It is maximally efficient on this front now. 2. We've added a tool for blowing out leftover/detritus keywords, though it MUST be run with a given scene with given materials open. It can be found in the Alloy top-bar menu. In the process of cleaning up our sample packs (updates of which will be coming this weekend), we found a whole bunch laying around being jerks, so they've been purged with prejudice.

    So without further ado, here's the rest of the massive changelog. As always, remember that this is still running on a RC of Unity, there may still be glitches here and there. Let us know if anything is busted :) Cheers!!!

    Version 3.4.1
    =====================
    NOTE:
    - You must run the new Material Migrator tool in each of your scenes to clean up and replace old keywords.
    * Open Window->Alloy->Material Migrator.
    * After it finishes, hit Ctrl+S.

    Shaders:
    - Added "Eye" shader that is deferred-compatible and provides fine control of each eye component.
    - Added Dithered LOD Cross-fade support to the majority of the shaders.
    - Changed "Glass" shaders to support Roughness Source "Base Color Alpha" in their Main Textures.
    - Changed "SpeedTree" shaders to support Transmission for Fronds and Leaves.
    * Reads alpha transmission from SpeedTree specular maps.
    - Changed "SpeedTree" & "Terrain" shaders to disable UV-picking.
    - Changed "Weighted Blend" shaders to add "Decal" feature.
    - Changed "Decal/Ambient" to affect specular occlusion for more consistent visuals between forward/deferred reflections.
    - Changed "Skin" shaders to drop "Detail" Falloff parameter due to lack of use.
    - Fixed "TriPlanar" and "Vertex Blend" shaders to have properly implemented Rendering Modes and opacity.
    - Fixed "Transmission" shaders to no longer double-apply metallic inputs.
    - Moved "Alloy Mods/Decal Ambient" into this set.
    - Optimized lighting code to be much faster when the shader doesn't expose any AO or metallic inputs.
    - Updated "Alloy Deferred UBER" override shader to support UBER 1.1b (U5.4.0b10 release).
    - Updated "Skin" shader to use corrected LUTs with a slightly wider scattering area.

    Features:
    - Changed "Main Textures", "Secondary Textures", and "Oriented Textures" so that their tint alpha still affects opacity when their Roughness Source is set to "Base Color Alpha".
    - Changed "Detail" to add the option to use vertex color alpha as a mask.
    - Changed "Detail" to drop "AO(G) Variance(A)" & "Occlusion Strength" due to their high cost and lack of widespread use.
    - Changed "Directional Blend" to have a vertex color alpha tint property like "Weighted Blend".
    - Changed "Directional Blend" and "Weighted Blend" to use a MUCH cheaper blending equation.
    * Cutoff is the same, Blend will need to be re-tweaked.
    - Changed "TeamColor" Tint toggle into a dropdown.
    - Changed "Tessellation" to remove "Combined" mode option due to lack of use.
    * Planning equivalent functionality for fewer keywords in the next release. Stay tuned.
    - Fixed Parallax Mode dropdown where "POM" was displaying as "P O M".

    Override Headers:
    - Fixed issue with StandardSpecular where opacity was not being adjusted for metals.

    Scripts:
    - Added Window->Alloy->Samples menubar item.
    - Added Window->Alloy->Keyword Report menubar item.
    - Added Window->Alloy->Material Migrator menubar item.
    - Changed Window->Alloy->Light Migration Tool to Window->Alloy->Light Migrator menubar item.
    - Changed "Material Map Channel Packer" to drop "Detail" packed map since we are no longer supporting it.
    * We recommend deleting these maps from your project since they're now useless.

    Legacy:
    - Changed "Skin" shaders to drop "Detail" Falloff parameter due to lack of use.
    - Moved "Alloy/Eye/Eyeball" shaders into this set.
    - Moved "Alloy/Eye/Eyeball (Legacy)" shaders into this set.
    * Renamed to "Eye/Eyeball (Forward)".
    - Moved "Alloy/Eye/Eye Occlusion" shaders into this set.
    * Use the "Alloy/Decal/Ambient" shader instead to achieve the desired eye occlusion effect.

    Mods:
    - Added "Car Paint Fast ClearCoat" shader which uses an experimental new ClearCoat approximation.
    - Changed "SP Car Paint" to use an experimental new ClearCoat approximation.
    - Changed "Weathered Blend" to add "Occlusion Strength" and "Normal Strength" parameters.
    - Changed "Weathered Blend" to base its "Detail" feature UVs on the detail color map.
    - Fixed "Weathered Blend" base material map AO to be converted to linear-space before being applied.
     
  37. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    Just wanted to drop by and say thanks for the latest update, the new eye shader is totally rad! The set just keeps getting better and better, still my best purchase from the asset store, its been a while since I posted a pic - this is using the latest - looking forward to your projected decal shader, I'm sure it will be prettier than mine

    Taz

     
  38. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    I just updated to the newest version of Alloy (3.4.1) and Unity 5.4.0f3.

    When I try to open the Light and Material migrator tools nothing happens, but I can't see any error messages. Anyone else have the same problem? I also noticed that the metallic color changed to white on some of the packed maps.

    I deleted the alloy directories and reinstalled it before upgrading to ensure I didn't get any problems with the upgrade to Unity 5.4.
     
  39. Deleted User

    Deleted User

    Guest

    @Corvwyn
    Those two tools are no longer popup windows. You select the menu option, and they just run. The reason why you don't see anything if that you have so few lights and materials to migrate that the progress bar disappears so quickly that you don't see it.

    As for the metallic packed maps, that's really odd. Do the broken maps have anything in common, or does it appear to be random?
     
  40. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    Ah, that explains it. Thanks.

    The packed maps I noticed were all used with the skin shader, but then again those are the most noticable. I'll take a closer look today, and see if this happened to the other packed maps as well.
     
  41. Deleted User

    Deleted User

    Guest

    @Corvwyn
    What was the last version of Alloy that you used? 3.3? For Alloy 3.4, we restored the ability to have metal on our skin shader, so that's probably why it is suddenly looking weird for you.

    We've added a new slider called "Mask Cutoff" that says what value in the Skin translucency map is the cutoff for skin shading. Anything below that value is treated as a Core material.
     
  42. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    114
    I used 3.3.5, so that's it then. I must have had the wrong color for the metallic map all along. I'll have to check out the new features, and figure out why my scene is running slower both in the editor and play mode with Unity 5.4.
     
  43. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey you guys, just wanted to give you some kudos for the improvements on the character shaders, especially the eyes and skin which looks natural. Even though I have to edit my textures to accommodate the shader changes, these are welcome changes
     
  44. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This is interesting... I was looking at this earlier, and like an idiot, I set this slider to 1 and noticed that things like bump blur wasn't working... setting it to .05 does the trick...
     
  45. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Hey guys... been taking the new Alloy shaders for a spin and I love the new changes... though i have an issue with baking lightmaps using your transmission shader. I have been trying to figure out why some parts of my scenes are super bright in the reflection probe, despite shadows being enabled for the shoji screens in this level... if you look at the reflection probe, you can see this super bright spot on the ground plane and that doesn't make any sense unless I am missing something...

    here is a shot below...



    If you look at the light probe preview, there is a HUGE bright spot on the ground that doesn't belong there and it is causing some issues with lighting my model... I am using the Tranmissive Forward Double Sided. I was going to use the Deferred Renderer Plus, but it makes Unity crash without warning when I apply it. I am going to see if I could try a different setting
     
  46. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    523
    @KRGraphics: This occurs because the reflection probe capture in Unity isn't a full-featured camera. I believe it captures in forward mode, with no command buffers. There is no way around this to my knowledge.
     
  47. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    That is definitely not good... and upon further testing (with shadows disabled), it looks like the probe is ignoring the shoji screens shadow information... even with shadows enabled. And this is making the lighting in my scene look off.
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    What I could do is duplicate the shoji screens and turn off the rendering and just have it emit light into the scene.
     
  49. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Why POM or parallax isn't available for skin shader? I need to use height map for my skin shader.
     
  50. Deleted User

    Deleted User

    Guest

    @Crossway
    Okay. It's relatively simple to add it to those shaders, so I will put it in the next release. Though I'm curious, what are you planning to use it for?