Home Unreal Engine

UDK Skin Shader HLSL

TheMetaMorphe
polycounter lvl 12
Offline / Send Message
TheMetaMorphe polycounter lvl 12
Hi,

Its me again and this time I present a Final piece :

image_01.jpg
image_02.jpg
image_03.jpg
image_04.jpg
image_05.jpg
image_06.jpg
image_07.jpg

As you can see It's a skin shader inside UDK and it use HLSL.

This was very interesting to do because I had to learn HLSL to do it.

The only thing for me that I want to improve are the shadows but I don't know if it is possible to access them with material editor :s.

C&C are appreciated.

Infinite, 3D Head Scan by Lee Perry-Smith : http://www.ir-ltd.net/infinite-3d-head-scan-released

Replies

  • Pampers
    Options
    Offline / Send Message
    looks really good :) planning on releasing the shader to the rest of us?
  • Ace-Angel
    Options
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Looks good, is the Diffuse a Lambert based material with Blended Normals or something else?

    Because currently, UDK doesn't allow direct access to shadows, so anything like Half-Lambert, etc which doesn't rely in the standard Lambert formula will end up looking crap (unless you modify the .ini file in the UDK directory to push some high end shadows, but even then, it still artifacts).

    This also means you need to use a SS map as your Ramp/Gradient mask to tell it how much you want the scatter to 'draw' behind the Lambert term, because anything by default will pull to the pas the shadows, again, causing artifacts.

    Also, how are you doing the ear backface scatter? Inverted Lambert term through a Lerp?
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Thanks guys !

    When this shader will be finished I will released it yes.

    So a little update on this :

    Without Color Ramp : SSS_01.jpg

    With Color Ramp : SSS_02.jpg

    With Color Ramp and Shadows : SSS_03.jpg

    Ambient lighting only : SSS_04.jpg

    I've added ambient term using cubemap ( same technique as valve ).
    Added ambient scattering ( experimental ).
    Added AO. ( not sure about that maybe the ao should match the hue of the diffuse )

    Diffuse lighting use blended normal map[1]. I'm lerping between mesh normal and high frequency normal map and I'm also using a color ramp[1] for my half lambert term.

    The ramp is multiply with diffuse lighting.

    I'm using a sort of inverted AO as a scatter map.

    Backface scattering is an inverted lambert with a power of 3. It's not lerp ( like udk does ) I add the Backface scattering on top of everything[2].

    Sources :

    [1] Gpu Pro 2 : Pre-Integrated Skin Shading by Eric Penner and George Borshukov.

    [2] Gpu Pro 2 : Real-Time Approximation of Light Transport in Translucent Homogenous Media by Colin Barr
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Close image with a different color ramp :

    SSS_05.jpg
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Superb ! :o
    What is the cost of your current shader ?
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    At the moment it cost 125 instrucitons and I'm still using full hsl code for my specular and backface term. I'm sure I can leave some other instructions.

    It use one normal map with specmap in the alpha, a diffuse map with ao in the alpha, a cubemap, a thickness map and two look up texture ( 256*256 ).

    That's makes lot of textures :).

    Thank you !
  • TheMetaMorphe
    Options
    Offline / Send Message
    TheMetaMorphe polycounter lvl 12
    Update :

    No shadows, No amb, No ramp :

    SSS_noshadows_noamb_noramp.jpg

    No shadows, Amb, No ramp :

    SSS_noshadows_amb_noramp.jpg


    Shadows, No amb, Ramp :
    SSS_shadows_noamb_ramp.jpg

    Shadows, Amb, Ramp :

    SSS_shadows_amb_ramp.jpg
Sign In or Register to comment.