Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Advanced Surface Shaders - RELEASED

Discussion in 'Assets and Asset Store' started by MattCarr, Jul 23, 2011.

  1. anadin

    anadin

    Joined:
    Oct 28, 2005
    Posts:
    97
    Hi Matt, don't suppose you could add the ability to add a coloured mask to your shader creator?

    Ideally a _MaskColor and a _Mask Texture2D, use the masks alpha to to multiply the mask colour over the the diffuse
     
  2. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    Sure, that's something that could be added. I've been trying to get a new update ready for release for the last week or so with mainly mobile shader improvements. Once that's done I'll look at which effects can be included in the update after that.
     
  3. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Hey Matt,
    Are you going to include some volumetric shaders in this update or not?
     
  4. d2allgr

    d2allgr

    Joined:
    Jun 22, 2013
    Posts:
    1
    First of, wonderful tool.

    No my problem, I am kinda new to shaders and was wondering if someone would be able to help with something I am trying to do with this tool.
    I found these textures: https://www.assetstore.unity3d.com/#/content/3230 and have no idea how to setup pattern_23 using this wizard (I take it I have to use the parallax map?) because the tool wont allow the combinations that I try (ignoring the diffusion map and using the specular, bump and displacement map). Is there a way, using this tool, to use all four (diffusion, specular, bump, displacement) maps in a single material? An alternative texture set that has all four maps could be this http://nomeradona.blogspot.com/2011/05/generating-seamless-diffuse-normal-bump.html (incase you don't want to use the ones from the asset store)

    Any help appreciated.
     
  5. Amfu

    Amfu

    Joined:
    Apr 9, 2013
    Posts:
    180
    Hi,

    Is there a video showing the running water?
     
  6. ronan-thibaudau

    ronan-thibaudau

    Joined:
    Jun 29, 2012
    Posts:
    1,722
    Would it be possible to add self shadowing (just 1 directional light would be ok)? I feel it would be pretty nice with the heavy tesselation i'm using.
    Thanks!
     
  7. Mithrilshadow

    Mithrilshadow

    Joined:
    Nov 28, 2012
    Posts:
    7
    This is a great shader pack, worth the price. But I am having some problems with rim lighting. I would like to use rim lighting with a normal map (or parallax or RCS) and maybe with a spec map. When I use the shader editor to make these combinations the shader has errors and won't work. Is this just the nature of rim lighting?
     
  8. joel_b

    joel_b

    Joined:
    May 23, 2013
    Posts:
    4
    Is there any way to batch the volumetric cubes (reduce draw calls)? Rendering several hundred is fine, but what about rendering a few thousand cubes?
    Does anyone have any tips, advice, comments or experience with batching the volumetric objects (is it even possible)?
     
  9. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    I replied to your PM about this. The current volumetric objects cannot be batched because the actual mesh geometry is not used and instead ray marching with ray/shape intersection tests is done in the shader.
     
  10. Zeruel

    Zeruel

    Joined:
    Nov 26, 2010
    Posts:
    19
    Hi Matt,

    Any chance of adding color mask support to this package?

    Great set of shaders and great editor tool too!
     
  11. Curious

    Curious

    Joined:
    Nov 19, 2009
    Posts:
    334
    Matt,
    Any update on 3D Texture support?
     
  12. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    121
    Hi,
    I was using your tessellation shaders and suddenly I found that they aren't supporting lightmap.
    So I opened some of them and found "nolightmap" right before ENDCG,I tried some different things and even working on AdvancedSS.cginc to find something useful but nothing happened.
    Could you please help me add lightmap to them,I really can't wait for an update,just tell me exactly what to do and I will do it by myself ;-)
    Thanks in advance.
     
  13. akaChris

    akaChris

    Joined:
    Sep 4, 2013
    Posts:
    1
    Are these shaders currently not working with unity pro 4.2.x ? I`m having trouble getting anything to work. it reports an error in Advanced SSUtils.cs (201,18) error CS0117: System.IO.File does not contain a definition for 'WriteAllText'.
     
  14. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    This is an annoying little issue with having the platform set to something like Web Player which doesn't support IO code. That code is inside preprocessor defines that restrict it's compilation to the Editor, but Unity doesn't detect that and still displays the error. I logged a bug about it a while ago and their fix helped a little (it previously wouldn't let you build with an error like that existing even though it would not be included in the built application), but unfortunately the error is still displayed.

    It's easily fixed though by creating a folder called 'Editor' inside the AdvancedSurfaceShaders folder and moving the AdvancedSSUtils.cs file into there. I'll have that structure in future versions to avoid having that issue.
     
  15. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    121
    I am wondering why you didn't answer me about having lightmaps on Tessellation shaders!!!
     
  16. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    Sorry, I hadn't been been in a position to work on this for a few weeks so I hadn't replied to anything that required me to do some investigation. I haven't found a way yet to have tessellation shaders working with lightmapping enabled unfortunately. You'll find Unity's examples also disable lightmapping. I'll look into it further and see what can be done.
     
  17. Hotsun

    Hotsun

    Joined:
    Aug 11, 2010
    Posts:
    121
    Oh,Thanks for that.
    I am working on tessellation shaders right now,If I found something useful about lightmaps I'll send you.
     
  18. metaleap

    metaleap

    Joined:
    Oct 3, 2012
    Posts:
    589
    I see many recent posts here in this thread about plans for additions to future versions --- yet Asset Store's latest version of this asset shows it's 10 months old by now, and now it's on sale. So, is this abandonware or not? :D
     
  19. Setmaster

    Setmaster

    Joined:
    Sep 2, 2013
    Posts:
    194
    Was wondering the same, I hope not.
     
  20. mcconrad

    mcconrad

    Joined:
    Jul 16, 2013
    Posts:
    155
    moving the file there just creates a new error: Assets/AdvancedSurfaceShaders/ExampleData/Scripts/ShaderSelector.cs(16,13): error CS0246: The type or namespace name `AdvancedSS' could not be found. Are you missing a using directive or an assembly reference?
     
  21. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
    Just saw this on Asset Store daily deals - but I CAN'T BUY IT !!!
    "Requires Unity 4.x or better". Is there any way for you to make it 3.5.7 compatible at least?
     
  22. Toad

    Toad

    Joined:
    Aug 14, 2010
    Posts:
    296
    Just bought this, the shaders look great. Hope you're still going to support it! The mobile shader improvements would be much appreciated.
     
  23. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    Hi. That compatibility is just based on the version that was used to submit to the Asset Store I believe. The shaders will work in Unity 3.5.7.
     
  24. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    It's definitely not abandonware :). I've just been working on a variety of new effects and also planning on adding shaders to support standard physically based shading pipelines as well. I unfortunately wasn't made aware the package was going to be put on sale in advance otherwise I would've changed priorities and worked to get an update out for this for the sale. I'm working on one now with improvements for mobile shaders and some more advanced effects like depth/shadow occlusion for cone volumes. WIP shot of that:

    $coneocclusiontest.jpg
     
  25. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I'd like to get an effect like the raised shapes on the faces of the cube for my board game board and pieces?

    Is this possible? and on octagon-shaped objects?

    $Untitled.png
     
    Last edited: Sep 21, 2013
  26. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    Of course :). I don't remember which shader I was using when I took that shot for that logo, either relaxed cone stepped mapping or parallax occlusion mapping, both of which are in the package.
     
  27. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    Great! I just bought it. Do you know of any additional info or a tutorial on how I can go about getting that effect? Regards.

    Update: I found that cube in the scene so I guess I can figure it out. Thanks.
     
    Last edited: Sep 21, 2013
  28. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    692
    Purchased! Now Testing!
    my first impression is great but, after testing volume objects, cube and sphere work well ... cone not works. did I miss something?

    Max

    $Volume.jpg
     
    Last edited: Sep 21, 2013
  29. Adoh

    Adoh

    Joined:
    Jul 24, 2013
    Posts:
    1
    Hello,

    First of all I would like to thank you for the great work.

    Due to the new version various little console errors appeared.
    I decided to copy them, like that, you might find what is wrong.

    -Assets/AdvancedSurfaceShaders/ExampleData/Scripts/ShaderSelector.cs(16,13): error CS0246: The type or namespace name `AdvancedSS' could not be found. Are you missing a using directive or an assembly reference? (this one is red)

    -Assets/Standard Assets (Mobile)/Scripts/Joystick.js(90,20): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy. (this one is yellow)

    -Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs(53,58): warning CS0618: `UnityEngine.GameObject.active' is obsolete: `GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.' (this one is yellow too)

    -Assets/Standard Assets/Scripts/General Scripts/ActivateTrigger.cs(43,58): warning CS0618: `UnityEngine.GameObject.active' is obsolete: `GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.' (yellow warning again)


    Cheers,
    Guillaume
     
  30. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    I'm in the demo scene and the volumetric shaders arent working. Here's a screen shot.

    $Screenshot - 9_25_2013 , 12_00_39 AM.png


    $Screenshot - 9_25_2013 , 12_01_48 AM.png



    How come the fog doesn't appear?


    Also can you post more tutorial videos on youtube about your other shaders in this package? I really liked the example you have that covers volumetric shaders.



    *UPDATE*

    I started a new project and added the advanced surface shaders package. Same problem. Unity version 4.2.1f4

    Since I have the same problem in a fresh project I know my primary project is not conflicting with these shaders. Also the debugger is clean, no errors. This happens on two computers. Each with the same version of unity. Why would a fresh project have errors?
     
    Last edited: Sep 25, 2013
  31. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    692
    Seeing your screen shoot you are using Unity free ...seem that volumetric effects don't work on your version.
     
  32. Molt

    Molt

    Joined:
    Sep 6, 2011
    Posts:
    103
    By "Support standard physical based pipelines" do you mean support for things like Marmoset Skyshop? If so then yay! I'm actually using Skyshop for my current project and was considering seeing if I could hack it together with this. I did mainly buy this package for the volumetric effects which I could use alongside Skyshop but being able to use the advanced surface shaders too with no hackery on my part would be great.
     
  33. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    anyone wanna loan me 1800 bucks for pro?
     
  34. Reefer

    Reefer

    Joined:
    Jan 13, 2012
    Posts:
    32
    This looks pretty awesome, good work MattCarr! I think I have to buy this one too. :p
     
  35. TheMadHermit

    TheMadHermit

    Joined:
    Sep 26, 2013
    Posts:
    14
    I have the same issue. Is there a solution to this?
     
  36. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    Sorry about the delay in replies guys, I've been working on a few things. New version will be submitted tomorrow.

    Ok, sorry about that. A better solution until the next version will be to leave the file where it was (not in an 'Editor' folder) and replace

    Code (csharp):
    1. File.WriteAllText(filePath, GenerateShaderCode());
    with
    Code (csharp):
    1. #if !UNITY_WEBPLAYER
    2.             File.WriteAllText(filePath, GenerateShaderCode());
    3. #endif
    Switch to a non Web Player build type when generating shaders for the mean time until this is resolved in the next version.

    Hmm, not sure. In the next update I've changed how volumetric objects set themselves up to remove issues getting them working initially, but if you need help getting the cones working before that them PM me and we'll figure out what's wrong.

    The warnings are from some example scripts. I'm removing most of these examples in the next version. In the mean time you can delete any/all example data to remove those warnings.

    If you've moved the AdvancedSSUtils.cs file to an 'Editor' folder to get around the error in WebPlayer mode then the error will be appearing because of that. See my reply further up in this post for an alternative way to clear the error.

    As was mentioned above, unfortunately the volumetric effects only work in Unity Pro. I'll look into alternative methods for getting them working in the free version of Unity.

    Marmoset Skyshop is a great package and the cubemaps it can generate would definitely be supported. It is primarily an image based lighting solution which will form a key component of the typical physically based shading pipeline the upcoming shaders in this package will support.
     
  37. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,975
    I am glad you are planning support for Skyshop. I have been using it alot in my work lately and your skin shader will look pretty damn good with it. Will you be planning on adding depth map support for scattering from behind the ears?

    You may end up modifying the skin shader for it to match Skyshops parameters just for the sake of consistency...
     
    Last edited: Sep 26, 2013
  38. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    692
    Thanks, I Will Wait the new version first.
    Max
     
    Last edited: Sep 26, 2013
  39. Aldin-Dynamics

    Aldin-Dynamics

    Joined:
    Jul 29, 2013
    Posts:
    11
    Excellent work on this package. We're really exited about this new shadow effect! Any release date for the new update?:)
     
  40. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    I took a bit of extra time with it to try to include a few more things people had contacted me about. I'm just in the final stages of testing it now and it should be submitted by the end of the week and hopefully on the store early next week.
     
  41. sjm-tech

    sjm-tech

    Joined:
    Sep 23, 2010
    Posts:
    692
    Hi MattCarr,
    I'm testing the new 2.2 version...some notes:
    - same volumetric cone issue already reported (only in my home pc: WinXP GeForce 7900GS) Cube and sphere work.
    - i saw that you have removed the old scenes demo...but now there is no good demo scene that shows various included shaders. i think that the current demo scenes doesn't do justice at your shader pack.
    - the other shader work very well.
    Max
     
  42. beelzeboss

    beelzeboss

    Joined:
    Feb 28, 2013
    Posts:
    22
    I seem to be getting errors in the recent update for Box, Cone and Sphere volumes basically the same error for each

    Assets/AdvancedSurfaceShaders/VolumetricObjects/BoxVolume/BoxVolume.cs(4,14): error CS0101: The namespace `global::' already contains a definition for `BoxVolume'
     
  43. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,176
    hey matt,
    i have a question wether your package could suit me. i'm looking for non-uniform volumetric fog. in your blogpost you mention to ray march (cast) through a texture. is this a volume texture?
    basically i am looking for a possibility to sample pixel values from a texture along a line parallel to it (in the shader of course). can this be achieved?
    i want to achieve height dependant fog on a spherical planet. and the density must be controllable by a texture.
    i would apreciate if you could elaborate a bit on this topic and how it is possible (if at all).
     
  44. Braddas

    Braddas

    Joined:
    Jun 9, 2013
    Posts:
    25
    Hi Matt, I was wondering if there are still plans to make this compatible with the Oculus Rift? At the moment it only seems to draw correctly in one eye, unless I've done something wrong? Love the package by the way, very easy to use.
     
  45. barker_s

    barker_s

    Joined:
    Jul 17, 2012
    Posts:
    27
    Hey Matt.

    I've downloaded the latest version and volumetric objects still crash my game. I've sent you an email a few days ago and still got no answer. Got any new info on what's the cause of the problem, or if there's any way to fix it?
     
  46. acriticalstrike

    acriticalstrike

    Joined:
    May 25, 2013
    Posts:
    75
    which shader is the fastest? I want to use it on projectiles flying in large numbers and very fast.
     
  47. MattCarr

    MattCarr

    Joined:
    Jul 5, 2009
    Posts:
    224
    The next update will contain options for changing the number of samples in the shader which might fix the cone issue.
    I removed the old example scenes for the moment because they were blowing the size of the package out, but there will be some new example scenes soon.

    Sounds like you've got some file double-ups. The volumetric objects have moved to a new folder (Assets\AdvancedSurfaceShaders\VolumetricObjects) so you'll need to delete them from the old location.

    The texture sampling in the current effects are using 2D textures sampled in 2 planes. It's possible this would already achieve the effect you're after. 3D texture sampling versions are being added to an upcoming version.

    I'll look into this for the next version. I have a Rift so it's definitely something I'll want sorted asap :).

    Thanks for sending through the editor logs the email. I'll have some things for you to try soon.

    Generally the fewer effects the shader has the faster it will be. It may not be something you need to worry too much about though. If the projectiles are fairly small and don't take up many pixels of the screen then the shader used won't has as much of an impact.
     
  48. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    934
    @MattCarr,

    Do these work with Substances?

    Thanks.
     
  49. superme2012

    superme2012

    Joined:
    Nov 5, 2012
    Posts:
    207
    Been working with the "Volumetric Zones" for some time now, and its a very effective shader to work with.. But I have hit a problem.

    I need to use the "Volumetric Zone" in a open scene, and its always displays a hard edge. Is there a way to control the falloff of the edge?

    I really do want to be strong but without the hard edge.
     
  50. bigzer

    bigzer

    Joined:
    May 31, 2011
    Posts:
    159
    That would be nice indeed, it buggs me as well