tag:blogger.com,1999:blog-7659461179709896430.post6844198908519324879..comments2018-05-15T11:51:27.510+08:00Comments on Simon's Tech Blog: Pre-Integrated Skin ShadingSimonhttp://www.blogger.com/profile/16505698282735255970noreply@blogger.comBlogger7125tag:blogger.com,1999:blog-7659461179709896430.post-61000794814167895512018-04-09T23:47:16.400+08:002018-04-09T23:47:16.400+08:00It's more clear now and you are right, the uni...It's more clear now and you are right, the unit of the curvature map from xNormal/Substance isn't well defined and not equals to 1/r. So it is not mathematically correct to use the baked map directly to the pre-integrated skin shading equation.<br /><br />But for our use case, the curvature map will be modified by the artist to drive which area to show more subsurface scattering, so not strictly mathematically correct isn't a too big issue for us.<br /><br />If we need to have the correct curvature, we may calculate this value by using derivatives and similar triangles as suggested in the original paper.<br /><br />Thanks for pointing it out. =]Simonhttps://www.blogger.com/profile/16505698282735255970noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-24117457058534614252018-04-09T05:49:03.516+08:002018-04-09T05:49:03.516+08:00Sorry everything you wrote there is also my unders...Sorry everything you wrote there is also my understanding, I didn't mean to be overly dramatic. Your rendered test spheres look great too btw :)<br /><br />What I meant is that xNormal/Substance Designer are not giving you the 1/r value preintegrated skin expects as "curvature" as their curvature map output (hence my reply to comments on the same).<br /><br />I don't think the curvature map from xNormal is very usable as the 1/r value without further computation - what xNormal gives is scaled&biased value representing only an angle of convexity/concavity (with a midvalue being flat) and what you want for preintegrated skin is the reciprocal of the radius (in millimetres) of a sphere that sort of approximates the surface around a point.<br /><br />It involves model/world scale length rather than just angular curvature as the subsurface "glow" (diffusion profile) falls off based on the actual distance (a distance of a few millimetres - do a search on 'skin diffusion profile' for graphs of the falloff)<br /><br />The normal and the angle part of the integration is used to model lambert diffuse illumination at nearby points. It's like lambert with red bleeding a few millimetres at but different scales<br /><br />What I think is "correct" is a faint (almost imperceptable) redness around the edge of the lit areas of the face - you don't want a large area of the dark side of the face to receive redness / subsurface illumination as shown in this image: https://1.bp.blogspot.com/-xDseP7y4K5Q/VNTiORrxvcI/AAAAAAAAA6k/FrwMntV9UR8/s1600/scene0_lighting_direct.png<br /><br />That scattered light isn't being attenuated/dimisinshed presumably due to an incorrect 1/r ("curvature") value being used (where that 1/r would value would more be appropriate for an earlobe or a baby's finger)<br /><br />Hope this helps :)Nathttps://www.blogger.com/profile/10085740712453098564noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-73970878616857807722018-04-08T23:22:15.010+08:002018-04-08T23:22:15.010+08:00Hi Nat, thank for the comment. May be I have mis-u...Hi Nat, thank for the comment. May be I have mis-understand the original pre-integrated skin technique. From my understanding, the original paper is using the radius of a ring (e.g. curvature) to integrating all incoming lighting, then store the result into a look up texture(LUT) with 1/r and N.L as input. My post is to approximate this LUT with arithmetic function, and should refer to the same curvature value.<br /><br />About the unrealistic amount of red subsurface scatter, do you mean my approximation is not red enough compare to the original LUT technique? Or may be there are bugs within my implementation?<br /><br />Would you mind explain more clearly which parts of my implementation goes wrong so that I can do a follow up?<br /><br />Thank you very much.Simonhttps://www.blogger.com/profile/16505698282735255970noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-23112059983852234872018-04-08T21:19:40.263+08:002018-04-08T21:19:40.263+08:00I feel I should point out this is rather a differe...I feel I should point out this is rather a different kind of "curvature" than what was intended/described for the pre-integrated skin technique (eg. look at the unrealistic amount of red subsurface scatter on the cheeks in the image).<br /><br />Assuming you figured this out, have you thought about doing a follow up that corrects this? (I suspect this page gets a lot of hits and might mislead others looking for implementation details)Nathttps://www.blogger.com/profile/10085740712453098564noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-8482463732864151412015-09-29T15:25:07.312+08:002015-09-29T15:25:07.312+08:00Thanks! It works!Thanks! It works!Ling Zhanhttps://www.blogger.com/profile/09151751739969091449noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-33962243190933307932015-09-29T11:13:07.970+08:002015-09-29T11:13:07.970+08:00The curvature map I used was generated in xNormal....The curvature map I used was generated in xNormal. Other tools like Substance Designer can also generate curvature map.Simonhttps://www.blogger.com/profile/16505698282735255970noreply@blogger.comtag:blogger.com,1999:blog-7659461179709896430.post-74121599354501423362015-09-29T09:47:43.111+08:002015-09-29T09:47:43.111+08:00Thanks for sharing. I am wondering how you generat...Thanks for sharing. I am wondering how you generate the curvature map? Any tools?Ling Zhanhttps://www.blogger.com/profile/09151751739969091449noreply@blogger.com