XNA Content Pipeline系列最後一篇,這邊只有說到範例之前...

Most of these importers are probably familiar to you, but one worth discussing is Autodesk FBX. FBX is a 3D transport file format that allows you to move 3D scene data across many different content creation tools. Not only is FBX supported in most commercial 3D tools,  it's also supported in many shareware and freeware tools. Even outside of that, we tried hard to pick formats that multiple tools can consume and write.

譯 :

這些importers有些可能你已經很熟悉,這邊有一個比較值得討論的格式就是Autodesk FBX.FBX是一個3D轉換檔案格式,准許你將一個3D場景資料,移動到不同的建立工具上面。FBX不僅可以支援大部份的商業3D工具軟體,同時很多的分享軟體和自由軟體都支援。除此之外,我們努力嘗試抓取它們的格式,讓多數的工具可以處理它們。

After the importer has done its job, the data exists in our content DOM. The term DOM is used simply to represent a collection of classes or a schema (like an XML file). The data sits in the content DOM as strongly typed data. That means the data is represented in a well-known format, so, for example, a series of vertices or texture data looks the same no matter what file it came from. This point is important in order for the next step to work properly. This file can be written out to disk as XML for debugging, but it's "lossy," which means the importer only stored the data it cared about.

譯 :

importer處理完這些工作以後,這些資料就存在我們的Content DOM裡面。DOM是被用來簡化描述一個類別或是一個概觀的集合(他就像是XML檔案)。這些資料放在Content DOM當作型態資料,也就是說這些資料格式,已經是我們知道的格式,所以舉個例子來說,一組的文理或是向量資料,看起來是一樣的,無論這些檔案是從哪裡來的。這點是很重要的,也是為了下一步做準備。這個檔案可以被寫在硬碟上面當作一個XML給除錯器用。但是這樣卻是很鬆散的,也就是說importer只儲存他所在意的資料。

A processor is responsible for taking data from the content DOM and creating an object for you to use at run time. This object can be as simple as a model, or as complex as multiple processors for your game. The XNA Framework Content Pipeline includes a few processors that ship out of the box such as Model (for simple objects with textures), Texture2D (for sprites or to combine with a Model), and Effect (For handling your Model's materials). This means you no longer need to worry about, for example, vertex buffers or triangle strips, but you might still want more flexibility with your content, since your game’s world may not be built on simple Models alone.

譯 :

處理器(processor)負責取出從Content DOM的資料,並且建立一個物件給執行期間(run-time)使用。這個物件,可以像一個模型一樣簡單,或是像多處理器一樣的複雜在你的遊戲中。XNA Framework Content Pipeline包含一些處理器,處理一些事情,像是模型(對於一個簡單的紋理物件)Texture2D(對於圖片或是跟一個模型組合)Effect(對於處理你的模型的材質-這邊的材質比較偏向是光線處理)。這也就是說你不必再擔心,頂點暫存器(vertex buffer)或是triangle strips(這個就是說你要將一個模型,用三角型的方式分割呈現,有三種方式可以做,如果用DirectX設計的話,這邊就一定會設定到,因為你要決定你要用甚麼方式呈現模型),但是你可能希望你的Content可以在更有彈性點,自從你的遊戲世界可能不是用一個簡單的模型來建立。

出處  (英文)
arrow
arrow
    全站熱搜

    teexit1224 發表在 痞客邦 留言(0) 人氣()