Recently skipped class to do games, fled a few doors are to stop the test, OH ah, busy schedule do not forget super rehash, feel before the skin effect is not good enough, and improve some things
First of all
Zoom in to see details
obviously better than the previous effect, this time I put the model with 3dmax refinement, the model cracks improved, but the lips and other places still have obvious cracks (no way, online no more detailed map)
Removed before all the large amount of rim, replaced by the SSS sub-surface scattering before an article detailed said,
The parameters of SSS sub-surface scattering are really difficult to adjust = =;
Diffuse reflection replaced by a physical-based Oren Nayar reflection model
SpecularSpecular reflection is the same as in the previous article, here is a brief introduction
BRDF first presented by Fred Nicodemus in 1965
L is the radiation rate, or the ray direction of the three-dimensional angle of energy, E is the irradiance, or per unit angle of the irradiation energy, theta_i is the angle between the normal and WI, I indicate that the incident light incident Light,r is reflected light reflected.
cook-torrance Model
F (L,H) is the Fresnel function,
D (h) is a distribution function, which is responsible for the smoothness of the surface, the shape and size of the highlights, as well as roughness, can achieve perfect specular reflection.
G (l,v,h) is a geometric function,
float _sp = Pow (8192, _GL), float d = (_sp + 2)/(8 * PIE) * POW (dot (n2, H), _sp), float f = _sc + (1-_SC) *pow (2, -10 * d OT (H, lightdir)), Float k = min (1, _GL + 0.545), float v = 1/(k* dot (viewdir, h) *dot (Viewdir, h) + (1-k)); float all = d* F*v;all = saturate (all);d iff = (1-all) *diff;diff = Saturate (diff); spec3 *= luminance (diff); spec3 = saturate (SPEC3); spec3 *= _specularpower;
DiffuseThe Oren–nayar reflex model, developed by Michael Oren and Shree K. Nayar, is a diffuse model based on rough surfaces that simulates a large range of objects, concrete, plastic, sand, etc.
It is a physical-based reflection model.
Most of the time now, with the Lambertian model, including Unity's diffuse, writing surface shader is known to have Lambert illumination. The Lambertian model reflects all the light evenly in all directions, and this method simulates a diffuse that is not realistic and does not calculate diffuse based on roughness roughness.
Comparison of real images with Lambertian and Oren–nayar
Luminance curves of Oren–nayar and Lambertian
The exact same as in the wiki.
Sigma is surface roughness
E0 is the irradiance at frontal irradiation.
Rho is a reflection of the surface
The middle step is relatively simple
The final formula is
This method is used in the sand rendering of the wind traveler journey.
sub-surface scattering (subsurface scattering)
Where the light passes, take a part of the color, and you can see the light from the incident to the exit, the position and direction have changed.
The number of paths of Light Walk is infinite, the light reflected back is diffuse reflection, the oil surface transparency is also different,
This creates a subsurface scattering
Specific algorithm formulas are not mentioned here
To become more real, you can add some noise in.
After adding the bloom effect:
feel this effect is not very perfect, with the depth of study will continue to improve;
All code has been uploaded to GitHub
----by wolf96 http://blog.csdn.net/wolf96/
Unity3d Human skin Real time rendering plus real analog rugged rendering plus