Search Unity

Assets Unity SRP HD SSS

Discussion in 'Works In Progress - Archive' started by petersx, Mar 27, 2018.

  1. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hello,
    I start threat about very very good implementation of subsurface scattering in new Unity 2018.1 SRP HD.
    All achieved with standard Lit shader. I modified only ranges of some parameters.
    Feel free to add your SSS works in this thread.
    There is my attemps to SSS with especially for DAZ 3D:



     
    Last edited: Apr 21, 2018
  2. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Next screenshots


     
    Last edited: Mar 27, 2018
    Ruchir and Neviah like this.
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Lovely work, can you share tools, workflows?
     
  4. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    The tools used - of course Unity 2018.1 beta and Daz Studio figures or any free model found in internet.

    The workflow is very simple:

    First we must have model loaded in Daz Studio. Next, we must export model from Daz Studio as fbx.
    Then import this model into Unity.
    Additionaly we have to copy all textures from Daz model - standard textures are not enough to achieve such result.
    We need textures: albedo/diffuse, normal, bump, eventually sss and specular (this last is not supported by subsurface scattering in Unity).

    Bump map texture had to be converted to normal map - in unity change texture to normal map and check "from grayscale" - bumpiness set to 0.01 and rest leave as it.

    In Unity 2018.1 beta with SRP HD I use standard Lit shader and place textures into slots - and tweak some range sliders:
    Base color - diffuse texture
    Normal map - normal texture (if not present - I use bump map)
    Mask map - i use diffuse map or specular map - (some specular maps are not good for it - then use diffuse map)
    Subsurface profile - choose skin and set mask about 0.1 - 0.3 - that's enough
    Subsurface mask map - sss texture - if present
    In Subsurface profile configuration I set scale to 0.1 and set (/Asset/Settings/SSSSettings )
    Detail input - I put secondary normal texture (bump texture) and set ranges:
    - Detail albedo >0
    - Detail normal scale - depends on textures
    - Detail SmoothnessScale - depends on textures

    And of course set PostProcess volume profile and lights.
     
  5. Vidalicious

    Vidalicious

    Joined:
    Aug 30, 2017
    Posts:
    17
    Thank you Peter!

    Edit: How did you manage to make the eyes? I saw a video explaining it, but I can't modify the default material of my daz 3d model, except by drag and drop. However, as the eyes are a superposition of different layers I can't replace the ones under the eyemoister
     
    Last edited: Jun 26, 2018
  6. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    Eyes consists of layers. The first layer is moisture and if you drag&drop material, you can only set material to this layer. Of course you can move in editor close to eye and drop material to other layer, but better solution is change material imported with fbx model.
    My last solution is:
    1. import fbx model (genesis 2,3,8), select imported asset and go to inspector
    2. set rig to humanoid and set import material (not embeded)
    3. apply changes
    4. set eyes materials in material folder (cornea, sclera, eyemoisture, etc.)
    5. if you import another fbx model to this folder and makes steps 1-3 the eyes in new imported model are ready

     
  7. Vidalicious

    Vidalicious

    Joined:
    Aug 30, 2017
    Posts:
    17
    Awesome, I'll try that! Thank you so much Peter :))

    Edit: Worked, thanks!
    and for the hair you used a mesh and added a shader made on amplify shader I guess? :)
     
    Last edited: Jul 2, 2018
    superlol likes this.
  8. superlol

    superlol

    Joined:
    Dec 6, 2010
    Posts:
    10
    Nice result!
    Do you mind to give us some tips about the hair? Are you using a lit or custom shader?
    Thx :)
     
  9. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    This is a standard Lit shader, but I'm not happy with results - waiting for shader graph working with it.
    But with standard lit shader there's much fun with wind option used with shader :)
     
  10. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Hello Petersx,
    Thank you for sharing your experience. It looks impressive!

    I am in DAZ to Unity too at this moment. However, not using HDRP yet.

    I've been wondering, did you use DAZ HD models in those pictures? I tried to export one HD model from DAZ and from usual 5MB .fbx it went to 150MB (plus textures, 5MB each). I guess it's a bit overkill for Unity game...?

    Also do you have some experience with models you do in terms of performance in some Unity game scenario?
     
  11. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hello,
    I use it only for test purpose, rather for max quality of render than for performance.
    I try to use high poly model by exporting as standard fbx from DAZ and then in 3ds smoothing the mesh to achieve high quality poly. But I lost skinning of mesh and some animations look ugly (f.e. jaw, eyes etc.)
    Then I use new HDRP standard Lit Tesselation Shader and effects was great.
    Now I'am testing Shader Graph with HD Lit node, but - it miss tesselations options - I'am waiting for Unity to enable tesselation in shader Graph, then I try to create new skin tesselation shader.
     
  12. Michal_Stangel

    Michal_Stangel

    Joined:
    Apr 17, 2017
    Posts:
    151
    Thanks.
    I saw recommendations to create Ambient occlusion textures in Blender, when setting DAZ characters to full PBR in Unity. Did you try them? It seems quite time consuming, so I would prefer to avoid it, if effect is negligible.

    As for eyes, do you also use standard HDRP Lit shader?
     
  13. originalemanuel2

    originalemanuel2

    Joined:
    Mar 4, 2015
    Posts:
    21
    Hi,

    I saw a video about some basic SSS settings. Does anyone know any tutorial video on that? I forgot where it was and by whom...

    It also showed some settings for thin objects, like a box that got SSS applied.

    Would be cool to gather some tutorial-links for SSS here in general!

    Thanks a lot!
     
  14. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,
    I don't try ao textures - I don't like Blender becouse of bad UI (for me)
    For eyes I'am using also standard Lit shader
     
  15. KennethC70

    KennethC70

    Joined:
    Apr 6, 2019
    Posts:
    6
    Wow nice hair. Doesnt unity have problems with rendering two sided hairvwith transparency?