Ogre中級教程翻譯版_第1頁
Ogre中級教程翻譯版_第2頁
Ogre中級教程翻譯版_第3頁
Ogre中級教程翻譯版_第4頁
Ogre中級教程翻譯版_第5頁
已閱讀5頁,還剩9頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

1、Ogre中級教程7 翻譯by CatDTable of contents目錄 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Introduction Introduction先決條件 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Setting_Up_the_Scene Setting

2、Up the Scene創(chuàng)建場景 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Creating_a_Texture Creating a Texture創(chuàng)建紋理 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Writing_Our_Texture_to_a_File Writing O

3、ur Texture to a File寫出我們的紋理到文件 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Implementing_the_Miniscreen Implementing the Miniscreen實現(xiàn)迷你場景 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Creat

4、ing_a_Material_From_Scratch Creating a Material From Scratch從頭創(chuàng)建一個材質(zhì) HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Using_a_RenderTargetListener Using a RenderTargetListener使用一個渲染目標(biāo)監(jiān)聽器 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Interm

5、ediate+Tutorial+7&structure=Tutorials l Render_to_Texture_and_Shaders Render to Texture and Shaders渲染到紋理和陰影 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Exercises Exercises練習(xí) HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+T

6、utorial+7&structure=Tutorials l Easy Easy簡單 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Intermediate Intermediate中級 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Difficult Difficult困難 HYPE

7、RLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Advanced Advanced地獄(括弧笑) HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Conclusion Conclusion總結(jié) HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?pag

8、e=Intermediate+Tutorial+7&structure=Tutorials l Full_Source Full Source全部代碼 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=Intermediate+Tutorial+7&structure=Tutorials l Next Next下一節(jié)Introduction先決條件This tutorial covers the basics of rendering a scene to a texture. This technique is used for a

9、 variety of effects. It is particularly useful in combination with shaders. Motion blur effects can be created in this way.本教程涵蓋了渲染紋理到一個場景,這個技術(shù)用于制作出各種效果,它在結(jié)合著色器時格外的有用,可以用這種方法創(chuàng)建動態(tài)模糊效果。The basic idea is rather simple. Instead of just sending render information strictly to our render window, we will al

10、so send the information to be rendered directly to a texture in our scene. This texture will then be used like a texture loaded from the hard drive.基本的想法非常簡單,咱在咱的場景里發(fā)送直接渲染的信息到紋理來代替咱發(fā)送嚴(yán)格的渲染信息,這種結(jié)構(gòu)將用起來像是使用一個已經(jīng)被硬盤加載的紋理。The full source for this tutorial is HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.p

11、hp?page=IntermediateTutorial7SourceCurrent o IntermediateTutorial7SourceCurrent here.本教程的完整代碼鏈接。Note:There is also source available for the BaseApplication framework and Ogre 1.7 HYPERLINK http:/www.ogre3/tikiwiki/tiki-index.php?page=IntermediateTutorial7Source o Intermediate Tutorial 7 - source her

12、e.注意:我們同時也準(zhǔn)備了Baseapplication框架和Ogre1.7的資源鏈接。Setting Up the Scene建立場景First, as usual, we are going to set up a basic scene. Add the following variables to your project.首先,和往常一樣,咱準(zhǔn)備建立一個基本的場景,為你的工程添加下面的代碼:BasicApp.hOgre:MovablePlane* mPlane;Ogre:Entity* mPlaneEntity;Ogre:SceneNode* mPlaneNode;Ogre:Rect

13、angle2D* mMiniscreen;Remember to initalize them all in the constructor.記得在構(gòu)造器里面注冊這些:BasicApp.cppmPlane(0),mPlaneEntity(0),mPlaneNode(0),mMiniscreen(0)Finally, well set up the basic scene elements we need. Add the following tocreateScene:終于,咱準(zhǔn)備好了咱創(chuàng)建基本場景所需要的所有元素辣,將下面的代碼扔進咱的createScene()創(chuàng)建場景函數(shù)里:mSceneM

14、gr-setAmbientLight(Ogre:ColourValue(0.2, 0.2, 0.2);/設(shè)置環(huán)境燈光顏色為0.2,0.2,0.2最大值為1Ogre:Light* light = mSceneMgr-createLight(MainLight);light-setPosition(20, 80, 50);/創(chuàng)建MainLight這里沒有設(shè)置燈光的類型,采取了默認(rèn)的設(shè)置mCamera-setPosition(60, 200, 70);mCamera-lookAt(0,0,0);/設(shè)定了攝像機的位置和LookAt(指向)的點Ogre:MaterialPtr mat = Ogre:Ma

15、terialManager:getSingleton().create( PlaneMat, Ogre:ResourceGroupManager:DEFAULT_RESOURCE_GROUP_NAME);/使用材質(zhì)管理器創(chuàng)建了材質(zhì)Ogre:TextureUnitState* tuisTexture = mat-getTechnique(0)-getPass(0)-createTextureUnitState(grass_1024.jpg);/不知道在干啥(括弧笑mPlane = new Ogre:MovablePlane(Plane);mPlane-d = 0;mPlane-normal =

16、Ogre:Vector3:UNIT_Y;/創(chuàng)建一個平面Ogre:MeshManager:getSingleton().createPlane( PlaneMesh, Ogre:ResourceGroupManager:DEFAULT_RESOURCE_GROUP_NAME, *mPlane, 120, 120, 1, 1, true, 1, 1, 1, Ogre:Vector3:UNIT_Z);mPlaneEntity = mSceneMgr-createEntity(PlaneMesh);mPlaneEntity-setMaterialName(PlaneMat);/實體化平面mPlaneN

17、ode = mSceneMgr-getRootSceneNode()-createChildSceneNode();mPlaneNode-attachObject(mPlaneEntity);/將平面綁定到場景節(jié)點中If any of this is confusing, refer to previous tutorials. Compile and run your application. You should see a rotating grass-textured plane.加入你對上面的代碼有任何不太懂的地方,那么你需要復(fù)習(xí)一下前面的教程辣!完成并運行一下你的程序,你應(yīng)該可以看

18、到一個在不停的旋轉(zhuǎn)的草地。Creating a TextureThe first step is to create a texture we can render to. Add the folowing tocreateScene:第一步咱要做的事情就是創(chuàng)建一個紋理以便咱渲染,添加下面的代碼到咱的createScenen()函數(shù)內(nèi):Ogre:TexturePtr rttTexture = Ogre:TextureManager:getSingleton().createManual( RttTex, Ogre:ResourceGroupManager:DEFAULT_RESOURCE_GR

19、OUP_NAME, Ogre:TEX_TYPE_2D, mWindow-getWidth(), mWindow-getHeight(), 0, Ogre:PF_R8G8B8, Ogre:TU_RENDERTARGET);The first parameter of this function is the name to give the texture (RttTex is somewhat standard). The second specifies the default resource group. The third specifies the type of the textu

20、re to be 2D. The fourth and fifth specify the width and height of the texture. The sixth parameter is the number of mipmaps to be used. The seventh is a texture format, and the last is a usage flag.這塊函數(shù)的第一個參數(shù)功能是給材質(zhì)命名,第二個參數(shù)則指定了默認(rèn)的資源包,第三個參數(shù)指定了材質(zhì)的類型為2D,第四個參數(shù)和第五個參數(shù)指定了材質(zhì)的高和寬,第六個參數(shù)則是咱要使用的mipmaps(紋理圖片)的數(shù)量,

21、第七個則是材質(zhì)的格式,最后一個是用法標(biāo)記。There are many different texture formats, but the simplest one is PF_R8G8B8. This produces a 24-bit RGB texture. If you need an alpha channel, then PFR8G8B8A8 will work fine.材質(zhì)的格式有非常多種,但是最簡單的一種就是PF_R8G8B8,是一種24-bit RGB材質(zhì),如果你想修改下透明圖,那么PFR8G8B8A8就能勝任。Next we need to get a pointer

22、to the render target of this texture in order to set some parameters. It will also be used later to add a RenderTargetListener.接下來我們需要獲得一只指針指向紋理的渲染目標(biāo)以便我們設(shè)定一些參數(shù),同時待會也會用于添加RenderTargetListener()渲染目標(biāo)監(jiān)聽器:Ogre:RenderTexture* renderTexture = rttTexture-getBuffer()-getRenderTarget();renderTexture-addViewpo

23、rt(mCamera);renderTexture-getViewport(0)-setClearEveryFrame(true);renderTexture-getViewport(0)-setBackgroundColour(Ogre:ColourValue:Black);renderTexture-getViewport(0)-setOverlaysEnabled(false);After retrieving the RenderTexture, we add the cameras viewport to it. This is the viewport that will be r

24、endered to our texture. We also tell the viewport to clear itself every frame. If we didnt do this, then you would get the infinite trails effect. Try it, its fun. We also set the background color to black, and we disable overlays so that they wont be rendered on top of our texture if we were to use

25、 them.在完成檢索RenderTexture后,咱添加了攝像機的視口進去;這個視口將是咱將要渲染咱的材質(zhì)的視口。咱同時也告訴了視口要清除每一幀,假如咱不這么做,你就會獲得infinite trails effec(無限軌跡效果)。你可以試試看,挺有意思的。同時咱還設(shè)定了背景顏色為黑色,咱還取消了覆蓋,所以呢,在咱不使用他們的時候,他們不會在我們的紋理上面被渲染。Writing Our Texture to a File寫出咱的紋理成一個文件(括弧笑)We are now going to save our texture to a file. RenderTextures are deri

26、ved from RenderTargets so they already have a function to store their content to a file. Before saving the texture, be sure to update it once.咱現(xiàn)在準(zhǔn)備保存咱的紋理成一個文件,RenderTextures源于RenderTargets所以他們已經(jīng)有一個函數(shù)來存儲到一個文件的內(nèi)容,一定要記得更新一次。renderTexture-update();renderTexture-writeContentsToFile(start.png);If you comp

27、ile and run the application now, you will find start.png in the directory that includes your binary executable. It should show the content of your screen.假如你現(xiàn)在你完成了并且運行了你的程序,你會發(fā)現(xiàn)start.png在存放程式碼的目錄里,它應(yīng)該顯示屏幕的內(nèi)容。Note there is also a function calledsetAutoUpdatedwhich will automatically update the Render

28、Texture if Ogres rendering loop orRoot:_updateAllRenderTargetsis being used. Keep in mind that it does not update the RenderTexture immediately when it is called.注意,那里有一個setAutoUpdated函數(shù),它可以自動的更新RenderTexture(渲染紋理),只要Ogre的渲染循環(huán)或者Root:_updateAllRenderTargets開始使用,記住辣!它是不會在被調(diào)用的時候立刻更新RenderTexture的。Imple

29、menting the Miniscreen實現(xiàn)小屏幕Now we will add a miniscreen to the upper right corner of our application window. To do this, well use a Rectangle2D with our RenderTexture applied to it. Our scene will be shown twice. It will be rendered to our RenderWindow normally and rendered a second time on to our m

30、iniscreen.現(xiàn)在咱要添加一個迷你屏幕到我們程序的窗口右下方,為了做到這點,我們將使用一個Rectangle2D和咱的RenderTexture配合,咱的場景將會被展示兩次(或者說咱的場景會有兩個屏幕可以同時觀察,迷你的嵌在大的窗口上),咱的場景將會被渲染到我們的大渲染窗口上,并且還會渲染到迷你的窗口上。You can use this method to create security camera monitors or computer screens with rendered graphics on them. Of course you dont need to simply

31、 replicate the cameras viewpoint. You can attach a different viewport to the RenderTexture, allowing you to do things like remote controlled robots with their own camera that feeds back to a miniscreen.你可以用這個方法創(chuàng)建安全的攝像頭監(jiān)聽器或是電腦屏幕來呈現(xiàn)你繪制的圖形(括弧笑),當(dāng)然你不需要簡單的復(fù)制你的攝像頭的視口,你可以添加一個不同的視口到渲染紋理,這允許你做很多事情,像遙控一個機器人將其

32、攝像頭穿回來到迷你屏幕上。First, well set up the Rectangle2D.首先,咱啟動Rectangle2D:mMiniScreen = new Ogre:Rectangle2D(true);mMiniScreen-setCorners(.5, 1.0, 1.0, .5);mMiniScreen-setBoundingBox(Ogre:AxisAlignedBox:BOX_INFINITE);The first line tells the Rectangle2D to generate texture coordinates. These are what well u

33、se to apply our texture. In the second line we set the coordinates for our miniscreen. These are coordinates that run from the top-left (-1.0, 1.0) to the bottom-right (1.0, -1.0). This places our rectangle in the upper right corner of the screen with a width and height that are equal to 1/4 of the

34、screens dimensions. Youll just have to get used to the fact that a number of different coordinate systems are used in graphics programming. Its not a total loss because understanding simple coordinate transformations like this may help you understand the more complicated transformations youll see in

35、 other areas.第一行我們告訴Rectangle2D生成紋理的貼圖坐標(biāo),這咱準(zhǔn)備貼圖的矩形。在第二行中,咱設(shè)定了迷你屏幕的坐標(biāo),這些坐標(biāo)的范圍從左上角(-1.0,1.0)到右下角(1.0,-1.0)之間,這一塊在屏幕右上角的矩形是主屏幕的四分之一,你得習(xí)慣在圖形編程中使用許多的坐標(biāo)系統(tǒng)(這是冷冰冰的事實),學(xué)會這些你并不虧,因為理解這些簡單的坐標(biāo)轉(zhuǎn)換可以幫助你理解復(fù)雜的系統(tǒng)轉(zhuǎn)換,在其他領(lǐng)域中你也會觸及滴! Now that we have the rectangle, we need to attach it to a SceneNode as usual.現(xiàn)在,咱已經(jīng)創(chuàng)建好了這個矩

36、形,咱依然需要將其綁定到場景節(jié)點中:Ogre:SceneNode* miniScreenNode = mSceneMgr-getRootSceneNode()-createChildSceneNode();miniScreenNode-attachObject(mMiniScreen);If you compile and run the application now, youll see a white rectangle where our texture will soon be.如果你完成并運行了程序,你會在渲染完成的畫面上看到一塊白色的矩形。Creating a Material

37、From Scratch從頭創(chuàng)建一個材質(zhì)The next step is to apply our RenderTexture to the Rectangle2D weve just created. We have to create a material for it. This could be done in a material script or directly in code during runtime. We will use the second method to keep everything to one file for the tutorial.下一步中,咱將

38、應(yīng)用咱的RenderTexture到咱剛創(chuàng)建的Rectangle2D上,咱必需要從頭創(chuàng)建一個材質(zhì)給它,咱可以直接在材質(zhì)腳本中或是咱的代碼中完成它,咱將使用第二種方法以保存這個文件以配合咱的教程使用。Ogre:MaterialPtr renderMaterial = Ogre:MaterialManager:getSingleton().create( RttMat, Ogre:ResourceGroupManager:DEFAULT_RESOURCE_GROUP_NAME);renderMaterial-getTechnique(0)-getPass(0)-setLightingEnabled

39、(false);renderMaterial-getTechnique(0)-getPass(0)-createTextureUnitState(RttTex);The first part creates an empty material called RttMat. Then we disable the lighting to prevent our miniscreen from being darker than the actual texture (if we didnt, the lighting would essentially be applied twice to o

40、ur miniscreen rendering). The last line creates a new TextureUnitState using the RttTex we created earlier.第二部分的代碼創(chuàng)建了一個空的材質(zhì)并命名為:RttMat。然后咱禁用了燈光,一邊咱的迷你窗口變得比咱的實際紋理更暗(如果咱不這么做的話,在咱渲染的時候燈光會被使用兩次!ps:真的變暗嗎?誰去試試后告訴咱)。最后一串代碼創(chuàng)建了一個全新的TextureUnitState(紋理單元狀態(tài))使用咱之前創(chuàng)建的RttTex。Now we simply set this material to be

41、used by our miniscreen.現(xiàn)在,咱簡單的設(shè)定這個材質(zhì)被咱的迷你窗口使用。mMiniScreen-setMaterial(RttMat);If you compile and run the application now, youll see that something is wrong. The miniscreen.has a miniscreen. To solve this well make use of a RenderTargetListener.如果你完成了并且運行了程序,你會看到一些問題,那及迷你窗口里面還有一個迷你窗口里面還有一個迷你窗口里面還有一個迷

42、你窗口里面還有一個迷你窗口*n,為了解決這個問題,我們使用RenderTargetListener(渲染目標(biāo)監(jiān)聽器)。Using a RenderTargetListenerThere may be cases where you only want certain objects from your scene to be used by your RenderTexture. In our case, we dont want our miniscreen to be rendered again in our miniscreen. What we have to do is hide

43、our miniscreen right before the window output is stored to our RenderTexture. This is what we can use the RenderTargetListener for.在很多中情況下,咱只希望一些對象被咱的RenderTexture使用,在咱的程序中,咱不希望咱的迷你窗口里面還有迷你窗口,咱要做的就是在主窗體被保存到咱的RenderTexture之前隱藏咱的迷你窗口,這就是咱的RenderTargetListener的作用!The listener has two important function

44、s for our problem:preRenderTargetUpdateandpostRenderTargetUpdate. The names practically tell you exactly what they do. The first function is called automatically by the listener before the RenderTexture is filled, and the second function is called after the RenderTexture has been filled.為了解決咱的問題這個監(jiān)聽

45、器有兩個函數(shù):preRenderTargetUpdate和postRenderTargetUpdate,這么命名是為了告訴你他們是干啥用的,第一個函數(shù)自動在RenderTexture被填充之前調(diào)用監(jiān)聽器,第二個則是自動在RenderTexture被填充之后調(diào)用監(jiān)聽器。To implement a RenderTargetListener we will simply have our application inherit from RenderTargetListener. This class can be included withOgreRenderTargetListener.h.

46、Add the following to your project:為了實施一個RenderTargetListener咱將讓咱的應(yīng)用程序繼承RenderTargetListener,這個類可以被含OgreRenderTargetListener.h.里,添加如下代碼到你的程序中:BasicApp.h#include class BasicApp : public Ogre:WindowEventListener, public Ogre:FrameListener, public Ogre:RenderTargetListener, public OIS:KeyListener, publi

47、c OIS:MouseListener . / / Tutorial Section / / virtual void preRenderTargetUpdate(const Ogre:RenderTargetEvent& rte); virtual void postRenderTargetUpdate(const Ogre:RenderTargetEvent& rte); .;Then we will add these methods and toggle the visibility off right before updating the RenderTexture and the

48、n right back on afterwards.然后我們將添加這些方法之前,切換可見性更新RenderTexture然后回來之后。(不會翻譯辣,翻譯軟件是這么翻譯的。)BasicApp.cppvoid BasicApp:preRenderTargetUpdate(const Ogre:RenderTargetEvent& rte) mMiniScreen-setVisible(false);void BasicApp:postRenderTargetUpdate(const Ogre:RenderTargetEvent& rte) mMiniScreen-setVisible(true)

49、;All that is left is to add the listener to our RenderTexture so the methods are actually called automatically. Remember, our application has inherited from RenderTargetListener so it can be passed directly as the listener. Add the following tocreateScene, right after we set the miniscreen material:

50、所有這些其實是將咱的監(jiān)聽器添加給咱的RenderTexture并實現(xiàn)自動調(diào)用,記住,咱的程序繼承于RenderTargetListener渲染目標(biāo)監(jiān)聽器,所以他能迅速傳參像一個監(jiān)聽器一樣。添加下面的代碼到createScenen,就在咱設(shè)定迷你窗口的material的那行后面。renderTexture-addListener(this);Compile and run your application. You should have a working RTT texture mapped to your miniscreen.完成并運行程序,你會發(fā)現(xiàn)一個正在工作的Rtt紋理運作在迷你窗口

51、上。Render to Texture and Shaders渲染到紋理和著色器This process is often used together with shaders to create a vast array of effects. So it will be useful to know how to pass a RenderTexture to a shader.這項技術(shù)常于著色器一起工作以生產(chǎn)大量的酷炫特效,所以,知道怎么將一個RenderTexture傳送到一個著色器里是灰常有用的。The simplest case is where the texture never

52、 changes for the shader during runtime. You just have to tell your material script the name of the texture you create during runtime, in our case RttTex. So in your material script, thetexture_unitwould look like this:最簡單的情況就是紋理材質(zhì)在運行時從不改變,你只要告訴你的材質(zhì)腳本你在運行時創(chuàng)建的紋理在我們的RttTex中的名字,所以呢,在你的材質(zhì)腳本中,texture_unti

53、應(yīng)該是這樣子滴:(PS:在這里,不知道你有沒有接觸過材質(zhì)腳本文件,Ogre文件夾下media文件夾內(nèi)的materials文件夾下的script文件夾內(nèi)有很多腳本材質(zhì)文件,均是以.material結(jié)尾,你可以試著用記事本或者是寫字板打開觀察一下材質(zhì)腳本文件)texture_unit texture RttTexIf you need to change the shaders texture during runtime, then you would use the following two lines:如果你需要在運行時修改合成器內(nèi)的紋理,那么你就得使用下面的兩行代碼:Ogre:Mater

54、ialPtr material = Ogre:MaterialManager:getSingleton().getByName(Sepia);material-getTechnique(0)-getPass(0)-getTextureUnitState(0)-setTextureName( OtherRttTex);The first line gets a pointer to the material. The second line sets the desired texture name.第一行代碼獲得一個指針指向material,第二行則是想要得到的材質(zhì)名。After settin

55、g the correct texture name, you can access the texture in your Cg shader with the following line:在調(diào)整紋理名后,你可以進入你的CG合成器,添加如下兩行:(PS:不知道你有沒有接觸CG合成器,OGRE自帶的CG合成器儲存在media/material/programs內(nèi),同樣使用記事本或者寫字板打開看看吧?。﹗niform sampler2D SceneSampler : register(s0)Thats all there is to it. Download the files and try

56、 it out with your application.這是咱所有需要的做的,下載下面連接里的文件然后配合你的程序試試吧。 HYPERLINK http:/www.ogre3/tikiwiki/tiki-download_wiki_attachment.php?attId=151&download=y o RAR archive with sepia material and sepia CG shader RAR archive with sepia material and sepia CG shader(PS:說不定有些童鞋不知道這些文件應(yīng)該放在哪里,在debug和release模式

57、下,ogre/bin文件夾下有兩文件夾分別是debug和release,里面會有一個resources.cfg文件,用筆記本或是寫字板打開后,可以看到里面的資源文件路徑,將medial和cg shader放入這些目錄下!或者簡單的說:放在materil和programs里面。)Exercises練習(xí)Easy簡單Add more objects to your scene and then hide some of them from the RenderTexture using the listener.添加更多的物體到你的屏幕并且在RenderTexture中使用監(jiān)聽器隱藏其中的一些。Intermediate中級Add a second miniscreen that displays the same scene from a different angle.添加第二個迷你屏幕以另外一個角度來查看場景。Difficult困難Set up and display a viewport in your miniscreen other than your main camera.使用一個不同于你的主攝

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論