Author : polygoo


Reply
Reply
 
Thread Tools Display Modes
TheMetaMorphe's Avatar
Old (#1)
Hi,

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









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
Offline , line, 69 Posts, Join Date Dec 2011,  
   Reply With Quote

Pampers's Avatar
Old (#2)
looks really good planning on releasing the shader to the rest of us?
Offline , vertex, 32 Posts, Join Date Nov 2011,  
   Reply With Quote

Ace-Angel's Avatar
Old (#3)
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?
There's a very good chance that I experienced MORE problems, then all the internet put together in the area of 3D. Talk about being original for once...
Offline , veteran polycounter, 4,497 Posts, Join Date Apr 2011, Location Canada  
   Reply With Quote

TheMetaMorphe's Avatar
Old (#4)
Thanks guys !

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

So a little update on this :

Without Color Ramp :

With Color Ramp :

With Color Ramp and Shadows :

Ambient lighting only :

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é-Brisebois and Marc Bouchard.

[3] Gpu Gem 3 : Advanced Techniques for Realistic Real-Time Skin Rendering by Eugene d'Eon and David Luebke

Last edited by TheMetaMorphe; 01-29-2013 at 07:38 AM..
Offline , line, 69 Posts, Join Date Dec 2011,  
   Reply With Quote

TheMetaMorphe's Avatar
Old (#5)
Close image with a different color ramp :

Offline , line, 69 Posts, Join Date Dec 2011,  
   Reply With Quote

Froyok's Avatar
Old (#6)
Superb ! :o
What is the cost of your current shader ?
Offline , polycounter, 797 Posts, Join Date Jun 2010, Location Namur, Belgium Send a message via MSN to Froyok Send a message via Skype™ to Froyok  
   Reply With Quote

TheMetaMorphe's Avatar
Old (#7)
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 !
Offline , line, 69 Posts, Join Date Dec 2011,  
   Reply With Quote

TheMetaMorphe's Avatar
Old (#8)
Update :

No shadows, No amb, No ramp :



No shadows, Amb, No ramp :




Shadows, No amb, Ramp :


Shadows, Amb, Ramp :


Last edited by TheMetaMorphe; 01-29-2013 at 07:37 AM..
Offline , line, 69 Posts, Join Date Dec 2011,  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch