u3d中texture2D的Advanced设置解析

摘要:
项目中此选项都没打勾,也就是说由于一般texutre都是非线性的,所以进行了sRGB空间下的校正。。m=9f65cb4a8c8507ed4fece7631046893b4c4380146d96864968d4e414c4224610143ab5f076715607d8ce7c7a52ef0f07bbae616f615466e4c096c957dbbf9228258d22376459db0144dc49e48915648037902ba8ef4cb7adf043d2fd8d91810f0f9f&p=823bdf19ba9112a05abd9b7d0c179c&newp=9933d715d9c040ae12acdd2d021485231610db2151d7d6156b82c825d7331b001c3bbfb42323170fd4c37a6105a94f5aecf03677300927a3dda5c91d9fb4c57479c2667d&user=baidu&fm=sc&query=Bypass+sRGB+sampling&qid=8e1c7f91000039e8&p1=13七:SpriteModeSpritemodeSelectshowthethespritegraphicwillbeextractedfromtheimage.SingleThespriteimagewillbeusedinisolation.MultipleMultiplerelatedspriteswillbekepttogetherinthesameimage.图片是否是一系列的,八:GenerateMipMaps勾选会增大内存,生成小图,九:WrapMode面片中texture坐标˃1时texture的copy模式,就是以前的copy啊反响copy啊读取边缘像素值啊。。

u3d中texture2D的Advanced设置解析第1张

经常进行Texture2D的信息设置,以下记录每个属性的意义:

参考手册: file:///D:/Program%20Files%20(x86)/Unity4.7/Editor/Data/Documentation/html/en/Manual/class-TextureImporter.html

一:Non power of 2

Non Power of 2If texture has non-power-of-two size, this will define a scaling behavior at import time. See the Details section at the end of the page.
NoneTexture size will be kept as-is.
To nearestTexture 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.
To largerTexture will be scaled to the next larger power-of-two size at import time. For instance 257x511 texture will become 512x512.
To smallerTexture will be scaled to the next smaller power-of-two size at import time. For instance 257x511 texture will become 256x256.

对texture进行2次幂的扩展

二:Generate Cubemap

Generate Cube MapGenerates a cubemap from the texture using different generation methods.

三:Read/Write Enabled

Read/Write EnabledSelect this to enable access to the texture data from scripts (GetPixels, SetPixels and otherTexture2Dfunctions). 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. This isonly valid for uncompressed and DTX compressed textures, other types of compressed textures cannot be read from. Disabled by default.

一般不勾选,注意:1.会新建拷贝增加内存, 2.只对指定的非压缩和DTX压缩格式有效

四:Alpha from grayscale

Alpha from grayscale(Default mode only) Generates the alpha channel from the luminance information in the image

从texture的灰度图中来设置Alpha值。。

http://blog.163.com/unity_fyc/blog/static/215288100201211270470165/

做视差贴图时,可能会勾选

五:Alpha Is Transparency

Alpha影响透明效果

六:ByPass sRGB Sampling

忽略sRGB采样效果(待更新

1.伽马校正是啥:

主要参考下面冯乐乐的博客,数据从输入到显示经过了两次校正:data-->1--->pixelValue --->CRT显示器-->2-->show

在 1 :场景的亮度值和pixelValue的关系(伽马校正)

2:pixelValue和显示亮度值的关系

通过1和2的处理,尽量保持还原场景的亮度值。

2.sRGB是啥:

sRGB算是一个标准的色彩空间吧。。就像世界坐标系一样。。

项目中此选项都没打勾,也就是说 由于一般texutre都是非线性的,所以进行了sRGB空间下的校正。。

参考:

http://cache.baiducontent.com/c?m=9f65cb4a8c8507ed4fece7631046893b4c4380146d96864968d4e414c4224610143ab5f076715607d8ce7c7a52ef0f07bbae616f615466e4c096c957dbbf9228258d22376459db0144dc49e48915648037902ba8ef4cb7adf043d2fd8d91810f0f9f&p=823bdf19ba9112a05abd9b7d0c179c&newp=9933d715d9c040ae12acdd2d021485231610db2151d7d6156b82c825d7331b001c3bbfb42323170fd4c37a6105a94f5aecf03677300927a3dda5c91d9fb4c57479c2667d&user=baidu&fm=sc&query=Bypass+sRGB+sampling&qid=8e1c7f91000039e8&p1=13

七:Sprite Mode

Sprite modeSelects how the the sprite graphic will be extracted from the image.
SingleThe sprite image will be used in isolation.
MultipleMultiple related sprites (eg, animation frames or separate sprite elements that belong to a single game character) will be kept together in the same image.

图片是否是一系列的,

八:Generate Mip Maps

勾选会增大内存,生成小图,

九: Wrap Mode

面片中texture坐标>1时texture的copy模式,就是以前的 copy啊 反响copy啊 读取边缘像素值啊。。

十:Filter Mode

由于 texture的纹理数据和屏幕像素点大小不可能恰好匹配,需要设置纹素数据到像素点的映射方式。

linear mode 如果理解没错的话,应该是四个像素点的 x y权重比例。。

十一:Aniso Level

反锯齿。。

十二:ios PVRTC4格式:

RGBA Compressed PVRTC 4 bitsCompressed RGBA texture. This is the main format used for diffuse & specular control textures or diffuse textures with transparency. 4 bits per pixel (32 KB for a 256x256 texture)

4bit一个像素点,RGBA 32bit的话,1/8 比如256x256的texture就是 0.5*256*256/1024 = 32KB

十三:android RGB ETC2格式:对支持es2的 进行压缩 需要进行一张aphla通道图的生成。 如果使用etc4 在只支持es2.0的android手机上 还是会拷贝申请新的内存进行解压 然后读取解压后的

RGBA ETC4格式 针对支持es2以上的硬件

免责声明:文章转载自《u3d中texture2D的Advanced设置解析》仅用于学习参考。如对内容有疑问,请及时联系本站处理。

上篇基于OpenGL编写一个简易的2D渲染框架-04 绘制图片css实现小三角(转载+个人笔记)下篇

宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=

相关文章

Unity3D–Texture图片空间和内存占用分析

Texture图片空间和内存占用分析。由于U3D并没有很好的诠释对于图片的处理方式,所以很多人一直对于图集的大小和内存的占用情况都不了解。在此对于U3D的图片问题做一个实际数据的分析。此前的项目都会存在这样或者那样的打包后包大小与内存占用情况的问题,所以这次所以彻彻底底得分析下U3D对于Texture的处理方式。程序里的内存优化请参考《Unity3d优化之...

C#将RenderTexture转为Texture2D

private Texture2D RenderTextureToTexture2D(RenderTexture texture) { RenderTexture RT = RenderTexture.active; RenderTexture.active = texture; Texture2...

[原]零基础学习SDL开发之在Android使用SDL2.0渲染PNG图片

在上一篇文章我们知道了如何在android使用SDL2.0来渲染显示一张bmp图,但是如果是一张png或者一张jpg的图,那么还能显示成功么?答案是否定的 我们需要移植SDL_image库来支持除bmp之外的图片格式。 一、移植SDL_image库: 使用如下命令,从SDLMercurial获取SDL_image的源码: hg clone https://...

[原] OpenGL ES 学习笔记 (一)

1.OpenGL ES 的坐标系在屏幕上的分布 OpenGL ES 的坐标系{x, y, z} 通过图片的三维坐标系可以知道: - 它是一个三维坐标系 {x, y, z} - 三维坐标中心在正方体的几何中心 {0, 0, 0} - 整个坐标系是 [0, 1] 的点,也就是说 OpenGL 中只支持 0 ~ 1 的点 (这里所讲的 0 和 1 ,最好理...

XNA框架基础——从头开始

从头开始 您已经准备好了一切,现在就让我们开始编码吧!本节您将在XNA Studio模板的帮助下创建一个简单的游戏项目,然后在Update和Draw方法中添加少量代码以实现一些小功能。在下一小节学习了SpriteBatch类之后,您将创建您的第一个游戏。 您的第一个项目 打开XNA Game Studio Express,在菜单栏中选择“文件→新建项目...