之前的人皮渲染相关
前篇1:unity3d Human skin real time rendering 真实模拟人皮实时渲染
前篇2:unity3d Human skin real time rendering plus 真实模拟人皮实时渲染 plus篇
SSS:Unity3d shader之次表面散射(Subsurface Scattering)
PBR:Unity3d 基于物理渲染Physically-Based Rendering之specular BRDF
Screen-Space Perceptual Rendering & Subsurface Scattering of Human Skin其实就是Screen-Space Subsurface Scattering与Subsurface Scattering 简称SSSSS&SSS,8S,博主自创,,哈哈也不是,结合了许多资料弄出了看的更顺眼的人皮。。是不是要写篇论文了呢= =。。。
本来是录了视频的,但是视频降质,色差太大,就没有上传。。。
先上肉质鲜嫩的两张图
夜光引擎(Luminous Studio)的新demo->witch,能明显看到SSS和PBR效果,文章的最后也有对比,最终幻想的引擎渲染就是棒
没有被反射的光通过折射进入子表面层,光进入这些层之后部分被吸收(获得颜色)和散射,再从皮肤中入射点附近的出射点射出。这个过程就产生了次表面散射的效果。
<span style="font-size:14px;"> float fresnelReflectance( float3 H, float3 V, float F0 ) { float base = 1.0 - dot( V, H ); float exponential = pow( base, 5.0 ); return exponential + F0 * ( 1.0 - exponential ); } float PHBeckmann( float ndoth, float m ) { float alpha = acos( ndoth ); float ta = tan( alpha ); float val = 1.0/(m*m*pow(ndoth,4.0))*exp(-(ta*ta)/(m*m)); return val; } // Render a screen-aligned quad to precompute a 512x512 texture. float KSTextureCompute(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 ); } float KS_Skin_Specular( float3 N, // Bumped surface normal float3 L, // Points to light float3 V, // Points to eye float m, // Roughness float rho_s, // Specular brightness uniform texobj2D beckmannTex ) { float result = 0.0; float ndotl = dot( N, L ); if( ndotl > 0.0 ) { float3 h = L + V; // Unnormalized half-way vector float3 H = normalize( h ); float ndoth = dot( N, H ); float PH = pow( 2.0*f1tex2D(beckmannTex,float2(ndoth,m)), 10.0 ); float F = fresnelReflectance( H, V, 0.028 ); float frSpec = max( PH * F / dot( h, h ), 0 ); result = ndotl * rho_s * frSpec; // BRDF * dot(N,L) * rho_s } return result; } </span>
然后是之前写的文章Unity3d 基于物理渲染Physically-Based Rendering之specular BRDF
最后注意:
更多效果图请看:Unity5 Screen-Space Subsurface Scattering屏幕空间次表面散射SSSSS
8. Gpu Gems3 - Advanced Techniques for Realistic Real-Time Skin Rendering
之前的人皮渲染相关
前篇1:unity3d Human skin real time rendering 真实模拟人皮实时渲染
前篇2:unity3d Human skin real time rendering plus 真实模拟人皮实时渲染 plus篇
SSS:Unity3d shader之次表面散射(Subsurface Scattering)
PBR:Unity3d 基于物理渲染Physically-Based Rendering之specular BRDF
博主近期渲染:最近用unity5弄的一些渲染