Search Unity

► Subsurface Scattering Shader ◄

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

  1. 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
     
  2. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  3. 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.
     
  4. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  5. 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?
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  7. 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
     
  8. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  9. 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.
     
  10. 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:

  11. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  12. 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
     
  13. 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 :)
     
  14. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  15. 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 :)
     
  16. 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
     
  17. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  18. dre4mer

    dre4mer

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

    TheDudeFromCI

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

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  21. 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
     
  22. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
    Almakos and looki666 like this.
  23. 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.
     
  24. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  25. 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 :)
     
  26. dre4mer

    dre4mer

    Joined:
    May 26, 2016
    Posts:
    7
    I can report that it's working on several hundred instantiated objects all moving with physics without a hicup. nice work :)
     
  27. 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.
     
  28. 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 :)
     
  29. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  31. 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?
     
  32. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  33. 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.
     
  34. 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
     
  35. Arkhivrag

    Arkhivrag

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



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

    Arkhivrag

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

    Christmas Sale 50% Off



    VacuumShaders - Facebook Twitter YouTube
     
  37. 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!
     
  38. rdagar_007

    rdagar_007

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

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  40. 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.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    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
     
  42. 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:

  43. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  44. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    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
     
  45. Arkhivrag

    Arkhivrag

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



    VacuumShaders - Facebook Twitter YouTube
     
  46. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
     
  47. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
  48. monark

    monark

    Joined:
    May 2, 2008
    Posts:
    1,598
    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
     
  49. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,978
    Try changing all unity_ObjectToWorld variables inside shader to _Object2World.



    VacuumShaders - Facebook Twitter YouTube
     
  50. nickpettit

    nickpettit

    Joined:
    Dec 31, 2013
    Posts:
    33
    Hi @Arkhivrag!

    I'm considering buying this shader for a VR project. Does it support the single-pass stereo rendering method?