Search Unity

Translucent / Translucency Shader

Discussion in 'Shaders' started by Farfarer, Sep 11, 2012.

  1. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Worked up a translucency shader for Unity based on DICE's presentation.

    Grab it here :)

    I think it may have been made already - can't remember if I saw it on here or if it was a UDK version. But eh, yeah, enjoy :)



     
    Last edited: Sep 12, 2012
    akuno, Rahd, Climber-fx and 5 others like this.
  2. MADmarine

    MADmarine

    Joined:
    Aug 31, 2010
    Posts:
    627
    Wow this is very generous, great work! :)
     
  3. Farfarer

    Farfarer

    Joined:
    Aug 17, 2010
    Posts:
    2,249
    Updated first post with a better image.
     
  4. daawaa

    daawaa

    Joined:
    Aug 12, 2013
    Posts:
    1
    Sorry if its an extremely noobish question, but how is this applied?
     
  5. dskeith

    dskeith

    Joined:
    Dec 9, 2015
    Posts:
    1
    1. In a text editor, paste the shader code.
    2. File > Save As > "Translucent.shader" (put this somewhere in your Unity project directory)
    3. In Unity, create a new material Assets > Rt-Click > Create > Material
    4. Select the new material
    5. In the Inspector change the "Shader" property of "New Material" to "Custom/Translucent"
     
  6. PeterHann

    PeterHann

    Joined:
    Apr 9, 2013
    Posts:
    22
    Nice - thanks for sharing :)
     
  7. paledust

    paledust

    Joined:
    Sep 1, 2014
    Posts:
    16
    That Looks pretty!!
     
  8. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Wow, 4 years old and I didn't know it! Thank you!
     
  9. rewar281

    rewar281

    Joined:
    Apr 7, 2015
    Posts:
    24
    Thank you, I wanted this very effect just to play around with
     
  10. alkekapito

    alkekapito

    Joined:
    Nov 2, 2014
    Posts:
    2
    Formidable, perfect for the skin of my caracter!
    Merci beaucoup ;)
     
  11. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,982
  12. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    This shader is still working perfectly 8 years later and I'm going to use it on my game.
    Farfarer, wish me good luck, because I will reward you if I make some money out of it! :D

    Wondering why it's not on the Asset Store though!
     
  13. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,665
    After nearly 8 years since the thread has been created and the OP being inactive for two years, I guess we'll never know or find out...

    The HDRP has Translucency/Subsurface Scattering natively and there are also a few Assets in the Asset Store :)
     
  14. PolyMad

    PolyMad

    Joined:
    Mar 19, 2009
    Posts:
    2,350
    Ahah true... but you never know.

    Thank you for the hint.
    I guess I was doing the wrong search with "translucency"... they should add it in their descriptions!
     
  15. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    The technique being used in the original post is from a 2011 Dice talk on the technique they used to fake skin and translucent materials for Battlefield 3.

    Almost 10 years later it's still a really decent cheap way of doing translucency. Specifically for faking light showing through a translucent object when that light is behind it.

    What HDRP & about half of those assets on the store are doing is significantly more complex, but also much more accurate for replicating the look of skin, specifically the look of light being in front of a translucent object. For lights behind an object, what Unity's Subsurface Scatter documentation refers to as "transmision", the technique the HDRP uses is surprisingly similar to Dice's with the addition of supporting shadows..
     
    PolyMad likes this.
  16. Ramezov

    Ramezov

    Joined:
    May 2, 2017
    Posts:
    25
    Is there a way to make this work with URP ?