You are on page 1of 2

2017615 Blender3D:NoobtoPro/NormalsandShadingWikibooks,openbooksforanopenworld

Blender3D:NoobtoPro/NormalsandShading
OpenanewBlenderdocument.Deletethedefaultcube,andaddaUVSpheremesh.In
theAddUVSphere(PictureshowsIcoSphere)panelwhichappearsatthelowerleftof
theToolshelf(press T tomaketheToolshelfvisibleifitsnot),setboththeSegments
andRingstoalownumber,e.g.8.Theresultwillbeveryangular,asshowntotheright,
notroundlikeyouwouldexpectaspheretobe.

Press F12 todoaquickrender.The3DviewwillbereplacedwiththeUV/Image


Editor view,showingtherenderedimage,asatright.Press F11 toreturntothe3D
view .

Selectthesphereobject( RMB ).NowlookintheToolshelffortheshadingbuttons:

,andclickonSmooth.Nowtryanewrenderwith F12 .

Asyoucansee,thesurfacesoftheobjectlookalotsmootherandcurved,eventhough
theoutlineorsilhouetteisjustasangularasbefore.

Returntothe3Dviewwith F11 .EnsuretheUVsphereobjectisselected,andyouare


inEditmode.BringupthePropertiesshelfattherightsideofthe3Dviewwith N ifits
notalreadyvisible.LookfortheMeshDisplaypanel,andfindthesettingsforNormals.

.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.

Notethedifferentmeaningof CTRL + N inEditmode.Inallothermodes,itopensanewdefault


Blenderdocument!

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

You might also like