Search Unity

Alloy Physical Shader Framework Version 3 For Unity 5

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

  1. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    292
    Hello,

    According to the asset store page, it has a support for unity 2017.1.3, but I just upgraded from 5.6.3 and Im getting this error when trying to build. Also I am not getting this error in unity 2017.3, but I want to use 2017.1 instead.

    Code (CSharp):
    1. Shader error in 'Alloy/Human/Hair/HighQuality TwoSided': invalid subscript 'pos' at Assets/Alloy/Shaders/Framework/Forward.cginc(574) (on d3d11)
    2.  
    3. Compiling Vertex program with DIRECTIONAL SHADOWS_SCREEN LIGHTMAP_SHADOW_MIXING SHADOWS_SHADOWMASK FOG_EXP2
    4. Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME
    5.  
    The build is automatically stopped after getting this error.

    EDIT : I updated the package from the asset store and Im no longer getting the error!
     
    Last edited: Mar 19, 2018
  2. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Please stop selling a package with a high price of 125$ and saying sorry life's been super busy!
    If I was going to sell something 125$ I would establish a support team first.

    It's been more than 6-7 months I'm asking for unity wrinkle map support on skin shader but no on care.
     
  3. MarkusGod

    MarkusGod

    Joined:
    Jan 10, 2017
    Posts:
    164
    But alloy already free. :eek:
     
    ceebeee likes this.
  4. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    I guess he bought it before it went free.
     
  5. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    can you tell me what to be added or modify?


    EDIT:
    is there anyway when exporting my scene to a package (i selected dependencies) that will unity search the packed maps as well as the alloypm settings out? cuz i need to remove unused assets to make the project folder smaller for git
     
    Last edited: Mar 22, 2018
  6. Teosis

    Teosis

    Joined:
    Jan 24, 2018
    Posts:
    20
    Thanks for the reply. Got the problem resolved by re-importing Alloy. I suspect I've moved the Alloy folder from the root and although moved back shortly after the errors might've persisted, I think.
    _
    and

    I believe there were plenty of additional maps and textures in the package, some caustics for example and some other goodies which could be seen in the Alloy crash-course video, any chance to see those uploaded somewhere, or included in the Alloy package itself? I gather there were a lot of stuff apart from a possibly out-dated example scenes and what not, would be a pity to loose it all.
    _
    P.s.
    I know your time is very limited, but is there any chance to see Alloy integration with this beast one day?
    https://assetstore.unity.com/packages/3d/characters/granite-for-unity-indie-51026
    http://graphinesoftware.com/products/granite-for-unity
     
    Last edited: Apr 8, 2018
  7. ore0

    ore0

    Joined:
    Feb 12, 2017
    Posts:
    3
    Hi,

    I'm getting errors that @n00body seems to have fixed in 3.6.1 for Unity 5.6 but I'm still on Unity 5.5.5f1 and the asset store is pulling in Alloy 3.5.2 for me.

    Any chance Alloy could be updated for 5.5.5f1 or tell me how I may fix these two problems myself please?

    Thanks

    Immediately after import:


    NullReferenceException: Object reference not set to an instance of an object
    Alloy.MaterialMapChannelPackerDefinition.IsPackedMap (System.String path) (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/MaterialMapChannelPackerDefinition.cs:232)
    Alloy.AlloyCustomImportAction.IsAlloyPackedMapPath (System.String path) (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:19)
    Alloy.AlloyCustomImportAction.OnAlloyImport (UnityEngine.Texture2D texture, Alloy.OnAlloyImportFunc onImport) (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:44)
    Alloy.AlloyCustomImportAction.OnPreprocessTexture () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportAction.cs:144)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.AttributeHelper.InvokeMemberIfAvailable (System.Object target, System.String methodName, System.Object[] args) (at C:/buildslave/unity/build/Editor/Mono/AttributeHelper.cs:342)
    UnityEditor.AssetPostprocessingInternal.PreprocessTexture (System.String pathName) (at C:/buildslave/unity/build/Editor/Mono/AssetPostprocessor.cs:293)


    When starting Material Packer:


    ArgumentOutOfRangeException: Argument is out of range.
    Parameter name: index
    System.Collections.Generic.List`1[Alloy.PackedMapDefinition].get_Item (Int32 index) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:633)
    Alloy.MaterialMapChannelPackerDefinition.get_PackedPack () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/MaterialMapChannelPackerDefinition.cs:219)
    Alloy.AlloyCustomImportObject.get_PackMode () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyCustomImportObject.cs:59)
    AlloyMaterialMapChannelPacker.OnGUI () (at Assets/Alloy/Scripts/MaterialMapChannelPacker/Editor/AlloyMaterialMapChannelPacker.cs:221)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
     
  8. ore0

    ore0

    Joined:
    Feb 12, 2017
    Posts:
    3
    Update: I managed to fix the above by replacing the content under Assets\Alloy\Scripts\MaterialMapChannelPacker with the update from the github repo.
     
  9. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @OP3NGL
    Unfortunately, that's just a symptom of how we had to have asset files paired to textures that aren't referenced by them. You have to manually add those to packages.

    @Teosis
    Probably not at this point on both counts.

    @ore0
    Yeah, 5.5 was before we started keeping versions of Alloy that mapped to specific Unity releases. The best I can offer you is a link to the "unity-5-6" branch in the Alloy GitHub repo:
    https://github.com/Josh015/Alloy/tree/unity-5-6
     
  10. ore0

    ore0

    Joined:
    Feb 12, 2017
    Posts:
    3
    no worries, I actually used the master (Alloy 4.2.0 instead of 3.6.4), seems to work fine so far (by just replacing Assets\Alloy\Scripts\MaterialMapChannelPacker, lot of breaks if I used the whole repository as a lot of API changes in Unity), thanks a lot for your response.
     
    Last edited: May 6, 2018
  11. EricWilliams

    EricWilliams

    Joined:
    Jun 23, 2017
    Posts:
    12
    So I edited my first shader and I'm surpised it came out as well as it did, I really have no idea what I'm doing.

    I combine Anamaria Todor's blur shader with Alloy's glass shader to have a refraction blur option and the result isn't too bad. The blur does fall apart when it's maxed and there's small, high contrast areas like lights (the light box I have setup) but otherwise it does pretty well. I don't know if anyone would be interested but I could share the modified code?

    Here's a youtube clip of me fiddling around, I tried to speed it up and cut it so it didn't drag on too long.
     
    Last edited: May 9, 2018
    ceebeee and chelnok like this.
  12. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    I wouldn't mind seeing how you did this. Please share :)
     
  13. EricWilliams

    EricWilliams

    Joined:
    Jun 23, 2017
    Posts:
    12
    Here's a package, contains a modified distort and a modified high quality glass. To try it out it's listed in the Alloy shader menu under glass as "HighQaulity Modified"

    It requires Alloy, the includes in the modified shaders point to Alloy shaders. I added a refraction brightness slider, this will allow you to go above default brightest color value in the color picker. Although, it's almost certainly not the way to try for a frosted glass look as more light out than in doesn't make sense.

    Only thing new to the glass hq modified.shader are the sliders to adjust the values, and the include to point to the new distort. Most of the new code is in the distort modified.cginc, everything below the first "//return aForwardColor(s, s.baseColor * refr);" is slightly modified code from Ana's blur shader.

    edit - just a reminder, I'm new to editing shaders and I wouldn't even attempt to write one yet, so go easy on me :p I may come back to this and try a different blur algorithm at some point to see if I can get it to blur a lot more without artifacting.
     

    Attached Files:

    Last edited: May 9, 2018
    ksam2 and chelnok like this.
  14. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Hello guys, Will be there version of alloy for unity 2018.1 I have problem with substance (exceptions about that)
     
  15. neoshaman

    neoshaman

    Joined:
    Feb 11, 2011
    Posts:
    4,190
    Substance has been deprecated by unity, it's not alloy's problem
     
  16. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    Yes and no. It's not built in anymore, but it's still supported through Allegorithmic's Substance in Unity plugin which is free. https://www.assetstore.unity3d.com/en/#!/content/110555

    Just install that into 2018, and then everything works again.
     
  17. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    246
    is there any wayss to convert the alloy packed into a usable packed map ?
     
  18. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Did anybody ever mentioned alloy changes the way point lights looks like? It reduce intensity and range of a point light, I can't get similar result as standard defered shading.
     
  19. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,001
    Thanks you for this. It looks better now.
     
    EricWilliams likes this.
  20. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Yes but actual version of alloy shows exception about substance, so it is n way to use it in 2018.1
     
  21. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    Like I said, use the Substance feature off the asset store.
     
  22. EricWilliams

    EricWilliams

    Joined:
    Jun 23, 2017
    Posts:
    12
    Ceebeee, that doesn't fix the error. As far as I can tell the only way to fix it is to modify the code yourself.

    In AlloyCustomImportAction.cs
    Comment out line 310:
    var proceduralTexture = tex as ProceduralTexture;

    Right below that comment out the entire 3rd else if statement, so the condition:
    "else if (proceduralTexture != null)" Make sure to not accidentally comment out the curly braces for the previous if else statement. All the way to right before but not including "return count;"
     
  23. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    397
    Hey,

    I know you guys aren't doing any more work on this besides maintainence (thanks, btw, I picked this up pretty early on), but maybe you can tell me if there's a way to accomplish something or not. Note that I'm working in Unity 2017.

    Is there any way to use an oriented blend shader to achieve cohesion between my moss on the Y axis as well as the x/z? It works well on the x/z axis, but when it runs up and down the y axis, it just stretches the same texture. It obviously is ignoring the y for the orientation, which is why its stretching. What I would ideally like is to have the y taken into account as well, so the moss creeps up along the walls and up the walls in a way which keeps it all connected. If not, I'll just use the weighted blend shader which is good enough for my purposes, even though this would be nicer ... or see if I can figure it out using ASE with Alloy.

    Notice the stretched moss on the vertical walls.

    delete my account page
     
    Last edited: Jul 12, 2018
  24. twobob

    twobob

    Joined:
    Jun 28, 2014
    Posts:
    1,763
    I have no idea if it matters whatsoever but I believe they flipped the Y in '17 - it is likely a clamp messing up being given inverted data?

    Total guess
     
  25. xenius

    xenius

    Joined:
    Sep 30, 2010
    Posts:
    522
    @DGordon: The entire point of the oriented shaders is that they're projective on a single plane. If you want to project on all 3 axes, the Triplanar shaders are the type you want.
     
  26. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    36
    Any chance we can get this working in 2018? Just made the jump and alloy is broken. Our entire game uses Alloy... Sad moment. Any advice to fix quick? Obviously substance is no longer supported hence one of the issues.
     
  27. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    97
    Might I recommend just looking a couple of posts up? ;) Alloy works with Unity 2018.X and substance if you install the official plugin from Allegorithmic.
     
  28. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    36
    Corvwyn, it is not working at all. So not sure. I will dig through.
     
  29. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    97
  30. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    36
    Ok, substance is finally fixed, but now the following error.

    upload_2018-7-14_12-43-35.png
     
    Crossway likes this.
  31. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    36
    Can you share your scripts that got it to work?
     
  32. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    I confirm It doesn't work with Unity 2018.2.1f1.

    I don't use Alloy anymore but I use its channel packer tool that is really useful!
    Please fix it for Unity 2018.2.1f1. I've spend 125$ to buy this that was a lot of money for me! so let me have channel packer at least.
     
    Last edited: Aug 2, 2018
  33. BroVodo

    BroVodo

    Joined:
    Oct 2, 2012
    Posts:
    6
    So did we ever get those extra tutorials about character shading mentioned in the crash course? It would be really cool if there was just a little info on the eye shader and how to go about making texture maps for it.
     
  34. skinwalker

    skinwalker

    Joined:
    Apr 10, 2015
    Posts:
    292
    Hi,

    I am using the high quality hair shader and there is a problem when the character is facing the sun, basically if the hair is blonde I will see another layer of brown hair depending on the angle Im looking at, do you know how to fix this?

    I think what Im seeing is the bottom of the hair where the sun couldnt light it up but it looks weird.
     
  35. Flurgle

    Flurgle

    Joined:
    May 16, 2016
    Posts:
    368
    @Crossway maybe they could open source the channel packer tools on github?
     
    Crossway likes this.
  36. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    I paid 125$ but they not even going to do this!!!!
     
  37. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    397
    If you have access to substance designer, just create a simple substance that combines 4 textures into rgba channels on a single texture, or whatever other channel packers you need. I also was using the Alloy channel packer, but I decided to remove the dependence on their code and just use that.
     
    Crossway likes this.
  38. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    397
    Just going to note I got that working in 2018 as well. Even if you don't own SD, I believe there is a free trial.
     
    twobob likes this.
  39. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    You mean Alloy channel packer works for you in 2018 too? Can you please share with us too?
    Thanks a lot.
     
  40. DGordon

    DGordon

    Joined:
    Dec 8, 2013
    Posts:
    397
    No, I'm sorry for the confusion. I meant creating a substance with SD for this works in 2018 with the assetstore download.
     
    Crossway likes this.
  41. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    I see so much about this channel importer being broken in 2018 I decided to look. it's just a C# script, easy to modify. It's only broken because they removed substance support from 2018:


    Comment out those two sections as marked, and it works again. (of course without substance support)
     
    Teosis, KarelA, Crossway and 2 others like this.
  42. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    364
    Thannnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnk you. :)
     
    twobob likes this.
  43. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @skinwalker
    Unfortunately that shader has always had problems due to the layering trick it uses. Sadly, you just have to tweak the settings until it looks good enough.

    Sorry for the late reply. My day job is sucking up all my time and energy lately.
     
  44. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    Is there chance to get Alloy shader be updated to 2018 version of unity?
     
  45. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Jakub_Machowski
    Short answer: Nope. We're in maintenance mode for the Unity versions we currently support. I just don't have the time or the energy for this project like I used to, and it seems like Unity is starting to have comparable offerings by default.
     
  46. ceebeee

    ceebeee

    Joined:
    Mar 7, 2017
    Posts:
    378
    if you read through the recent thread you can see it can be made to work on 2018, for the most part, you just need to do the edits yourself. (assuming you mean legacy pipeline of course, if you're asking for LWRP or HDRP support, that's a whole other thing and probably not happening)
     
  47. Corvwyn

    Corvwyn

    Joined:
    Nov 15, 2013
    Posts:
    97
    @Jakub_Machowski I'm using Alloy with 2018.2, and there are no problems if you install the new Substance plugin, or comment out that part. See previous comments.

    If you're starting a new Unity project, and you want to use the High Definition Render Pipe (HDRP), then you've got something similar to Alloy. It's not really finished yet, but if your project isn't going to be released in a while, then you should be good to go. Seems like it won't be finished with decent documentation before 2019, but it should be quite usable in 2018.3.
     
  48. Jakub_Machowski

    Jakub_Machowski

    Joined:
    Mar 19, 2013
    Posts:
    307
    WE dont use HDPR for now we use defeault render pipeline, HDPR is too young, not to well optimized. We are going to buy amplify shader :) And do thing with that :) Thanks for info
     
  49. pigglet

    pigglet

    Joined:
    Aug 13, 2014
    Posts:
    52
    Hey, fellow alloyers! As I understand there is no regular way to add fade transparency to a skin shader, but I wonder is it technically possible at all? And how hard this task could be? Should I try to find a freelancer who can code shaders to add this for me or it's a dead end?

    upd. I found the guy and he modify the shader pretty well, if someone need it.
     
    Last edited: Nov 17, 2018
  50. fildax

    fildax

    Joined:
    Apr 7, 2017
    Posts:
    19
    Anyone got displacement to work? Looking for tips how to bake displacement map to be used in alloy. As there is no "bias" option I understand it uses .5 value? Any tips appreciated.