Unity3D基础教程3-4:2D纹理(Texture 2D)

2014-08-12 18:59:23|?次阅读|上传:huigezrx【已有?条评论】发表评论

关键词:游戏, 虚拟现实, Unity3D|来源:唯设编程网

Unity Manual > User Guide > Working with Assets > Texture 2D

Unity 手册->用户指南->与资产合作->纹理2D

Textures bring your Meshes, Particles, and interfaces to life! They are image or movie files that you lay over or wrap around your objects. As they are so important, they have a lot of properties. If reading this for the first time, jump down to Details, and return to the actual settings when you need a reference.

纹理带给你的网格、粒子及界面生命力。它们是图像或电影你覆盖或环绕你的对象。当它们引入时,它们有许多属性。如果在第一时间渲染,跳至Details(详细资料处),并返回动作设置在你需要一个引用时。

The shaders you use for your objects put specific requirements on which textures you need, but the basic principle is that you can put any image file inside your project. If it meets the size requirements (specified below), it will get imported and optimized for game use. This extends to multi-layer Photoshop or TIFF files - they are flattened on import, so there is no size penalty for your game.

为你的对象使用阴影放置指定的需求在你需要的纹理上,但是基本原则是你可以放置任何图像文件在你的项目里。如果它满足需求大小(在下面指定),它将获得引入并为游戏使用组织。这个扩展到多层Photoshop或TIFF文件它们是在引入上变平,因此没有大小损失你的游戏。

Properties 属性

The Texture Inspector looks a bit different from most others: 纹理检视器面板看起来与其它大多数的有点不同
Unity3D基础教程3-3:2D纹理(Texture 2D)

The top section contains a few settings, and the bottom part contains import settings and a texture preview.

顶部部分包含几个设置,底部部分包含引入设置和纹理预览

Aniso Level

不同级别

Increases texture quality when viewing the texture at a steep angle. Good for floor and ground textures, see below.

当子一个陡峭角度观看纹理时,增长纹理质量。能担当地板与地面纹理,见下面。

Filter Mode

过滤模式

Selects how the Texture is filtered when it gets stretched by 3D transformations:

选取当纹理通过3D转换获得伸展时纹理如何被过滤

No Filtering

  无过滤

The Texture becomes blocky up close

纹理变为斑驳向上接近

Bilinear

双线性

The Texture becomes blurry up close

纹理变为模糊向上接近

Trilinear

三线

Like Bilinear, but the Texture also blurs between the different mip levels

像双线性,但纹理也在不同人工处理级别之间模糊

Wrap Mode

缠绕模式

Selects how the Texture behaves when tiled:

选取当纹理平铺时,纹理如何运转

Repeat

重复

The Texture repeats (tiles) itself

纹理它自己重复

Clamp

钳住

The Texture's edges get stretched

纹理的边缘获得伸展

Import Settings 引入设置

Textures all come from image files in your Project Folder. How they are imported is specified by the texture's Import Settings. You change these by selecting the file texture in the Project View and modifying the Import Settings in the Inspector.

纹理全部来自图象文件在你的项目文件夹里。它们如何被引入是通过纹理的引入设置指定的。你更改它们通过选择纹理文件在项目视图里并修改引入设置在检视器面板。

Unity3D基础教程3-3:2D纹理(Texture 2D)
The Texture Import Settings dialog 纹理引入设置对话框

Max Texture Size

最大纹理大小

The maximum imported texture size. A lot of artists prefer to work with huge textures - scale the texture down to a suitable size with this.

最大值引入纹理大小。许多艺术家更愿意与巨大纹理一起工作—伸展纹理到合适的大小

Texture Format

纹理格式

What internal representation is used for the texture. This is a tradeoff between size and quality. In the examples below we show the final size of a in-game texture of 256 by 256 pixels:什么内部表示应用与纹理。这是大小与质量之间的折衷。在下面的例子里,我们显示最终规模由256像素的游戏内部纹理:

RGB Compressed

DXT1

RGB压缩DXT1

Compressed RGB texture. This is the most common format for diffuse textures. 4 bits per pixel (32 KB for a 256x256 texture).

压缩RGB纹理。这是常见的漫射纹理格式。4位每像素(32KB的256*256纹理)

RGBA Compressed

DXT5

RGBA 压缩DXT5

Compressed RGBA texture. This is the main format used for diffuse & specular control textures. 1 byte/pixel (64 KB for a 256x256 texture).

压缩RGB纹理。这是主要的漫射与反射控制纹应用的主要理格式。每像素1位(64KB的256*256纹理)

RGB 16 bit

16位的RGB

65 thousand colors with no alpha. Compressed DXT formats use less memory and usually look better. 128 KB for a 256x256 texture.

65000没有alpha的颜色。压缩DXT格式用于减少内存以及通常好看。128K的256*256纹理。

RGB 24 bit

24位的RGB

Truecolor but without alpha. 192 KB for a 256x256 texture.
没有alpha的真彩。192K的256*256纹理

Alpha 8 bit

8位的Alpha

High quality alpha channel but without any color. 64 KB for a 256x256 texture.

无任何颜色的高质量alpha通道。64K的256*256纹理。

RGBA 16 bit

16位的RGBA

Low-quality truecolor. Has 16 levels of red, green, blue and alpha. Compressed DXT5 format use less memory and usually look better. 128 KB for a 256x256 texture.

低质量真彩。有16位级别的红、绿、蓝以及alpha。压缩DXT5格式的使用少的内存并通产好看。128k的256*256纹理。

RGBA 32 bit

32位的RGBA

Truecolor with alpha - this is the highest quality. At 256 KB for a 256x256 texture, this one is expensive. Most of the time, DXT5 offers sufficient quality at a much smaller size. The main place this is used is for bump maps, as DXT compression there often carries a visible quality loss.

有alpha的真彩—这是最高的质量。在256K的256*256纹理,据此之一是昂贵的。在多数情况下,DXT5提供了一个更小的大小足够的质量。主要地方是用于凹凸图,DXT压缩经常带有明显的质量损失。

Build Alpha From Grayscale

从灰度级建立Alpha

If enabled, an alpha transparency channel will be generated by the image's existing values of light & dark.

如果启用,一个alpha透明性通道将通过图象的存在明暗的值产生

Non Power of 2 sizes

非2的幂的大小

If texture has non-power-of-two size, this will define a scaling behavior at import time (for more info see Texture Sizes section below):

如果纹理有两个幂的大小,这将定义一个在引入时的伸展行为(更多信息看下面的纹理大小节)。

Keep original

保持原件

Texture will be padded to the larger power-of-two size for use with GUITexture component.

纹理将填补大的两个幂的大小与GUI纹理组件一起使用。

Scale to nearest

最近的规模

Texture will be scaled to the nearest power-of-two size at import time. For instance 257x511 texture will become 256x512. Note that PVRTC formats require textures to be square (width equal to height), therefore final size will be upscaled to 512x512.

在引入时,纹理将被伸缩到最近两个幂的大小。对于257*511纹理实例将变为256*512.注意PVRTC格式需要纹理是正方形(宽高相等),因此最终规模将扩大到512*512.

Scale to larger

规模变大

Texture will be scaled to the larger power-of-two size at import time. For instance 257x511 texture will become 512x512.

在引入时,纹理将缩放到大的两个幂尺寸。对于257*511纹理实例将变为512*512.

Scale to smaller

规模变小

Texture will be scaled to the smaller power-of-two size at import time. For instance 257x511 texture will become 256x256.

在引入时,纹理将缩放到小的两个幂尺寸。对于257*511纹理实例将变为256*256.

Generate Cube Map

产生立方体映射

Generates a cubemap from the texture using different generation methods.

产生一个立方体映射从纹理使用不同方式产生。

Is Readable

是可读

Select this to enable access to the texture data from the scripts (GetPixels, SetPixels and other Texture2D functions). Note however that a copy of the texture data will be made doubling the amount of memory required for texture asset. Use only if absolutely necessary. Disabled by default.

选取它启用访问纹理数据从脚本(GetPixels, SetPixels以及其它纹理2D函数)。不过注意,纹理数据的副本将使用双倍内存需要的纹理资产。使用只读绝对必要。默认禁用。

Generate Mip Maps

产生Mip映射

Select this to enable mip-map generation. Mip maps are smaller versions of the texture that gets used when the texture is very small on screen. For more info, see Mip Maps below.

选取启用mip映射生成。Mip映射是当纹理非常小的显示在屏幕上时获得使用的小的纹理版本。更多信息,查看下面的mip映射

Correct Gamma

纠正Gamma

Select this to enable per-mip-level gamma correction.

选取启用每mip级别纠正

Border Mip Maps

边界Mip映射

Select this to avoid colors seeping out to the edge of the lower Mip levels. Used for light cookies (see below).

选取是为了避免颜色渗漏到低mip级别边缘外部。光波烹调使用(看下面)

Mip Map Filtering

Mip映射过滤

Two ways of mip map filtering is available to optimize image quality:

Mip映射过滤的两种方法是可用的优化图形质量。

Box

盒子

The simplest way to fade out the mipmaps - the mip levels become smoother and smoother as they go down in size.

简单的方法淡出mip映射—mip级别变为平滑及平滑作为它们下降的尺寸。

Kaiser

A sharpening Kaiser algorithm is run on the mip maps as they go down in size. If your textures are too blurry in the distance, try this option.
Kaiser钝化算法是运行在mip映射上作为它们下降的尺寸。如果你的纹理是在远处太模糊,尝试这个选项。

Fade Out Mips

淡出Mips

Enable this to make the mipmaps fade to gray the mip levels progress. This is used for detail maps.启用它使mip映射淡出到灰色mip级别处理。这被用于详细映射。

Fade Out start

淡出开始

The first mip level to begin fading out at.

第一mip级别开始淡出。

Fade Out End

淡出结束

The mip level where the texture is completely grayed out.

纹理完成的灰色输出那里的mip级别。

Generate Bump Map

产生凹凸映射

Enable this to turn the color channels into a format suitable for real-time bumpmapping. For more info, see Bump Maps, below.

启用它去更改颜色通道对到一个适合格式的实时凹凸。更多信息,查看凹凸映射,在下面。

Bumpiness崎岖不平

Control the amount of bumpiness. 控制崎岖不平的数量

Filtering 过滤

Determine how the bumpiness is calculated: 确认崎岖不平如何计算的。

Standard 标准

This generates normal maps that are quite smooth. 这样生成的正常映射十分平滑。

Sobel 索贝尔

The Sobel filter generates normal maps that are sharper than Standard.

Sobel过滤器产生比正常标准清晰的映射。Details 详细资料

 

<12>
发表评论0条 】
网友评论(共?条评论)..
Unity3D基础教程3-4:2D纹理(Texture 2D)