Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    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,972
    Currently can not test myself, but do not see the reason why it should not.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Feb 18, 2017
  2. nickpettit

    nickpettit

    Joined:
    Dec 31, 2013
    Posts:
    33
    Update: Purchased and I can confirm this works with single-pass stereo in VR. And it performs really well, too!
     
    Ony and Arkhivrag like this.
  3. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Hi.

    @Arkhivrag

    Does it come with shader source code? I want to try on the consoles and it is too risky to buy/use assets that doesn't come with the source.

    Also can you let us know how well does it perform? Some simple comparison to other types of shader would be fine. For example it is more or less 2x slower than standard Unity shader etc.

    Thanks! you work is awesome!
     
  4. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Shader source code is included.
    Performance is excellent. Package includes more than 200 shaders with various optional features. Even mobile compatible.




    VacuumShaders - Facebook Twitter YouTube
     
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Thanks for the reply.

    Are they any other additional setups going on with this shader? For example, some other additional camera rendering per object with scattering shader etc.? So if I have 3 objects in the scene that uses the shader, there is another camera rendering from say.. light point of view etc?

    How many different kinds of lights does it support and how many lights? Does it work in deferred mode?
     
  6. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    No additional setup is required.
    SSS shaders are rendered and have same behavior (supported light types and their count) as Unity built-in Legacy shaders.
    SSS shaders use Forward rendering even if camera is targeting Deferred mode.



    VacuumShaders - Facebook Twitter YouTube
     
  7. r3ndesigner

    r3ndesigner

    Joined:
    Mar 21, 2013
    Posts:
    143
    this shader works good for skin?
     
  8. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Does it work with any kind of 3d model and any mesh? Or does it have any kind of limitation in some way?
     
  9. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Depends what type of skin you need. Mostly - No.
    SSS shader was not developed for using as Skin shader.



    VacuumShaders - Facebook Twitter YouTube
     
  10. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    No limitations, works with all type of 3d models.
    If using mobile Per-Vertex shaders mesh with more vertices will produce better results.


    VacuumShaders - Facebook Twitter YouTube
     
  11. SpaceRay

    SpaceRay

    Joined:
    Feb 26, 2014
    Posts:
    455
    Thanks for your good news
     
  12. ryo0ka

    ryo0ka

    Joined:
    Sep 27, 2015
    Posts:
    37
    @Arkhivrag This seems a nice asset for only $10. Does it support PBR setup? Metalic map, Specular map, etc like the Standard Shader?
     
  13. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    SSS shader uses Lambert/BlinnPhong shading model.
    Metalic and Specular maps are not supported.



    VacuumShaders - Facebook Twitter YouTube
     
  14. Vel_1828

    Vel_1828

    Joined:
    Apr 12, 2014
    Posts:
    53
    Hello! I am aiming to but this asset for a Low Poly style environment. Do these shaders need any external work to be made (I read something about transparency maps etc.) or is it all calculated/baked in Unity editor or in realtime?

    Also, are SketchUp models fine to be used with this asset?
     
  15. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    No external work is needed. But as with all materials, more texture data you provide better final results will be.
    upload_2017-12-15_16-33-6.png

    If SketchUp models work with Unity materials, then no problem to use this shader.



    VacuumShaders - Facebook Twitter YouTube
     
  16. Vel_1828

    Vel_1828

    Joined:
    Apr 12, 2014
    Posts:
    53
    So if I understand correctly, if I had, for example, several low-poly buildings made in SketchUp (it's a simple tool for basic modeling, no real texturing or mapping inside), then I would have to manualy draw a map of translucency in Photoshop and then map it on the model somehow?

    Are there any tutorials of how to draw such a translucency map? (I mean the principles, as I assume it's just a black-while image where white means "translucent" and black means "solid"?)
    PS: Or simplier and less time consuming - are there any external tools which could calculate and save such a map automatically, instead of drawing it by hand for each building?
     
    arumiat likes this.
  17. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    @Arkhivrag, thanks for your awesome asset.
    We've got this prototype scene for an AR project. We use two cameras. The one inside the magnifier is using the global fog setting (red fog for now). It seems the shader doesn't support the global fog. We're using the "VertexLit (Mobile)/LightCount 2" shader

    2018-03-08_124048.jpg

    I read here that it can be added in Unity 5: https://answers.unity.com/questions/1068035/fog-not-working-in-my-own-vertext-shader.html
    Is it possible to add this to your shader? Can you help us implement it? Thanks
     
  18. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Update will be available tomorrow.



    VacuumShaders - Facebook Twitter YouTube
     
    AM-Dev likes this.
  19. AM-Dev

    AM-Dev

    Joined:
    Aug 5, 2015
    Posts:
    31
    Amazing, thanks for the fast reply and implementation!
    Have a nice weekend
     
  20. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
    Hello :)
    I am new the world of shaders and want to know how to use your shaders correctly. In my folder I have the following shaders:

    upload_2018-7-13_16-13-35.png

    So this shaders i can use in my materials? And by applying these I can archieve this SSS effect?

    Thanks :D

    Jenni
     
  21. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Use materiel editor to change shader. Do not use drag-and-drop.



    VacuumShaders - Facebook Twitter YouTube
     
  22. JenniB

    JenniB

    Joined:
    Feb 15, 2018
    Posts:
    62
  23. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
  24. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
  25. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    336
    Gotcha. I'm actually using the standard render pipeline, just with textures from that asset pack converted to SRP PBR formats. I'm using the Standard shader double sided cutout for my vegetation atm, but someone recommended a SSS shader for vegetation that can make use of a thickness map. Basically was just wondering if your SSS shaders take a thickness map as an input.
     
  26. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Thickness (translucency) map is supported.
    Shaders are not double sided, but you can add Cull Off manually.



    VacuumShaders - Facebook Twitter YouTube
     
  27. multimediamark

    multimediamark

    Joined:
    Mar 17, 2017
    Posts:
    30
    Quick question: Does it work on Oculus VR?
     
  28. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Yes.



    VacuumShaders - Facebook Twitter YouTube
     
    multimediamark likes this.
  29. multimediamark

    multimediamark

    Joined:
    Mar 17, 2017
    Posts:
    30
    I noticed that models that have this shader applied only receive shadows from directional lights, is it supposed to be like that?
     
  30. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Shader uses custom lighting model that can be constructed only in Forward rendering mode. In this mode Unity gives enough info in shader.
    In Forward rendering mode Unity generates only directional light shadow and SSS shader receives it.

    Point/Spot light shadows are generated in Deferred rendering mode, but Unity does not give enough info in shader to construct SSS lighting model. So Deferred shadows are not supported by SSS :(

    However, there is option to generate all shadows in Forward rendering mode. It makes shader heavier but you can try it yourself:
    1. Open shader file and find line with - #pragma surface surf TransPhong
    2. Add ' fullforwardshadows' at the end of that line.
    3. Save shader.

    Personally I'm not satisfied with such shadowing result and do not provide it in shaders, but you can give it a try.



    VacuumShaders - Facebook Twitter YouTube
     
  31. cosmologosaurusrex

    cosmologosaurusrex

    Joined:
    Jul 1, 2015
    Posts:
    50
    Great shader! Can I have transparency with this shader? I select Render Queue: Transparent and lower Main Color Alpha but nothing happens. Thx.
     
  32. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Package includes Transparent shaders.

    upload_2019-5-9_11-51-43.png



    VacuumShaders - Facebook Twitter YouTube
     
  33. cosmologosaurusrex

    cosmologosaurusrex

    Joined:
    Jul 1, 2015
    Posts:
    50
    Alright, thx! Its a small bummer that if I chooce transparent/reflective/specular then both the refStrGloss and Transparency are controlled by the same alpha value in the main texture.
     
  34. modjun8

    modjun8

    Joined:
    Apr 18, 2018
    Posts:
    2
    Hi, I got a weird issue :
    I made the scene using baked lightmaps and your shader. All looks perfect in the Scene and Game view.
    But when I build the game and play, all other materials are looks fine but just objects which Vaccum shader used are missing the lightmaps. somebody help me please
     

    Attached Files:

  35. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    SSS effects needs light position to calculate its normal direction and interaction vector with a mesh.
    Baked lightmap is just a texture and there is no info about light positions. Instead of regular lightmap try baking Indirect Lightmap.
    upload_2020-2-12_19-19-30.png




    VacuumShaders - Facebook Twitter YouTube
     
  36. AlexisDiStefano

    AlexisDiStefano

    Joined:
    Dec 31, 2016
    Posts:
    4
    Hello! is there a way to use a Metallic Roughness map? I must say that if not, this asset does not fit my project at all, I bought it because in the reviews you can find peoplestating that they used it for skin, but without metallic roughness enhanced properties, the skin looks flat and way unrealistic, thanks!
     
  37. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Metallic Roughness map is not supported.



    VacuumShaders - Facebook Twitter YouTube
     
  38. AlexisDiStefano

    AlexisDiStefano

    Joined:
    Dec 31, 2016
    Posts:
    4
    Can I get a refund? this asset is totally useless for my project. Bought it because the reviews stating it can be used for that, but actually not, thanks
     
  39. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Send me your asset purchase invoice to support@amazingassets.world



    VacuumShaders - Facebook Twitter YouTube
     
  40. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Hello Arkhivrag,

    Question about this asset. Want to use it in 2019.4 with UWRP.
    But somehow i cant get it working.

    Created a new project.
    imported VacuumShaders SSS
    opened scene 1. Torusknot
    verified working
    imported package UWRP
    created UniversalRenderPipelineAsset and UniversalRenderPipelineAsset_renderer
    assigned it to scriptable render pipeline settings in project settings/Graphics
    Edit/render pipeline/Universal Render Pipeline / Upgrade project materials ...
    Now everything is purple...


    Is 2019.4 supported (and what should i do to get it working) or if its not working, any plans / eta?

    Best regards.
     
  41. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    SSS does not support Universal and High Definition render pipelines.
    Shaders support only Standard render pipeline (as written in the description).

    Currently updating SSS for Scriptable render pipeline is not planed. Just very busy with similar updates for other assets.



    VacuumShaders - Facebook Twitter YouTube
     
    Last edited: Jul 1, 2020
  42. gpvd

    gpvd

    Joined:
    Nov 2, 2013
    Posts:
    78
    Ok. Thanks for your awnser.
    Best regards
     
  43. Vsion-Studio

    Vsion-Studio

    Joined:
    Oct 7, 2019
    Posts:
    4
    Hi! The asset looks awesome but is it compatible with skinned mesh renderer or only works with static meshes?
     
  44. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Any type of meshes are supported.
    Note, shader works only in builtin (Standard) render pipeline.



    Amazing Assets - YouTube Facebook Twitter
     
  45. anton88pro

    anton88pro

    Joined:
    Jul 20, 2017
    Posts:
    61
    Hello,
    I already own SSS and I'm also considering "Vertex Thickness" asset and wanted to know if SSS shaders can read the baked thickness from a mesh or do I have to use the "Convert Vertex Color To Texture" asset?
     
  46. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    SSS shader does not use mesh thickness data. Using it in texture format will not help either, unless you manually modify shader and make it to work the way you need.



    Amazing Assets - YouTube Facebook Twitter
     
    anton88pro likes this.
  47. alsomitra

    alsomitra

    Joined:
    Aug 31, 2017
    Posts:
    33
    Hey.
    I've already bought this.
    I want to use this in my mobile game.
    But this only has VertexLit(Mobile).
    Can you please add Cut out etc?
    Thank you.
     
  48. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Bookmarked for the future updates.



    Amazing Assets - YouTube Facebook Twitter
     
  49. kreso

    kreso

    Joined:
    Sep 7, 2013
    Posts:
    145
    [SOLVED] UPDATE: Removing Library folder of Unity cause rebuild of the project and the shader was loaded & compiled normaly.


    Hello @Arkhivrag
    First of all - thank you for a great asset!!

    I had problem upgrading my project to Linear color space (from Gamma) - the only mesh going invisible on mobile (using the mobile vertex shader) goes invisible when run on the device (works in editor).
    So I decided maybe upgrading the asset may help.

    I run into a problem when I tried to upgrade.
    I can import in fresh project and it works fine.

    But using it in my existing project, shader simply don't work.
    Only mobile vertex shader compiles, but it doesn't work. I can see changing values in the small sphere thumbnail of material window that I am changing values, but values do not change in the scene/game view (except the main color property).

    I deleted all the files related to asset from my current project, then imported.
    I did not move any asset's folders or files.
    I don't know what to do.

    Maybe these screenshots may help?
    On the left is working/fresh project, on the right my existing.

    I am using Silicone Mac, Unity 2021.2.14f1.

    Thank you for your help.
    Kind regards
    Kreso
     
    Last edited: Mar 18, 2022
  50. Arkhivrag

    Arkhivrag

    Joined:
    Apr 25, 2012
    Posts:
    2,972
    Problem may be in Unity 2021.2. Shaders have not been updated for it yet.
    Unity 2021.x will be supported after it is released as LTS version. Currently it is 'tech release'.



    Amazing Assets - YouTube Facebook Twitter
     
    kreso likes this.