A Cubemap Texture is a collection of six separate square Textures that are put onto the faces of an imaginary cube. Most often they are used to display infinitely faraway reflections on objects, similar to how Skybox displays faraway scenery in the background. The Reflective built-in shaders in Unity use Cubemaps to display reflection.
一個立方圖紋理(Cubemap Texture)六個獨(dú)立的正方形紋理的一個集合,這些紋理會用在一個虛構(gòu)的立方體上。通常用來顯示無限遙遠(yuǎn)的物體上的反射效果。類似的,天空盒(Skybox?)如何在背景顯示遙遠(yuǎn)的風(fēng)景。內(nèi)置的反射(Reflective?)著色器在Unity使用立方圖(Cubemap),以顯示反射。

A mountain scene Cubemap displayed as a reflection on this sphere
一個山區(qū)場景立方圖顯示為在這個球上的反射
You create Cubemap in one of several ways:
您可以用這幾種方式創(chuàng)建立方圖:
- Use Assets->Create->Cubemap, set its properties, and drag six Texture assets onto corresponding Cubemap "faces". Note that the textures must be re-applied if changed because the textures are baked into the Cubemap Asset and are in no way linked to the textures.
用資源>創(chuàng)建?- >?立方圖(Assets->Create->Cubemap),設(shè)置其屬性,并拖6個紋理資源到相應(yīng)立方圖的"面"。注意紋理如果改變了,必須重新指派,因?yàn)榧y理烘焙成立方圖資源就與紋理沒有關(guān)系了。
- Use the Texture Import Settings to create a Cubemap from a single imported texture asset.
使用紋理導(dǎo)入設(shè)置(Texture?Import Settings)從一個單獨(dú)導(dǎo)入的紋理資源創(chuàng)建立方圖。
- Render your scene into a cubemap from script. Code example in Camera.RenderToCubemap page contains a script for rendering cubemaps straight from the editor.
用腳本把你的場景渲染成立方圖(cubemap)。?Camera.RenderToCubemap頁包含直接從編輯器渲染立方圖的腳本代碼示例。
Properties 屬性
-
Right (+X) 右
Texture for the right global side of the Cubemap face. 立方圖右面的紋理
-
Left (-X) 左
Texture for the up global side of the Cubemap face. 立方圖左面的紋理
-
Top (+Y) 頂
Texture for the top global side of the Cubemap face. 立方圖頂面的紋理
-
Bottom (-Y) 底
Texture for the bottom global side of the Cubemap face. 立方圖底面的紋理
-
Front (+Z) 前
Texture for the forward global side of the Cubemap face. 立方圖前面的紋理
-
Back (-Z) 后
Texture for the rear global side of the Cubemap face. 立方圖后面的紋理
-
Face Size 面大小
Width and Height in pixels across each individual Cubemap face. Textures will be internally scaled to fit this size, there is no need to manually scale the assets.
立方圖每個面的寬度和高度,以像素為單位。紋理將在內(nèi)部縮放,以適應(yīng)這個尺寸,不需要手動縮放資源。
-
Mipmap 多級紋理
Enable to create mipmaps. 啟用多級紋理
-
Format 格式
Format of the created cubemap. 創(chuàng)建立方圖的格式