Unity3d screen space human skin perception rendering & sub-surface scattering Screen-space perceptual Rendering & subsurface scattering of Human skin

Source: Internet
Author: User
Tags pow

Before the human skin rendering related

Previous 1:Unity3d Human skin real time rendering real analog rugged rendering

Previous 2:unity3d Human skin real time rendering plus real analog rugged render plus

Sss:unity3d Shader subsurface scattering (subsurface scattering)

PBR:Unity3d based on physical rendering physically-based rendering specular BRDF

Screen-space Perceptual Rendering & subsurface scattering of Human skin is actually screen-space subsurface Scattering and subsurface scattering abbreviation sssss&sss,8s, Bo Master self-creation, haha is not, combined with a lot of information made to see the more pleasing to the skin of the people. Do you want to write a paper? = = ...

Originally recorded the video, but the video quality, chromatic aberration is too large, there is no upload ...

The first two pictures of fresh meat



the new demo->witch of the luminous engine (Luminous Studio), can see the SSS and the PBR effect obviously, the article finally also has the contrast, the Final Fantasy engine renders is the rod

To make people's skin more real, the details of people's skin become a key issue, including wrinkles, pores, hair follicles, and even scars, which can both cause our obstacles and help us to keep our skin looking more realistic. If only with ordinary Lambert, even PBR get the effect is not true, very stiff, dry, plastic texture. As shown, (No sssss) is a blogger using Unity5 's standard PBR shader to render. We are missing is the second surface scattering, the previous article also said that the skin is actually somewhat slightly translucent, most of the diffuse light from the sub-surface scattering, light exposure to the skin, there is about 96% scattered by the skin layers, only about 4% is reflected, so we realized the SSS plus PBR, Giving the skin a very real result, as shown in the figure below, (Sssss on) is the UNITY5 standard PBR shader plus the processing of the SSS of the screen space, more real and softer than before (the blogger is here to compare the PBR with unity, The following is a combination of local SSS and SSSSS).




We look at the skin as three layers, the lipid layer (trace, very thin), the epidermis, the dermis layer. It is because of the grease layer, because the grease layer directly reflects the light out, so there will be high light on the skin, we use PBR's high light to simulate the cortical layer, explained later. is a multi-layered skin model.

No reflected light enters the sub-surface layer by refraction, the light enters these layers and is partially absorbed (to obtain color) and scattering, and then burst out from the entry near the skin. This process produces the effect of sub-surface scattering.

Local SSS

Explain local SSS first

Grease Layer

Just explain the specular of the oil layer's reflection.
First realize the Beckmann distribution function and Fresnel reflectance mentioned by GPU Gem3.
It uses a map to simulate the Beckmann distribution

This is the code for the GPU Gem3

1 floatFresnelreflectance (Float3 H, Float3 V,floatF0)2  {3 float Base=1.0-dot (V, H); 4 floatexponential = POW (Base,5.0 ); 5 returnExponential + F0 * (1.0-exponential); 6 }7     floatPhbeckmann (floatNdoth,floatm)8   {  9     floatAlpha =ACOs (Ndoth); Ten     floatTA =Tan (Alpha);  One     floatval =1.0/(M*m*pow (Ndoth,4.0)) *exp (-(Ta*ta)/(m*m));  A     returnVal;  -   }   -   //Render a screen-aligned quad to precompute a 512x512 texture.  the      floatKstexturecompute (float2 tex:texcoord0) -   {   -     //Scale the value to fit within [0,1]–invert upon lookup.  -      return 0.5* POW (Phbeckmann (tex.x, tex.y),0.1 );  +   }   -      floatKs_skin_specular (Float3 N,//bumped surface normal +FLOAT3 L,//Points to light AFLOAT3 V,//Points to Eye at      floatM//Roughness -      floatrho_s,//Specular Brightness - uniform texobj2d Beckmanntex) -   {   -     floatresult =0.0;  -     floatNdotl =dot (N, L);  in   if(Ndotl >0.0 )   -   {   toFloat3 h = L + V;//unnormalized half-way Vector +FLOAT3 H =normalize (h);  -      floatNdoth =dot (N, H);  the      floatPH = POW (2.0*f1tex2d (BECKMANNTEX,FLOAT2 (ndoth,m)),10.0 );  *      floatF = Fresnelreflectance (H, V,0.028 );  $      floatFrspec = Max (PH * F/dot (H, h),0 ); Panax Notoginsengresult = Ndotl * rho_s * FRSPEC;//BRDF * DOT (n,l) * rho_s -    }   the    returnresult;  +}


The result of the blogger's realization:


And then the article that I wrote Unity3d based on physical rendering physically-based rendering specular BRDF

The specular effect of the illumination model

specular occlusion High gloss masking

Here we can use the specular occlusion to mask the high light We don't want, for example, if we don't want the eyebrows to have the high light of the grease layer, we need to make a high-gloss masking map that obscures the eyebrows.
The right side of the nostrils, eyebrows and so on are not desired highlights.

And the pores that mask the highlights.

Microscopic details


About the detail section you can generate your own second specular lobe
Is the microscopic detail generated using the noise functions of 3ds Max



Then mix the detail highlights and highlights linearly

Last Note:

Because the grease layer of oil and the skin's outermost tissue cells are dielectric material, they do not color the light when reflected rays (such as gold will give light gold, because it changes the refractive index significantly in the visible wavelength segment), therefore, the physical skin coloring in the reflection should be used white

Epidermal Layer

And then process the epidermal layer
or BLUR6 secondary surface scattering effect of the epidermis, the skin color basically comes from the epidermis layer

The results of the above table are as follows


The above table is in order to texture-space diffusion image space of the diffuse weight, that is, in different color channels with different range and degree of Blur, Bo Master in PS in the Gaussian blur, can also use code to Gauss Blur


Leather Layer

The light passes through the dermis and brings out the color of the blood, which is why the skin will be bloody. We use color to find the way to simulate the scattering in the dermis, for example, the upper right corner of the figure is a BRDF look-up map, we want to pass the curvature curvature (ball radius 1/r, find the upper left part of the figure) and N L, get the lower half of the result.


As of here the local SSS has been basically molded, the results are as follows







shading of subsurface scattering and self-shadowing

The boundaries that block light scattering are not just Leng Leng shadows, such as

Unity's fragment shader supports self-shadowing, and also uses the Find map map color in the shaded section.
This is the result of the blogger's realization



As of this point, the subsurface scattering effect of the local SSS is very good, and the effect is more realistic if the surface scattering is added to the screen space.


sssss screen space subsurface scattering

After the previous step we have got a subsurface scattering skin, screen space after SSS effect plus.
It is also necessary to use Blur to simulate multi-layer scattering, such as marble, such as scattering only once, do not need so many blur.
We need to carry out 4 passes, a total of 4 blur, the first three times is subsurface scattering pass, the last need to reduce the sampling blur-> Boom Pass.
Bo Master lazy, with grid violence sampling 9 times blur, the effect is still possible.
Four passes as shown






The blur of the last pass needs to be sampled to SIZE/2 and then in Blur

Finally, remember that the color space if linear space.
The left image is linear space, the right image is gamma space, in gamma space, the sub-surface effect disappears directly ...

Final Results show

the new demo->witch of the luminous engine (Luminous Studio)

Bo Master's local Sss&sssss

Unity Standard Shader&sssss

See more:Unity5 screen-space subsurface scattering screen space subsurface scattering sssss


Implementation reference:
1. Screen-space Sub Surface scattering for real-time skin rendering
2. Review of Screen-space subsurface scattering
3. GPU Pro-screen-space perceptual Rendering of Human Skins
4. GPU Pro2-real-time approximation of light Transport in translucent homogenous Media
5. GPU pro2-pre-integrated Skin Shading
6. Gpu Gems1-real-time approximations to subsurface scattering
7. Gpu gems3-the importance of Being Linear

8. Gpu gems3-advanced Techniques for realistic real-time Skin Rendering

Before the human skin rendering related

Previous 1:Unity3d Human skin real time rendering real analog rugged rendering

Previous 2:unity3d Human skin real time rendering plus real analog rugged render plus

Sss:unity3d Shader subsurface scattering (subsurface scattering)

PBR:Unity3d based on physical rendering physically-based rendering specular BRDF

Blogger's recent renderings: some recent renderings using unity5

----by wolf96


Unity3d screen space human skin perception rendering & sub-surface scattering Screen-space perceptual Rendering & subsurface scattering of Human skin

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.