Blender灯光和渲染第五章.docx
《Blender灯光和渲染第五章.docx》由会员分享,可在线阅读,更多相关《Blender灯光和渲染第五章.docx(24页珍藏版)》请在冰豆网上搜索。
![Blender灯光和渲染第五章.docx](https://file1.bdocx.com/fileroot1/2022-11/24/d6aa05cf-80aa-41b1-bec6-b7287b1932e2/d6aa05cf-80aa-41b1-bec6-b7287b1932e21.gif)
Blender灯光和渲染第五章
IndoorLighting:
SettingUp室内灯光的建立
Nowthatwe'refamiliarwithhowtolightascenewiththecharacteristicsofoutdoorlighting,it'stimetotakethenextstepandlookatlightinginteriorspaces.Manyofthetechniquesweusedtolightourlastscenewilltransfertothisprojectquitenicely.
现在我们已经熟悉了典型的场景照明,现在看看室内空间。
在上个场景我们用来照明的技术都可以非常适当的转到这个项目。
However,therearesomeimportantdifferencesthatwe'regoingtohavetodiscussthatareuniquetointeriorlighting.We'regoingtotakealookat:
然而,它们有一些很重要的不同之处,我们将讨论这些室内灯光的不同之处。
我们将要学习的是:
•Settingupoursceneforusewithacomplexlightingsystem
使用复杂的灯光系统设置我们的场景
•Implementingamorecomplexlightingsystem
使用更复杂的灯光系统
•Settinguplightstoreflectartificiallightsinourscene,intuitively
在我们的场景建立人造的反射灯光。
Let'sgetstarted!
准备开始学习!
Thefirstfewsteps第一步
Beforewebegin,weneedtoknowwhatourscenelookslike.Ifyouhaven'talready,gotothewebsite(anddownloadthefileinterior.blendfromtheInteriorLightingdownloadsection.Thisisthefilewewillbeusingoverthecourseofthisproject.
在我们开始前,我们需要知道我们的场景是怎么样的。
如果你没有场景,到站点Lighting下载interior.blend文件。
这个文件将被用在我们的课程项目。
Ifyouopenit,itshouldlooksimilartothefollowingimage:
如果你打开了该场景,应该看到类似如下的图像:
Divingin
Nowthatwehavetherightscene,let'sgetstarted.Inthelastproject,thefirststepwelearnedwastoevaluateourscene.Inourcase,wearereallygoingtohavetocarefullyconsiderhowwe'regoingtosetupourlights.Let'stakeamomentandtakealookatthatnow.
现在,我们有正确的场景,让我们开始。
在上一个项目,第一步学习了评估我们的场景。
在我们的案例,我们必须认真的考虑怎么建立我们的灯光。
让我们现在去看看。
Enhancingourrenderusinglayers
Withmorecomplexscenes,Blender'slayersystembecomesaninvaluabletoolforlighting.Manytimes,we'llfindthattherearesomeobjectsthatneeduniquelightingsetupsthataren'tnecessarilyneededfortheentirescene.Tosetupthoseunique"mini"lightrigs,weneedtolinkcertainlightstospecificlayers,whichwelearnedhowtodointhelastproject.Butwehaveaproblem—rightnow,oursceneisallononelayer.Thismeans,wehavetodecidehowwewanttobreakuptheobjectsinourscenesowecanlightthemproperly.
对于更更复杂的场景,Blender的层变成一个非常重要的工具。
许多时候,我们发现一些物体需要独特的灯光系统,但又不需要应用到整个场景。
要建立这些“迷你”的灯光系统,我们需要在特定的层创建灯光,在上个项目我们已经学习了这样的做法。
但现在我们有一个问题是—我们所有的场景都在同一个层。
这意味着,我们要怎么打破我们的场景物体让我们可以适当的照明它们。
Let'stakeaquicklook
Beforewebegin,weneedtofigureoutwhatkindofmoodwewanttoset.Forthisscene,we'regoingtowanttofocusonthewinebottleintheforeground,mutingthebackgroundabitusingdarkerlightingandaslightchangeinfocus.Thiswillmakethewinebottlethemostprominentaspectofourscene.
在我们开始前,我们需要明白我们需要设置的气氛种类。
对于我们的这个场景我们想要的是聚焦在我们的葡萄酒瓶,让背景使用暗色的灯光让我们的葡萄酒瓶在场景更突出。
Now,let'sfigureoutwhereourlightwillprimarilybecomingfrom.Wehavetwophysicalsetsoflightsourcesinourscene—thehanginglampsontherightandtheembeddedceilinglampsontheleft.WecanuseSpotlampstosimulatethehanginglampsontheright,andfortheothers,wecanuseArealamps.NotethattheseBlenderlampsaren'tvisibleintheBlenderfile;infact,theydon'tevenexistyet.Wearegoingtoaddthemtogetherlaterinthechapter.
现在,让我们看看我们场景的灯光来自哪里。
在我们的场景设置有两组光源—在右边的挂灯和左边的天花灯。
我们使用聚光灯(Spot)来模拟我们右边的挂灯,对于其它的灯光,我们使用区域(Area)灯光。
注意这些Blender灯光在这个Blender文件是不可见的;甚至它们还没有存在这个场景。
我们将在本章的后面添加它们。
Addingtheselampswilllightagoodmajorityofourscene,butwestillneedtolightthewinebottleinawaythatmakesitstandoutfromtherestofthescene.Becausethisisthefocusofourscene,we'regoingtouseacompletelyseparatelighttolightit.Inorderforustoseparatetheselightrigsproperly,we'regoingtoneedtosetupoursceneinlayers.
添加这些灯光能够很好的照明我们的场景,但我们还需要照明葡萄酒瓶,确保它从场景中突出来。
因为它是我们场景的焦点,我们将完全使用一个独立的灯光来照明它。
为了适当的分离这些灯光系统,我们将需要建立我们的场景层。
Organizingourlayers组织层
Intherealworld,objectsweseeareaffectedbyallavailablesourcesoflight.Incomputergraphics,though,wehavecompletecontroloverhowlightaffectsourscene,andasaresult,wehavetheartisticlibertytocreateeffectswithlightthatmaynotnecessarilyoccurinanaturally-litscenarioforthesakeofvisualappeal.InBlender,wecanseparateourlightsourcesusingthree-dimensionallayers,whichbehaveinthesamewayaslayersinAdobePhotoshoportheGIMP.Bydefault,Blenderassignseverynewobjectwecreatetothefirstlayer,butwecanmovetheseobjectsaroundtofittheneedsofourscene.
在真实的世界,物体是由所有的光源的影响。
在电脑图形领域,虽然,我们可以完全控制灯光是怎么影响我们的场景,结果是,我们可以创建许多在我们自然界不会发生的艺术效果。
在Blender,我们可以像AdobePhotoshop或GIMP那样使用层单独分离我们的光源,Blender指定新的物体创建在第一层,但我们可以移动它们到其它的层。
Decidingwhichlayerstousesolelydependsonthepreferencesoftheuserandtheneedsofthescene.Aslongasthelayersareusedinawaythatproducesthedesiredresultintherender,thereisno"wrong"waytousethem.Let'stakealookathowwecanuselayersinourownscene!
使用哪一个层取决于用户的喜好和场景的需要。
既然层是以这样的一种方式来实现想要的渲染结果,这是没有错误的使用方法。
让我们看看怎么在我们自己的场景使用层!
Weknowweneedtolightourwinebottleseparately.Thismeansthatweneedtohave,attheveryleast,thewinebottleandthetableit'son,placedonalayeroftheirown.Forlogic'ssake,we'regoingtoleavethesetwoonthefirstlayertostart.Becausethewinebottleisthefocusofthescene,itmakessensetohaveitontheprimarylayer.Becausewe'renotsurewhetherornotwe'regoingtoneedtobreakupourscenefurther,let'splaceeverythingelseinoursceneonthelayerdirectlybelowthefirstlayerontheMovetoLayerdialogbox.That'sprobablyconfusingtotakeinallatonce,sohere'sanimagetohelpyou.
我们知道我们需要单独的照明我们的葡萄酒瓶。
这意味着我们需要,至少需要葡萄酒瓶和桌子在一个单独的层,所以首先我们需要的是让它们从第一层分离。
因为葡萄酒瓶是场景的焦点,它制造场景在在最原始的层。
因为我们不确定我们将来是否或不需要分离我们的场景,我们在MovetoLayer对话框的第一个层创建我们所有的物体。
这全部同时或许是很混乱的。
所以这里有一个图像可以帮助你。
Todothis,followthesesteps:
要做这些,跟随以下的这些步骤:
1.Selecteverythinginourscene,exceptforthewinebottleandthetableit'son.Theeasiestwaytodothisistoselecteverythinginourscene,withtheexceptionofthecamera,andthendeselectthewinebottleandtable.
选择场景的所有东西,除了葡萄酒瓶和它所在的桌子。
最简单的方法是全选所有的物体,然后取消选择葡萄酒瓶和它所在的桌子。
2.PresstheM-hotkeytobringuptheMovetoLayerdialogbox.
按M键弹出MovetoLayer对话框。
3.Selectthelayerbuttondirectlybelowthecurrentlayer(thefirstlayer).
选择想要的层。
Thismoveseverythingselectedtothedesignatedlayer.
这将移动所有选择的物体都指定的层。
Let'sassumeforamomentthatwe'regoingtousea3-Pointlightrigtolightourwinebottlesimilartothelightrigweusedforthetricycleinourlastproject.Thismeansthatwe'regoingtowantourkeylighttolightboththewinebottleandthetable.Weneedthislighttoaffectthetablesowecanrenderanyshadowscastbythewinebottle.
假定我们使用类似我们上章节所使用的三点照明系统照明我们的葡萄酒瓶。
这意味着我们需要主光照明我们的葡萄酒瓶和桌子。
我们需要照明桌子效果让我们能够渲染任何的葡萄酒瓶产生的阴影。
Thesidelightandrimlight,ontheotherhand,onlyneedtoaffectthewinebottleitself,notthetable.Thismeanswe'regoingtohavetomovethetableoncemore,thistimetolayertwo.Followingthesamestepsweusedtomoveourobjectsthefirsttime,selectthetableandmoveittothesecondlayer.Thesecondlayeristhelayerbuttondirectlytotherightofthefirstlayerbutton.
补光和边缘光,在另一方面,仅仅需要影响葡萄酒瓶本身,不需要影响桌子。
这意味着我们将要再次移动桌子,这次移动到层2.跟随着下面和第一次同样的步骤,选择桌子物体并移动到第二层。
第二层在第一层按钮的右边。
Let'stakeamomentandquicklyreviewwhatwe'vedone.Asofnow,weshouldhave:
让我们看看我们应该怎么样做:
•Movedeverythinginourscene,withtheexceptionofthewinebottle,thetableunderneaththewinebottle,andthecameratothelayerdirectlybelowthefirstlayerbuttonintheMovetoLayerdialogbox
移动所有场景的物体。
除了葡萄酒瓶,桌子,和相机到MovetoLayerdialog到对话框的第一层。
•Movedthetableoncemorefromlayeronetolayertwo
移动桌子物体到第二层
Turningtheoryintopractice理论转为实践
Wehaveavisionforoursceneandweknowhowwe'regoingtoimplementthatvision.Now,allthat'slefttodoistodoit.We'regoingtobreakthisdownintosmallersteps—thislightingsystemisgoingtobecomefairlycomplicatedfast,andthelastthingwewantistogetconfusedandallturnedaround.Let'sbreakdowntherestofthelightingsectionofthisprojectintothefollowingsteps:
我们的场景有一个版本并我们知道如何去实现这个版本。
现在
1.Setupthegeneralrig.Thisincludeslampsforthehanginglightsourcesandtheceilinglights.We'renotgoingtoworryaboutlightcoloratthispoint.Withalightrigthiscomplex,we'regoingtowanttomakesurefirstandforemostthatthelightintensityisbalancedwellbeforewestartworryingaboutthedetails.
建立普通的系统。
这包括悬挂的灯光和天花灯。
现在我们不需要担心灯光颜色。
对于这个复杂的灯光系统,在我们开始考虑细节前,首先考虑的是灯光强度。
2.Setupthe3-Pointrigforthewinebottleandtable.
为葡萄酒瓶和桌子建立三点灯光系统。
3.Setthelampcolorsandsettheambientlightingsettings,ifapplicable.
设立灯光的颜色并设置环境光,(ambientlighting)如果有。
4.Tweakuntilsatisfied.
细微调整直到满意。
Settingupthegeneralrig建立一般的灯光系统
Thisstepisbyfarthemoststraightforwardstepforthisproject.Wearesimplygoingtoplacelampsdirectlyontopofthealreadyexistingthree-dimensionalmodelsinourscene.
对于这个项目这个是最普通的系统。
我们直接放置到我们场景的三维模型的顶部。
AddingSpotlamps添加聚光灯
Tostartwith,let'ssetupthelightsforthehanginglightsontherightsideofourcomposition.We'resimplygoingtocreate,position,andeditonelight,thenduplicateittofittherestofthelights.
让我们开始为我们的作品右边的悬挂灯建立光源。
我们只需要简单的创建第一个光源,然后复制到其它的悬挂灯。
1.ChangeintotheTopviewandmakesureyou'reinwireframemodebypressingtheZ-hotkey.
切换到Top视图并按Z键确保为线框模式。
2.AddaSpotlampbyselectingAdd|Lamp|Spot.
通过选择Add|Lamp|Spot添加一个聚光灯。
3.UsingtheG-hotkey,positionitsoit'sdirectlyinthemiddleofthelampshadeofthehanginglightclosesttothecamera.Referto