当前位置 —论文写论文— 范文

光源相关论文范文素材,与英语翻译书籍系列,张道真英语语法珍藏系列相关论文范文

本论文是一篇光源相关论文范文,关于英语翻译书籍系列,张道真英语语法珍藏系列相关电大毕业论文范文。免费优秀的关于光源及平面及什么是方面论文范文资料,适合光源论文写作的大学硕士及本科毕业论文开题报告范文和学术职称论文参考文献下载。

30340;纹理缓冲.】

Additiveimpliesthatthesceneisrenderedoncefromthecameraperspectiveandthecontributionofeachlightisaccumulatedintothefinalrender.Thistechniquecreatesgoodresultsbutisalsoreallyexpensivebecauseeachlightaddsanotherrenderingrun.Wewon'tgointodetailsonhowshadowsworkbecausethisisaplexfield.Manybookscouldbewrittenaboutthistopic,andalso,shadowtechniqueschangerapidlyandareheavilyresearched.Ifyouareinterestedinthistopic,youcanfindinterestingarticlesintheNVIDIAbookseriesGPUGems,theShaderXbookseries,andintheproceedingsoftheSiggraphconference(siggraph./).

【Additive意味着场景在画面视角你可以NVIDIA的有关GPU的宝石系列丛书ShaderX系列丛书中有意义的文章Siggraph(计算机图形图像特别兴趣小组会议记录siggraph./).】

Creatingacamera

【创建一个摄像机】

Sofar,wehavealwaysusedacamerathatwascreatedforusebythe

ExampleApplication.Nowlet'screateoneforourselves.Acamera,asthenamesuggests,

capturesapartofourscenefromacertainposition.Therecanonlybeonecameraactive

ataparticulartimebecauseweonlyhaveoneoutputmedium,thatis,ourmonitor.Butitis

possibletouseseveralcamerasinonescenewheneachoneisrenderedaftertheother.

【目前为止,我们总是使用ExampleApplication类中创建的摄像机.现在让我们自己创建一个摄像机.摄像机,顾名思义在某一特定时间显示器Timeforaction–creatingacamera

【实践时刻——创建一个摄像机】

Thistimewewon'tmodifythecreateScene()function,sojustleaveitasitiswiththe

Sinbadinstanceandshadows:

【这次我们不修改createScene()函数,所以保留Sinbad的实例和阴影.】

CreateanewemptyfunctionnamedcreateCamera()intheExampleApplicationclass:

【在ExampleApplication中创建一个新的名为createCamera()的空函数】

voidcreateCamera(){

}

CreateanewcameranamedMyCamera1andassignittothemembermCamera:

【2.创建一个新的称为MyCamera1的摄像机并把它分配给数据成员mCamera:】

mCamera等于mSceneMgr->,createCamera("MyCamera1"),

Setthepositionofthecameraandletitlookatthenullpoint:

【3.设置摄像机的位置并让其镜头朝向原点:】

mCamera->,setPosition(0,100,200),

mCamera->,lookAt(0,0,0),

mCamera->,setNearClipDistance(5),

Nowchangetherendermodetowireframemodus:

【4.现在改变渲染模式至线框模式】

mCamera->,setPolygonMode(Ogre::PM_WIREFRAME),

Compileandruntheapplication.

【5.编译运行程序.】

Whatjusthappened

【刚刚发生了什么】

WeoverrodethecreateCamera()function,whichinitiallycreatedacameraandsetit

toaposition.Aftercreation,wesetapositionandusedthelookat()functiontosetthe

camerauptolookattheorigin.Thenextstepwedidwassettingthenearclippingdistance.

【我们重写了最初创建摄像机的createCamera()函数并设置它到一个位置.在创建之后,我们设置完它的位置并且使用lookat()函数以设置摄像机的镜头对准原点.我们所做的下一步是设置剪裁的距离.】

Acameracanonlyseepartsofa3Dscene,sorenderingitpletelywouldbeawasteof

preciousCPUandGPUtime.Topreventthis,beforerendering,largepartsofthesceneare

"cutout"fromthescenebytheSceneManager.Onlyobjectsvisibletothecameraare

rendered.Thisstepiscalledculling.Onlythoseobjectsthatarebeforethenearclipping

planeandbehindthefarclippingplanearerenderedandthenonlywhentheyareinsidea

pyramid,thisiscalledtheviewfrustumofthecamera.Theviewfrustumisapyramidwith

thetopcutoff,onlythoseobjectsthatareinsidethecut-offpyramidcanbeseenbythe

camera.Moreinformationcanbefoundatlighthouse3d./opengl/

viewfrustum/.Wesetthenearclippingplaneto5.Whenyouuseahigher-valuepartof

thescenewhichisnearthecamera,itwillbeculledandnotvisible.

【一个摄像机只可以看到部分的3D场景.因为完整渲染需要浪费宝贵的CPU和GPU时间.为避免这种情况SceneManager)将会把大部分的场景从场景中裁剪出去.只有摄像机的课件部分被渲染到.这一步叫做拣选.只有位于远近裁剪面并且在视锥体内部的物体才会被渲染.这被称为摄像机的视锥.视锥没有顶部的锥体.只有在剪裁过的锥体内部的对象才能被摄像机所看到.更多信息可在lighthouse3d./opengl/viewfrustum/中找到】

Thenwechangedtherendermodetowireframe.ThiseffectthatwegetwhenwepresstheRkey,assuggestedbefore,isthesameastheonewegotwhenwewantedtoseetheplanetriangles.WithR,thiseffectcanalsobeundone.Whentheapplicationstarts,wenowseeadifferenceasparedtoearlier,thecameraisnowabovetheinstanceofSinbadandlooksdownonhim.

【然后我们改变渲染模式为线框模式.】

BeforeoverridingthecreateCamera()function,thecamerastartedhoveringslightlyovertheplanelookingattheorigin.WithsetPosition(0,100,200),

wesetthecamerahigherthanbefore,thefollowingscreenshotshowsthechange.Oneinterestingaspectwecanobserveisthatevenafterwehavecreatedourowninstanceofacamera,wecanstillnavigatethesceneasbefore.ThisispossiblebecauseweusedthemCameramembervariablefromExampleApplication.ThiskeepsExampleApplicationincontrolofourcameraandthusitcanbemodified.Oneimportantfeatureofacameraisthatitcanalsobeattachedtoascenenodeandwillreactthesamewayanentitydoeswhenattachedtoascenenode.

【在重写createCamera()函数之前,摄像机的起始位置是悬停在平面上方一点,镜头朝向原点.使用setPosition(0,100,200),设置我们的摄像机到更高的位置.下面的截图显示了改变的效果.】

Haveagohero–doingmorewiththething

【让英雄动起来——做更多的事】

Tryusingdifferentpositionsandlookatpointstoseehowthisaffectsthestartingpositio

1 2 3 4 5 6 7

光源相关论文范文素材,与英语翻译书籍系列,张道真英语语法珍藏系列相关论文范文参考文献资料:

咋写论文

小论文怎么写

如何写物理论文

议论文如何写好

sci论文撰写

如何写议论文

sci论文书写

写sci论文

怎么写物理论文

写论文的思路

英语翻译书籍系列,张道真英语语法珍藏系列(6)WORD版本 下载地址