Professional Documents
Culture Documents
Blender3D:NoobtoPro/NormalsandShading
OpenanewBlenderdocument.Deletethedefaultcube,andaddaUVSpheremesh.In
theAddUVSphere(PictureshowsIcoSphere)panelwhichappearsatthelowerleftof
theToolshelf(press T tomaketheToolshelfvisibleifitsnot),setboththeSegments
andRingstoalownumber,e.g.8.Theresultwillbeveryangular,asshowntotheright,
notroundlikeyouwouldexpectaspheretobe.
,andclickonSmooth.Nowtryanewrenderwith F12 .
Asyoucansee,thesurfacesoftheobjectlookalotsmootherandcurved,eventhough
theoutlineorsilhouetteisjustasangularasbefore.
.Ifyoucheckbothiconboxes,thedisplayoftheUVsphere
shouldchangetolooksomethingliketheimagetotheright.
Thosespikylittlelinesarethenormalsthegreenonesinthemiddleofeachfacearefacenormals,theblue
onesprotrudingfromeachvertexarevertexnormals.
Inthephysicaltheoryoflight,thenormalisalineperpendiculartothesurfaceoftheobjectthelightishitting.
Whenyoureye(orthecamera)Cispositionedonaplanethroughthenormalofaparticularsurfaceobserving
acertainsurfacepointPilluminatedbyacoplanarlightsourceL,aspecificamountoflightwillbereflected
andhenceberegisteredbythecameradependingonthephysicalcharacteristicsofthesurface.Theobserved
intensityofreflectedlightisatamaximumiftheangleCPLisdividedintotwoequalhalvesbythenormal.
Intherealworld,alotofsurfacesarecurvedorotherwisenotflat.Butameshcanonlybemadeupofstraight
edgesandflatfaces.Sohowcanitrepresentanobjectwithacurvedsurface?
WhenyouaddedtheUVspheretoyourscene,youhadtheoptionofspecifyinghowmanysegmentsandrings
itwasmadefrom.Themoreofthosepresent,thecloserthegeometryapproximatesacurve.However,themore
thereare,thelongertherenderwilltake,andthemorememorythemodelwillconsumetoholdinformation
aboutalltheextravertices,edgesandfaces.
WhichiswherethatSmoothshadingbuttonyouclickedcomesin.ItappliesatrickcalledPhongshading.
Insteadofdoingthelightingcalculationbasedonanormalforeachfaceasthephysicaltheorysaysyoushould,
itstartswithanormalassignedtoeachvertex,andinterpolatesthenormalateachpointonafacefromthe
https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Normals_and_Shading 1/2
2017615 Blender3D:NoobtoPro/NormalsandShadingWikibooks,openbooksforanopenworld
vertexnormalsatitscorners,basedonthedistanceatthatpointtothosecorners.Theresultfoolstheeyeinto
seeingcurved,roundedsurfaceswheretherearentany.
Thiscompletelyviolatesthelawsofphysics.Tostartwith,howcanyoudefineanormalwhichis
perpendiculartoapoint?Butasyoucansee,theresultslookrathergood,withrelativelylittleextra
computationinvolved,muchlessthanactuallygeneratingalltheextrageometry.
Asyoulearnmoreaboutcomputergraphics,youwillcomeacrossmoretrickslikethis.Physicallyaccurate
modellingisstillverydifficulttodo,evenwithmoderncomputers,andtheresultsmaynotlookallthatgood.
Butbyadoptingabitoflateralthinkingthatgoescompletelyagainstphysics,wecanoften,ironically,comeup
withmuchmorerealisticlookingresults.
NotSoSmooth?
Ifyouhavebeenaddinglotsofvertices,edgesandfacestoyourmesh,youmayendup
withdiscontinuitiesinsmoothshadingcausingunsightlyblotches,asshowntotheright.
Assumingyourmeshisconstructedproperly(e.g.noedgesandfacescrosseachotherin
physicallyimpossibleways),themostlikelyreasonforthisisthenormalsinthenewly
addedverticesandfacesarepointingthewrongway.Tofixit,selectthetroublesomepart
ofthemesh(orselectthewholething)inEditmode,andpress CTRL + N to
recalculateallthenormals.Rerenderthescenetoconfirmtheshadingdiscontinuityhas
disappeared.
Retrievedfrom"https://en.wikibooks.org/w/index.php?
title=Blender_3D:_Noob_to_Pro/Normals_and_Shading&oldid=3220056"
Thispagewaslasteditedon19May2017,at16:16.
TextisavailableundertheCreativeCommonsAttributionShareAlikeLicense.additionaltermsmay
apply.Byusingthissite,youagreetotheTermsofUseandPrivacyPolicy.
https://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Normals_and_Shading 2/2