Blender 灯光基础 第三章.docx

上传人:b****5 文档编号:12304033 上传时间:2023-04-18 格式:DOCX 页数:26 大小:2MB
下载 相关 举报
Blender 灯光基础 第三章.docx_第1页
第1页 / 共26页
Blender 灯光基础 第三章.docx_第2页
第2页 / 共26页
Blender 灯光基础 第三章.docx_第3页
第3页 / 共26页
Blender 灯光基础 第三章.docx_第4页
第4页 / 共26页
Blender 灯光基础 第三章.docx_第5页
第5页 / 共26页
点击查看更多>>
下载资源
资源描述

Blender 灯光基础 第三章.docx

《Blender 灯光基础 第三章.docx》由会员分享,可在线阅读,更多相关《Blender 灯光基础 第三章.docx(26页珍藏版)》请在冰豆网上搜索。

Blender 灯光基础 第三章.docx

Blender灯光基础第三章

AmbientLightingTechniquesinBlender在Blender中的环境光

Ambientlightingisbecominganincreasinglypopularformoflightinginthecomputergraphicsindustry.ThankstothehardworkputinbytheBlenderdevelopers,Blenderv2.5hasthreeambientlightingfeatures,twoofwhichhavebeenaddedwiththeproductionoftheBlenderInstitute'sSintelmovie.

在电脑图形工业,环境光越来越流行。

感谢努力工作在Blender的开发者,Blenderv2.5有三种环境光特征,其中的两个是Blender研究所在开发Sintel影片添加的。

•Ambientocclusion

•EnvironmentLighting

•IndirectLighting

TheBlenderFoundation,theorganizationbehindBlender'sdevelopment,introducedtheconceptofan"openmovie"in2005withtheproductionofElephantsDream.ItwasashortanimatedfilmproducedbytheFoundationtotestandimproveBlenderinaproductionenvironment.Whatmakesthemovie"open"isthefactthatnotonlydidtheFoundationreleasethemovieforeveryonetowatch,buttheyalsoreleasedtheproductionfliesaswell.Thatmeansanyonecanremaketheseprojectsfromthesourcefilesiftheyeverwantedto.Sincethen,theBlenderFoundationcreatedtheBlenderInstitute,astudiodedicatedtoproducingtheseopenmovies,whichhasgoneontocreatetheshortfilmBigBuckBunny,theopengameYoFrankie!

andthecurrentlyin-productionfilm,Sintel.ThegoalofeachoftheseprojectsistoimproveBlenderinsomeway,shape,orform.Formoreinformationabouttheseprojects,visittheBlenderFoundation'swebsiteathttp:

//www.blender.org.

Blender基金会,Blender背后的开发组织,在2005年制作了大象之梦(ElephantsDream)介绍了开源电影的概念。

它是一个由Blender基金会开发的测试和发展改进Blender生产环境。

开源电影实际上不仅仅只是基金会给所有人发布电影观看,它同时都释放影片的源文件。

这意味着任何人都可以使用项目源文件重新制作新影片。

自从那时,Blender基金会创建了Blender研究院,一个致力于生产开源电影的工作室。

它们已经创建了短片大雄兔(BigBuckBunny),开源游戏YoFrankie!

和目前正在生产的影片Sintel。

这些项目的目的是发展Blender的功能,和建立流程。

要更多的了解这些项目的信息,请参观Blender基金会站点http:

//www.blender.org.

Blenderusestwodifferentalgorithmstorenderambientlight—raytracedandapproximated.TheapproximatedmethodofrenderingwasintroducedwiththeproductionoftheBlenderInstitute'sBigBuckBunny.

Blender使用了两种不同的算法来渲染环境光---光线追踪和近似估算方法。

近似估算方法渲染在Blender研究院生产大雄兔(BigBuckBunny)引入的算法。

Blender'sraytracedambientlightingalgorithmisknowntoproducegrainyrenderresultsandlongerrendertimes.It'salsoknowntoproduceaflickeringeffectbetweenframesinanimations,anunwantedresultaddressedbythedevelopmentteambehindtheBigBuckBunnymovie.Tocounterthiseffect,theteamdevelopedanewalgorithmforambientlighting—approximatedambientlighting.BecauseBlenderonlysupportedambientocclusionatthetime,itwasthefirstfeaturetosupportthenewalgorithm.Thisnewfeaturefixedmanyoftheproblemsposedbytheoldalgorithm,fromrequiringlesstimetocomputationalpower,butalsoproducingagrain-freerender.

Blender的光线追踪算法会在最终渲染产生颗粒结果和需要很长的渲染时间。

它都会在渲染动画时候产生闪烁的结果,一些不想要的结果被大雄兔(BigBuckBunny)影片背后的开发组解决,开发组开发了新的环境光算法--近似估算方法。

因为Blender那时仅仅支持ambientocclusion,它第一次支持新的算法。

这个新功能解决了许多旧的算法出现的问题,需要更少的计算时间,而且最后渲染不会出现颗粒。

Let'sexplorehowwecanimplementthesefeaturesintoourownscene.We'lltakealookat:

让我们研究怎么使用这些功能到我们的场景。

我们将看一看:

•Howtoactivatetheambientocclusion,EnvironmentLighting,andIndirectLightingsettings

如何激活ambientocclusion,环境光和间接照明设置。

•Howeachfeatureaffectsourownscene

每个功能如何影响我们的场景

•Howtocustomizeeachfeatureforaparticularscene

如何为特定的场景自定义每个功能

•Whentouseonerenderingalgorithmovertheother

如何在其它的算法使用一个渲染算法

Ambientocclusion环境光

Ambientocclusionisafeatureof3Dsoftwareusedtosimulatetheeffectoflightingrefractingandreflectingoffofobjectsinascene.Inasense,itprovides"evenillumination"ofobjects,similartotheeffectweweretryingtosimulatewithour3-Pointlightriginthelastchapter.Infact,ambientocclusionisn'tanaturallyoccurringphenomenon—justanicelittle3Dtrick.Whencalculatingambientocclusion,Blenderfiresambientlightrays,whichareoccluded,orblocked,byobjectsinthe3Dscene.Whenambientlightisoccluded,itcreatesshadowsanddarkareasinthefinalrender.

AO是3D软件一个在场景模拟光的反射和折射效果的功能。

它在一个场景中提供均匀照明物体,类似于我们上一章的三点灯光布局照明。

实际上,AO不是一个自然发生的现象—而是一个3D小诡计。

当计算AO时,Blender发出的环境光线被物体阻塞,将会在最终渲染时产生阴影或黑暗的区域。

Raytracedambientocclusion光线追踪

Theexactmathbehindambientocclusionisratherdifficulttounderstand,soforthesakeofapplication-basedsituations,we'lljusttakeagenerallookathowBlenderapproachesit.Whenambientocclusionisturnedon,Blendercreatesahypotheticalhemispherearoundtheobjectsina3Dscene.Usingtheamountoflightthatisabsorbed,oroccluded,bytheobjectsinthesceneandhowmuchisreflectedbackintothe"sky"ofthescene,Blenderthencalculateshowthelightwillaffectthemeshanditsshadows.

AO精确的计算背后是相当难于理解的,因为这个原因,我们看看一般Blender是如何表现它们的。

当AO被打开,Blender在3D场景创建一个假想的半球在物体的周围。

在场景的物体吸收和阻塞了部分光线和怎么样反射到场景的天空,Blender然后计算灯光怎么影响物体网格和它的阴影。

Changingtheoptionsandsettings改变选项或设置

WecanaccessBlender'sambientlightingfeaturesbylookingattheWorldmenu.ThefollowingdiagramshowsBlender'sWorldmenu:

我们可以在World菜单访问Blender的环境光功能。

下图显示了World菜单。

AlthoughwecanachieveaprettygoodresultwithoutchangingthedefaultsettingsthatBlendergivesusforambientocclusion,veryrarelydothosesettingsworkineverysituation.Therearevarioussettingsandparameterswecansettofixthatandachievetheeffectwewant.Theseoptionsinclude:

Factor,Attenuation,andSampling.

虽然我们可以不用改变Blender默认的设置只是简单的给个AO就可以实现相当漂亮的效果,在任何情况下都很少做这些设置工作。

我们可以混合这些众多的设置和参数实现我们想要的效果。

这些选项包括:

因子,属性和采样。

ThefollowingimageshowstheraytracedAmbientOcclusionsettings:

下图显示了光线追踪AO设置:

Factor

TheFactorsettingcontrolshowmuchwewantourambientlightingtechniquetoaffectourscene.Forexample,ascenelitwithanambientocclusionfactorof0.3willappearmuchdarkerthanascenelitwithafactorof0.8.

我们想要多少环境光的因子设置来影响我们的场景。

例如一个场景灯光的AO为0.3的因子比起AO为0.8的因子场景更暗。

Inthefollowingimage,thesceneonthelefthasaFactorvalueof0.3,whilethesceneontherighthasaFactorvalueof0.8

下图,左边的场景的因子值为0.3,右边的场景的因子值为0.8.

Takenotethatinorderforambientocclusiontoworkproperlyinourlamp-lessscene,weneedtochangetheblendsettingfromMultiplytoAdd—thisisthesettingnexttotheFactorvalue.Ifwedon'tdothis,therenderwillappearblack.ThisisbecauseBlenderrendersthesceneandthencombinestheresultwiththeambientocclusionpass.ButbecausetheMultiplyalgorithmresultsfavorsblackasthedominantcolor,ambientocclusionseemstohavenoeffectatallduetothefactthattherearenolightsinthescene.

注意为了AO能够在我们却少灯光的情况下可以适当的工作,我们需要将Factor旁边混合设置Multiply改为Add。

如果我们不这样做,渲染将会出现黑色。

这是因为Blender渲染一个场景是通过AO传播的光来渲染的,但因为BlenderMultiply渲染的结果是黑色占优势的,AO在场景中没有灯光的时候是不影响效果的。

WithaFactorvalueof1.0,inthefollowingimage,thesceneontheleftisrenderedwithMultiplyenabled,whilethesceneontherightisrenderedwithAddenabled:

Factor的值为1.0,下图左边是开启了Multiply,而右边是开启了Add:

Sampling采样

Samplingreferstosettingsthatcontrolthequalityoftheambientocclusion,includingthenumberofsamplesandthesamplingalgorithm.

采样是控制AO的质量,包括采样数和采样计算。

SamplescontrolthenumberofraysthatBlenderusestocalculatetheeffecttheambientocclusionalgorithmwillhaveonourscene—thehigherthisnumberis,thebetterourfinalresultwillbe.Thereisadownside,though—asthenumberofsamplesincreases,sodoesthetimeittakesforBlendertorenderthescene.Becausethenumberofsamplescontrolstheprecisionandthequalityoftheresultofthealgorithm,thiswouldmakesense—itwouldtakeacomputermoretimetodomorework.TherearethreeraytracingalgorithmsavailableforBlender:

•ConstantQMC

•AdaptiveQMC

•Constantjittered

采样控制Blender的光线数量用来计算我们场景的AO效果—高的采样数,最终的结果将更好。

这样有一个负面结果---虽然提高了采样数量,但Blender渲染场景的时间也相应提高。

因为采样数控制准确度和计算结果的质量,这将使电脑需要更多的时间进行计算。

Blender有三种追踪算法:

ConstantQMC

AdaptiveQMC

Constantjittered

Wedon'tneedtoconcernourselveswiththedifferencesbetweenthesealgorithms—ConstantQMCisthedefaultalgorithmandusuallygivesthebestqualityinmostsituations.Ifyou'reinterestedinlearningmoreaboutthespecificsaboutQMCsampling,visithttp:

//www.blender.org/development/release-logs/blender-246/qmc-sampling/.

我们不需要担心这些算法之间的不同----ConstantQMC是默认的算法,在太多数的情况下能够提供最好的渲染结果。

如果你对学习ConstantQMC有兴趣,参观http:

//www.blender.org/development/release-logs/blender-246/qmc-sampling/.

Attenuation

Attenuationdealswithdistanceandfalloff.ThedistanceparametercontrolsthelengthoftheraysBlenderusesinocclusioncalculation.Ifthefalloffsettingisactivated,itcontrolstheamountofenergyfallofftheserayshave.It'ssimilartothefallofffactorofBlender'slamps—thissettingdetermineshowmuchenergyislostasyoudistanceyourselffromthesourceofthelamp.TheStrengthsettingservesasamultiplierfortheDistancevalue,meaningthehighertheStrengthvalueis,theshortershadowswilllookinthefinalrender.

Attenuation处理随着距离而衰减。

这个距离参数控制Blender在AO计算的光线长度。

如果falloff设置被激活,它控制energy的衰减数量。

它类似于Blender的灯光衰减(falloff),这些设置确定是到你光源的距离丢失了多少的能量。

Strength设置对于距离是倍增的,意味着高的强度值,最终渲染的阴影就越短。

WithaFactorvalueof1.0inthefollowingimage,thesceneonthelefthasFalloffdisabled,whilethesceneontherighthasFalloffenabledwithaStrengthvalueof2:

在下面的图像左边的是没有激活Falloff的Factor值为1.0.右边的场景开启了Falloff,Strength值为2.

WhathappenedtotheInfluencesettings?

什么影响设置?

TheInfluencesettings,similartotheBlendingsettingsfoundinpreviousversionsofBlender,havebeenremovedinBlenderv2.5andreplacedwithtwoblendingoptions:

MultiplyandAdd.。

影响(Influence)设置,类似于混合(Blending)设置是以前版本的设置,在Blender2.5已经被移除代替的是两个混合选项:

Multiply和Add.。

Energyandcolor能量和颜色

JustasyoucansetandadjusttheintensityandcolorofBlender'slamps,youcansetandadjusttheintensityandcoloroftheocclusionaswell.

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 幼儿教育 > 家庭教育

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1