Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
Dismiss Notice
Join us on Dec 8, 2022, between 7 am & 7 pm EST, in the DOTS Dev Blitz Day 2022 - Q&A forum, Discord, and Unity3D Subreddit to learn more about DOTS directly from the Unity Developers.

► Subsurface Scattering Shader ◄

Discussion in 'Assets and Asset Store' started by Arkhivrag, Sep 20, 2014.

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836



    Package contains high quality shaders with SM2 and SM3 support.
    Includes Mobile vertex lit shaders (all light and SSS calculations are done per-vertex in a single pass).
    Includes Curved World compatible shaders.

    Try web player


    Promo video for version 1.0



    SSS_Dragon.png
    SSS_Candle.png
    Subsurface-scattering-shader-3.png
    Subsurface-scattering-shader-DX11-tessellation_(7)_1920.png




    v2018.1
    • Added fog support for mobile VertexLit shaders.

    v2017.1
    • Compatible with Unity 2017.x

    v3.2
    • Unity 5.5 compatible
    • Added Transparent shaders

    v3.11
    • VacuumShaders assets synchronization. Required update for all VacuumShaders assets.

    v3.1
    • Added DX11 tessellation shaders.
    • Added Curved World shaders. (Only for Unity 5. Requires Curved World asset).
    • New improved shader fallbacks.

    v3.0
    • Unity 5 ready.
    • New improved SSS algorithm with Advanced Translucency option.
    • Material editor provides Advanced Lighting controls.
    • Ambient lighting and dynamic global illumination are optional.
    • New improved GUI

    v2.1
    Added Rim effect. Effect is optional and can be turned On/Off inside material editor. Mobile vertex light shader calculates rim effect per vertex.

    v2.0
    Added Mobile VertexLit shader.

    v1.1
    Added new shaders with separate control of specular, bump, reflection and cutout


    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Mar 9, 2018
    TheDudeFromCI, Taishou and Lex4art like this.
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Subsurface scattering shader 2.0 has been released.

    https://www.assetstore.unity3d.com/en/#!/content/3254

    Added mobile version VertexLit shader. All effects and lighting is calculated per vertex in single pass.
    Light count that effects shader is optional through material editor.
    As on mobiles using Power function is not quit good, Translucency Power function is replaced with pre-calculated option with 1, 2, 4, 8 and 16 values.


    VacuumShaders
     
    Last edited: Sep 20, 2014
  3. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hello Davit,
    I bought this package. Great shaders.
    however i've 2 questions;

    - Is it possible to include rim lightning to the shaders?
    - Could you add some documentation, especially how to set up the translucency map; Maybe add some demo ?

    Tnx in advance.

    Greetz,

    G
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    @gpvd
    1. I'll try to add rim effect. It will be optional parameter inside material editor
    2. Translucency map controls color and "density" of the SSS effect.
     
  5. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hi,

    Tnx for looking into it.

    About translucency; When i create a map for it, is it enough to only higlight the parts that most have some translucency (similar to AO) or must it also include a normal map? Or are the normals for translucency read from the bumpmap?
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    @gpvd
    In translucency map you higlight parts that have most translucency (similar to AO), including color, not normal map.
     
  7. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Update 2.1 has been released.

    Added Rim effect.
    Effect is optional and can be turned On/Off inside material editor.
    Mobile vertex light shader calculates rim effect per vertex.
     
  8. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Wow,

    Many thanks for the quick implementation.

    Keep up the good work!

    Greetz,

    G
     
    Rajmahal likes this.
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Merry Christmas for everyone!

    Free voucher code: Redeemed
    To redeem this code go to Asset Store - User Account page - Redeem Voucher.

    Be the first one to grab your free copy!



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 23, 2014
  10. looki666

    looki666

    Joined:
    Sep 5, 2013
    Posts:
    79
    Hi .

    Thanks , very cool shaders .Redeemed :)
     
  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Congratulations! Hope you enjoy using it. Please take your time to rate the asset using the asset store page and feel free to leave any feedback in this thread.




    VacuumShaders - Facebook Twitter YouTube
     
  12. kurylo3d

    kurylo3d

    Joined:
    Nov 7, 2009
    Posts:
    1,123
    i already bought.. will say its a must have. Works in unity 5 fine.
     
  13. mysteryDate

    mysteryDate

    Joined:
    Feb 2, 2015
    Posts:
    11
    Does the asset include source code, or just compiled shaders? I'm a shader maker myself, and would love to see the techniques you are using.
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Shaders inside my packages are not compiled.
    All scripts and editor files packed in .dll



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Feb 3, 2015
  15. BDykes

    BDykes

    Joined:
    Nov 17, 2014
    Posts:
    1
    I just wanted to say great shader! I had an idea about an environment today and with a little bit of search I found this. It works really well. Currently I am doing some R&D for our game (Radial-G) and i can really see this working well. I am a little bit confused about the difference of the diffuse vs the translucency texture - in theory everything is good but it seems that the diffuse has a bit too much effect on the overall brightness - at the moment I am simply trying to include an AO layer in my texture to get some more shading definition and I ve found it a bit difficult to balance the effect. (well maybe I just need to spend a bit more time on it). Anyway great work thank you for making this available, I just wanted to share my results today: 1st image is with just the SSS shader and 1 directional light, the 2nd image uses 5 point lights, 1 directional and colour LUT for the purplish tint (expensive but pretty).
     

    Attached Files:

    Arkhivrag likes this.
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
  17. mysteryDate

    mysteryDate

    Joined:
    Feb 2, 2015
    Posts:
    11
    On the youtube video Daniel Pendergast asks:
    "Wow! How does it not require Unity Pro? And how did you get around not using 'GrabPass?'"

    And you respond:
    "Shader is opaque, it does not require GrabPass. Magic is in math :)"

    Is this magic math accessible in the package (i.e. isn't in the .dll)? What do you mean by "scripts and editor files" in this instance? Thanks for your help. These shaders look amazing.
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    @mysteryDate
    "Magic is in math" - I mean shader itself, its algorithm.
    Script and editor files - files that I use in my packages to make shader usage more easy. They contain for example: guiskins, images, some custom editors scripts and so on. Distributing such files is easier within one dll, then have dozen of unnecessary files in project.



    VacuumShaders - Facebook Twitter YouTube
     
  19. mysteryDate

    mysteryDate

    Joined:
    Feb 2, 2015
    Posts:
    11
    Cool! Thanks so much for your help. This package is amazing (playing with it now). I like what you did with the code, having all the shaders reference a few files, keeps things cleaner.
     
  20. baram10000

    baram10000

    Joined:
    May 24, 2013
    Posts:
    11
    Could you give me information how to make morning grape?
    I hope to know how to twinkle light in background and how to adjust camera for distance of light.
    Thank you in advance.
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    If you are talking about promo video effect, there is no secret, I used translucent texture for grape and point light behind it, to make beautiful light scattering effect. Nothing more.



    VacuumShaders - Facebook Twitter YouTube
     
  22. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hey Arkhivrag,

    I just bought this shader pack but I'm getting errors and it doesn't appear to be working. I'm on Unity 4.6 and get this error after loading the untiypackage:

    UriFormatException: Absolute URI is too short

    Full error dump:

    UriFormatException: Absolute URI is too short
    MonoForks.System.Uri.Parse (UriKind kind, System.String uriString)
    MonoForks.System.Uri.ParseUri (UriKind kind)
    MonoForks.System.Uri.Parse ()
    MonoForks.System.Uri..ctor (System.String uriString, Boolean dontEscape)
    MonoForks.System.Uri..ctor (System.String uriString)
    (wrapper remoting-invoke-with-check) MonoForks.System.Uri:.ctor (string)
    MonoForks.System.Windows.Interop.PluginHost.get_SourceUri ()
    MonoForks.System.Windows.Browser.Net.CrossDomainPolicyManager.GetCachedWebPolicy (MonoForks.System.Uri uri)
    UnityEngine.UnityCrossDomainHelper.GetSecurityPolicy (System.String requesturi_string, IPolicyProvider policyProvider)
    UnityEngine.UnityCrossDomainHelper.GetSecurityPolicy (System.String requesturi_string)
    UnityEngine.WWW:get_isDone()
    VacuumShaders.PluginUpdateCheck:Update()
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    Any idea whats causing this?
     
  23. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
  24. Fishypants

    Fishypants

    Joined:
    Jan 25, 2009
    Posts:
    444
    Hmmm not sure what the issue is with my scene, but testing the shader package in a fresh Unity scene works great. Awesome shader by the way! Now to figure out whats weird with my project . . . lol
     
  25. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Hi, when I move the folder to a subfolder, it gives an error. "VacuumShaders folder should be under Assets folder". Is there any reason why it should be hardcoded?

    Also, can you open source for the editor?
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Yes, VacuumShaders folder is necessary to be inside main Assets folder. VacuumShaders editor dll contains data that I use in all my assets (currently there are 7 assets) and I need it to be hardcoded. Editor source does not contain any useful code for user, but if you want to see whats going on inside decompile it, code is not obfuscated.



    VacuumShaders - Facebook Twitter YouTube
     
  27. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I move 3rd party packages to a folder for organization. I have 50 packages in one project. Imagine if everything needs to be at root. If you provide source, then I can modify the hardcoded folder easily.

    It seems to work fine in subfolder, just I get the annoying error message all the time.
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    I understand you, if SSS were my only shader I did not bother with that dlls, but it is part of my assets and I can not break it for just one of it. Now it may work in subfolder but after SSS 3 (releasing next week) you may have headaches with it, so leave VacuumShaders folder inside main Assets folder ;)



    VacuumShaders - Facebook Twitter YouTube
     
  29. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    How about just opening the source so I can modify easily. Everyone's happy.
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Sabsurface Scattering Shader 3 with new translucency algorithm (coming soon).




    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Apr 25, 2015
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Last edited: Apr 29, 2015
    SAOTA likes this.
  33. sashahush

    sashahush

    Joined:
    Sep 5, 2012
    Posts:
    75
    Amazing! Can't wait!
     
  34. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    140
    hi,
    just buy this asset and got a lot of errors ( unity 4.6.5f1)
    hope you can help, tks !
    upload_2015-5-13_15-24-47.png

    upload_2015-5-13_15-24-47.png upload_2015-5-13_15-24-47.png
     
  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    @sipon
    Create empty project and import only SSS package. Does it give errors? I am sure - No.

    Each shader in Unity uses some count of keywords. If total keyword count exceeds allowed limit - 64 in Unity 4 and 128 in Unity 5 - shaders added later to the project will not compile, because Unity has no free keywords for them.

    May be you have some heavy shaders inside your project that take all (or big amount) of keywords?
    Unfortunately Unity has no shader keyword count checker and you have to manually find balance between your shaders used in project.



    VacuumShaders - Facebook Twitter YouTube
     
  36. sipon

    sipon

    Joined:
    Feb 8, 2009
    Posts:
    140
    OK i understand, tks. Have already marmoset skyshop inside this project... will try to do some cleanup !
     
  37. mysteryDate

    mysteryDate

    Joined:
    Feb 2, 2015
    Posts:
    11
    Really enjoying your shaders! Would it be possible to provide the source for the editor? I'm trying to customize with new options, and options like "Advanced Translucency," "Normalize Light Vector," "Ambient Lighting" and "Dynamic Global Illumination" do not appear to be available except through the custom editor.
     
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Check PM



    VacuumShaders - Facebook Twitter YouTube
     
  39. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Yes ,please put the editor source in there, I don't think there's any magic code there right?
     
  40. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    You can easily extract script from dll using reflector tools. But the question is - Do you need it?



    VacuumShaders - Facebook Twitter YouTube
     
  41. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Yes I know, but you can make it easier for all for us if you just include it in, where as I have to do it everytime it's updated/new project.
     
  42. mysteryDate

    mysteryDate

    Joined:
    Feb 2, 2015
    Posts:
    11
    I'm having trouble adding a vertex modifying function to the shader (for tessellation). First, it tells me that my input struct needs vertex, normal and tangent values. After modifying SSS.cginc to have these parameters, I get:
    invalid subscript 'texcoord'
    At a line that is beyond my end of my shader file. Any advice?
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    I've completely forgotten about DX11 tessellation. I'll try to implement it (may be next week).
    For now I can not give you any advice, because I do not know what you are doing.



    VacuumShaders - Facebook Twitter YouTube
     
  44. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    The SSS shader does not show up in Unity water reflection, is there a fix?
     
  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    At my side it works with with reflections and refractions without problem.
    SSS - no problem.png

    Can you provide more info and screen shot? Unity version, build target, sss shader name, hardware info, OS.




    VacuumShaders - Facebook Twitter YouTube
     
  46. Project-Mysh

    Project-Mysh

    Joined:
    Nov 3, 2013
    Posts:
    223
    Hi there Arkhivrag,

    Why any of your shaders dont use AO? Its an SSS limitation? PB AO is what unity 5 standard shaders use, influenced by light amount as you can imagine. (With "using AO" I mean using a texture for detailed AO).
     
    Last edited: Jul 15, 2015
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    It is not SSS limitation, it's my time.
    For now you can use AO texture inside Advanced Translucency parameter.



    VacuumShaders - Facebook Twitter YouTube
     
  48. eventropy

    eventropy

    Joined:
    Oct 4, 2012
    Posts:
    249
    Please stop forcing us to put your VaccumShaders directory at the root of Assets folder, or at least make it configurable through a setting. Or open source your library so we can change it. It's very restrictive.
     
    imtrobin likes this.
  49. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I'm glad someone finds it annoying too.
     
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,836
    Sorry, but it is not negotiable.



    VacuumShaders - Facebook Twitter YouTube