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

► Subsurface Scattering Shader ◄

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

  1. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    New update will be available in several days.
    It includes:
    1. DX11 tessellation shaders
    2. Will be revealed after release ;)


    Edit: above scene is included.



    VacuumShaders - Facebook Twitter YouTube
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Update v3.1 released!
    • Added DX11 tessellation shaders.
    • Added Curved World shaders. (Only for Unity 5. Requires Curved World asset).
    • New improved shader fallbacks.


    Proud to present Subsurface Scattering Shader's 3 years of evolution :cool:
    Subsurface scattering shader evolution.png



    VacuumShaders - Facebook Twitter YouTube
     

    Attached Files:

    Last edited: Mar 3, 2017
  3. owen-mills

    owen-mills

    Joined:
    Jun 24, 2013
    Posts:
    8
    Hi Arkhivrag,

    I recently bought Curved World and Subsurface Scattering Shader assets. I'm trying to get the VertexLit (Mobile) shader working, but I'm getting a bunch of errors when I try and apply it.

    Screen Shot 2015-10-21 at 7.34.32 pm.png

    Is there something I haven't configured properly?

    Cheers,

    Owen
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Seams shader is not compiled at your side and editor can not handle 'uncompiled' shader's variables.
    What's Unity version?
    What's OS?
    Can you try importing Curved World and SSS assets in new(fresh) project.
    Also, in material editor for 'problematic shader' click gear icon and choose Select Shader, that will display inspector for shader and it will contain more why it is not compiled on your device.



    VacuumShaders - Facebook Twitter YouTube
     
  5. owen-mills

    owen-mills

    Joined:
    Jun 24, 2013
    Posts:
    8
    I'm using Unity 5.1.3f1 Personal on a MacBook Pro - OS X Yosemite.
    The above was from a new project with only Curved World and SSS assets imported.

    I did some hacking and I think I've found the issue. I'll send you a direct message with the details.
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Fixed in update v3.11



    VacuumShaders - Facebook Twitter YouTube
     
  7. siraj.haq

    siraj.haq

    Joined:
    Nov 20, 2015
    Posts:
    1
    Hi

    I have a question - Does translucent works on object density as well, like if same object has different density on different areas then light should pass from less denser area and should not pass from high density areas.

    Does your SSS work for this as well?
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Mesh density is not taking into account. Otherwise shader will not be so fast as it is now. But you can darker translucency map for imitating depth.



    VacuumShaders - Facebook Twitter YouTube
     
  9. owen-mills

    owen-mills

    Joined:
    Jun 24, 2013
    Posts:
    8
    Hi,

    I just upgraded to Unity 5.3 and the Curved World particle shaders don't seem to be applying the curve anymore. I realise Unity 5.3 has only just been released, but would you be able to have a look into this issue?

    Thanks
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
  11. owen-mills

    owen-mills

    Joined:
    Jun 24, 2013
    Posts:
    8
    It seems this issue is specifically with SSS curved world shaders, not an issue with the curved world asset itself. I unchecked the "Use With Particle System" option, and the particle effect is then displayed correctly with the curved world settings.. which seems a little backwards now.
     
  12. ibairamirezbig

    ibairamirezbig

    Joined:
    Mar 23, 2016
    Posts:
    2
    Hi Arkhivrag,

    We are using your amazing shader for the subsurface scattering but we are finding the following problem:

    When 2 different submeshes from the same 3D Model use the shader we are seeing the line between the two submeshes. As you can see in the image called "WithLine.jpg".

    Can you please help us with this? May be is a shader configuration problem or shader problem...

    Thank you very much and kind regards

    Ibai
     

    Attached Files:

  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    In attached image I do not see any shader problems. If you mean 'line' at neck it's because of two submeshes have different normals and blending is not smooth.



    VacuumShaders - Facebook Twitter YouTube
     
  14. ibairamirezbig

    ibairamirezbig

    Joined:
    Mar 23, 2016
    Posts:
    2
    Hi again,

    thanks for the quick reply,

    yes we mean that line at the neck. I will double check with the art team but I am pretty sure they averaged the normals of the two submeshes.

    I will also do a script to show the normals on the neck in diferent colors to double check it

    Thanks and kind regards

    Ibai
     
  15. AntonBertelsen

    AntonBertelsen

    Joined:
    Oct 13, 2014
    Posts:
    37
    Hi there! - I really like your shader, but it uses a frustratingly high number of shader keywords, and I can't remove the one I don't need, since they're mentioned in the DLL file. Could you somehow expose the shader keywords to the user?

    Thanks :)
     
  16. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Only 3 pairs of keyword:
    1. V_SSS_NORMALIZE_DIFFUSE_COEF_OFF V_SSS_NORMALIZE_DIFFUSE_COEF_ON
    2. V_SSS_ADVANCED_TRANSLUSENCY_OFF V_SSS_ADVANCED_TRANSLUSENCY_ON
    3. V_SSS_RIM_OFF V_SSS_RIM_ON

    And you can remove them from shader file.
    Or if are using just replace (eg. rim effect)
    #pragma shader_feature V_SSS_RIM_OFF V_SSS_RIM_ON
    replace with
    #define V_SSS_RIM_ON



    VacuumShaders - Facebook Twitter YouTube
     
  17. AntonBertelsen

    AntonBertelsen

    Joined:
    Oct 13, 2014
    Posts:
    37
    Huh. I tried that, but there must be some material that I haven't removed the keyword reference from. - Sorry for asking before researching it properly, and thanks for the fast reply :)
     
  18. Vern_Shurtz

    Vern_Shurtz

    Joined:
    Mar 6, 2009
    Posts:
    264
    Awesome asset. Have one question though. Is there a way to make the shader slightly transparent? I need to place a small sphere inside my object that can be seen through the surface.

    Thanks
     
  19. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    There are no transparent shaders int he pack, but you can modify them. All you need add transparency tag and blending mode.



    VacuumShaders - Facebook Twitter YouTube
     
  20. dre4mer

    dre4mer

    Joined:
    May 26, 2016
    Posts:
    3
    How does this shader do on performance of a large quantity of clones?
     
  21. TheDudeFromCI

    TheDudeFromCI

    Joined:
    Oct 21, 2014
    Posts:
    15
    Wow, these look extremely high quality. Very photorealistic.
    I'm impressed.
     
  22. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    If you are asking about Unity 5.4 GPU Instancing feature - it is not implemented yet.



    VacuumShaders - Facebook Twitter YouTube
     
  23. Almakos

    Almakos

    Joined:
    Dec 13, 2013
    Posts:
    179
    Shaders in this asset look very nice. Thank you Davit
    If you will have spare time, would you please consider adding transparency?
    I am sure this feature will help many.
    You've mentioned that it's possible to add tag and blending, but I have no idea how to do that
    Anyways , thank you
    great asset
     
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Added to wishlist.



    VacuumShaders - Facebook Twitter YouTube
     
    Almakos and looki666 like this.
  25. Sentionaut

    Sentionaut

    Joined:
    Apr 27, 2015
    Posts:
    10
    Hello, I'm very interested in purchasing this shader for my project, but before doing so, I have a question: does it work with deferred lighting? Reading the comments section in the Asset Store, I can understand that when rendering in deferred, objects with SSS cannot receive shadows, which is not such a big deal for me (although I'd prefer the opposite). But, besides this particular limitation, does the shader work?
    Thank you.
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    SSS effect is rendered in Forward pass. Yes it works with deferred lighting.



    VacuumShaders - Facebook Twitter YouTube
     
  27. Sentionaut

    Sentionaut

    Joined:
    Apr 27, 2015
    Posts:
    10
    Thanks for the answer. I already bought it and I'm doing some tests right now. It's looking great so far :)
     
  28. dre4mer

    dre4mer

    Joined:
    May 26, 2016
    Posts:
    3
    I can report that it's working on several hundred instantiated objects all moving with physics without a hicup. nice work :)
     
  29. JuliuszK

    JuliuszK

    Joined:
    Dec 22, 2014
    Posts:
    25
    Hi,
    I am trying to recreate the effect of stained glass window, like in this image:


    Is your SSS shader capable of doing these effects?
    1) mapped translucency
    2) mapped transparency, so it's see through
    3) normal mapping
    4) participate in GI.
    5) cast coloured shadows (or at least the grayscale shadows, like the Standard shader)


    I need this effect with a dynamic GI, to see how the sun passes through the window at different times of the day.
     
  30. RicoCilliers

    RicoCilliers

    Joined:
    Oct 25, 2016
    Posts:
    3
    Hi there, I'd love to see this shader in action on a human face model before I buy... do you have any examples of that? thanks :)
     
  31. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    1) yes
    2) no
    3) yes
    4) receives GI, but does not emit it.
    5) no



    VacuumShaders - Facebook Twitter YouTube
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    I have not designed SSS shader to be used as a skin shader, if it's what you are looking for.



    VacuumShaders - Facebook Twitter YouTube
     
  33. JuliuszK

    JuliuszK

    Joined:
    Dec 22, 2014
    Posts:
    25
    Thanks for the answer.
    Regarding the coloured shadows and GI - I think I would be able to fake these with reasonable results (fingers crossed!)
    But do you have any plans of adding transparency support to your shader? I read in an earlier post, that you had added it to the wishlist...
    If you consider doing that, please make sure to have the refraction affected by the normal map... :) Thanks!

    Oh, and not sure if I asked about that:
    6) reflections - are they supported?
     
  34. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    Yes, standard cubemap reflection.



    VacuumShaders - Facebook Twitter YouTube
     
  35. JuliuszK

    JuliuszK

    Joined:
    Dec 22, 2014
    Posts:
    25
    Thanks for the answers.
    Right now however transparency is crucial for what I need. I'll be watching your shaders for any upadates in the future.
     
  36. A77ila

    A77ila

    Joined:
    Nov 28, 2015
    Posts:
    4
    Hi!

    Does your shader supports double side planes with cutout? I would love to use it for foliage on trees
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    All cutout shaders inside package are double sided.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Dec 7, 2016
  38. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    v3.2
    • Unity 5.5 compatible
    • Added Transparent shaders

    Christmas Sale 50% Off



    VacuumShaders - Facebook Twitter YouTube
     
  39. Asset_Store_Deals

    Asset_Store_Deals

    Joined:
    May 2, 2016
    Posts:
    335
    Just to let you know we are adding Subsurface Scattering Shader to AssetStoreDeals.com.

    When you have other sales, you can add them to this website yourself simply by pasting the link to your asset in the designated area.

    Best of luck to you with this sale!
     
  40. rdagar_007

    rdagar_007

    Joined:
    Nov 4, 2016
    Posts:
    5
    Is that working in VR or not?
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
  42. rdagar_007

    rdagar_007

    Joined:
    Nov 4, 2016
    Posts:
    5
    I have purchased your shared it is good and working well but there is no Occlusion properties for contact shadow. And I am using these shader's for Mobile VR(for organic look, like human body internal parts). Can you give me suggestion for organic look in mobile VR.
     
  43. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    You can enable Advanced Translucency option and use Translucency Map for limiting lighting areas.
    All shadows are rendered by Unity, that does not 'see' translucent shaders.



    VacuumShaders - Facebook Twitter YouTube
     
  44. rdagar_007

    rdagar_007

    Joined:
    Nov 4, 2016
    Posts:
    5
    It is giving error while I import it in unity VR project.

    Denoted error by unity while compilation is given in the attachment.

    Kindly Suggest appropriate solution.
     

    Attached Files:

  45. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    And how that error relates to the SSS shader?



    VacuumShaders - Facebook Twitter YouTube
     
  46. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,593
    Just installed into a fresh Unity 5.3.7f1 file and I'm getting this error on the ambient VertexLit versions

    undeclared identifier 'unity_ObjectToWorld'

    SSS.cginc:442
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
    sss.png



    VacuumShaders - Facebook Twitter YouTube
     
  48. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,593
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,830
  50. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,593
    That said, is it something that I could edit myself to make it work in 5.3, is it just that one function or does it run much deeper than that
     
unityunity