1.2 材质与贴图(中英对照)

来自Infinitipedia
跳到导航 跳到搜索
上一页
下一页

1.2. Textures

材质(Textures)

材质大小

  • All ships up to 100m: 2048x2048 (even if it's 10m).
  • All ships over 100m: tiled textures.
  • 所有小于100米的的飞船使用:2048x2048(即使这艘飞船只有10米)
  • 所有大于100米的飞船使用平铺材质。

Vehicles and weapons can use lower-res textures;

地面载具和武器使用稍低分辨率的材质:

  • MK1-: 512
  • MK2: 1024
  • MK3+: 2048

a) Texture complete-ness

a) 材质复合贴图(Texture complete-ness)

3dsmax中材质通道的选择

  • 漫反射贴图(Diffuse map)(在官方材质包中贴图名称后简写为d)放在Diffuse Color通道中
  • 高光贴图(Specular map)(简写为s)放在Specular Level通道中
  • 自发光贴图(Self-illumination map)(简写为i)放在Self-illumination通道中
  • 凹凸贴图(Bump Map)(简写为b)或法线贴图(Normals Map)放在Bump通道中
  • 混色贴图(Miscellaneous map)(简写为m)放在Reflection通道中
  • 环境光贴图(Ambient map)(简写为a)放在Ambient Color通道中

– It is only possible to assign one shader per object. Meaning that if two polygons belong to the same object, they must use the same shader. You normally don't have to assign shaders directly, but if you plan to have some surfaces of your model use different shaders than others, you will have to split this model into multiple objects. An example is if you have parts of your object using an alpha channel, for a transparency/mask effect. Since the shader will be different, you'll have to split polygons of this object in two: the opaque ones, and the transparent ones.

每个对象只可能分配一个着色方式(shader)。意思是如果两个多边形属于相同的的对象,那它们必须使用相同的着色方式(shader)。你一般不用直接分配着色方式(shader),但是如果你计划在模型的表面使用与众不同的着色方式,你必须把这个模型分配到多个对象中。举例来讲,如果你在模型的部分中使用了一个透明通道(alpha channel),来达到透明/遮盖(transparency/mask)效果。之后着色方式会(shader)不一样,你必须把这个对象分成两个多边形:一个不透明(opaque)的和一个透明(transparent)的。

– You do not assign shaders directly ; there will be other tools for that ( at the moment they're manually assigned ). However, you must ensure that the material table is correct.

  • 你不直接分配着色方式:将来会使用其他种工具(在这时候它们是手动分配)。不过,你必须确保材质表(material table)是正确的。

– You can use multiple materials in the same object ( in 3DS Max this is called “Sub-materials” ).

  • 你可以在同一个对象上使用多种材质(在3DS Max中这叫“子材质(Sub-materials)”)。

All sub-materials must share the same texture assignments. For example, you cannot assign a diffuse + specular map to one sub-material, and only a diffuse to another sub-material. All submaterials in that case would need to use diffuse + specular maps, if a sub-material doesn't make use of a specular map, use an empty one ( black ). This also applies for bump maps. You cannot mix in the same object a sub-material with diffuse, and another one with diffuse + bump + spec.

  • 所有子材质必须共用相同的材质分配。例如:你不能同时分配漫反射(diffuse) + 高光强度贴图(specular map)到一个子材质(sub-material),然后只分配漫反射贴图(diffuse)到其他子材质。在这种情况下,所有的子材质需要使用漫反射(diffuse) + 高光强度贴图(specular map),如果一个子材质没有使用高光强度贴图(specular map),那么请使用空白(黑色)(empty one ( black )),这也适应于凹凸贴图。你不能在同一个对象的子材质中一个使用漫反射贴图,而其他使用漫反射+凹凸+高光强度贴图(diffuse + bump + spec)。
    • 简单来说:一个对象(object)必须使用相同的材质分配;换句话说:每个材质需要相同的贴图类型和数量

– Self-illumination maps are optional. By default, if no illumination map is assigned, a black map will be used.

  • 自体发光贴图(Self-illumination)是可选择的。按照预设,如果没有指定发光贴图 ,就使用黑色图(black map) 。

– Opacity maps ( for alpha masking / transparency ) are optional. By default, if you don't assign an opacity map, the whole texture will be 100% opaque ( equivalent to an all-white opacity texture ).

  • 透明度贴图(Opacity maps)(alpha透明遮罩/透明处理( for alpha masking / transparency ))是可选择的。按照预设,如果你没有分配一个透明度贴图,整个材质会100%不透明(相当于成为全白不透明材质)。

b) Textures types

b) 材质类型(Textures types)

This is a summary of the type of textures used in most shaders the I-Novae engine, and that are necessary for Infinity:

这是关于在I-Novae引擎上的多数着色方式所使用材质类型的摘要,这是为Infinity提供创作所必看的:

Diffuse map: is the texture that contains the RGB ( red green blue ) color of the texels. If you are going to use a per-pixel lighting shader ( typically, bump or normal mapping ), ensure that you do not put strong lighting effects in the diffuse map. Lighting is added separately in the shader by using the bump or normal map, so adding strong lighting or shadowing effects into the diffuse map will not look coherent. You can however add subtle lighting effects, or some typical self ambient occlusion.

  • 漫反射贴图(Diffuse map):是像素(texels)中含有RGB(红绿蓝)颜色的材质。如果你要使用逐像素光照着色(per-pixel lighting shader)(如:凹凸或法线贴图(bump or normal mapping)),你得确保不会把光照效果用在漫反射贴图(Diffuse map)中。而是通过使用凹凸或法线贴图在着色中个别的添加光照效果,因此在漫反射贴图中加入强光和或阴影效果时会看起来不自然。不过你还是可以自行加入微光效果(subtle lighting effects)或特定的自反射环境(贴图)(self ambient occlusion)。

Bump map[exclusive with normal maps]: is a grayscale map that encodes the relative heights/altitude of texels compared to the surface. Black areas correspond to holes, while white areas correspond to elevations. The neutral value is middle gray ( 128 ). If you fill a bump map with a uniform, gray color, it corresponds to a perfectly flat surface. Bump maps are automatically converted to normal maps by the engine.

  • 凹凸贴图[排斥法线贴图]( Bump map[exclusive with normal maps]):是一种关于高度/海拔像素(heights/altitude of texels)比对在表面上的灰度等级(grayscale)贴图的编码。黑色区域相当于凹陷,反过来白色区域相当于突起。中等值是中灰色(128)。如果你清一色的使用一张灰色的凹凸贴图,它相当于一个理想的平面。引擎会把凹凸贴图自动转为法线贴图。

Normal map[exclusive with bump maps]: is a RGB map that encodes the direction of the normals for each texels, relatively to the surface. There are two standards: the +Z standard ( the Z axis corresponds to “up” ) and the +Y standard ( the Y axis corresponds to “up” ). Both are supported. 3DS max uses the +Z standard, but internally all normal maps are converted to the +Y standard. Each color component ( red, green and blue ) matches the axis ( X, Y and Z ). The normals are normalized into the [-1,1] range, which is then remapped to the [0,1] range. For this reason, a normal of ( 0, 0, 1 ) will correspond to a texel of color ( 128, 128, 255 ).

  • 法线贴图[排斥凹凸贴图]( Normal map[exclusive with bump maps]):是一种实现每个像素(texel)的法线指向编码,属RBG贴图。有两种规格:+Z规格(Z轴相当于“上”)和+Y规格(Y轴相当于“上”)。两种都支持。3DS max使用+Z规格,但在(引擎)内部,所有法线贴图会转换成+Y规格。每种颜色构成(红、绿、蓝)都对应了一个轴(X,Y,Z)。法线贴图是规范在[-1,1]范围,然后重新映射在[0,1]范围。因为这个缘故,一个位于(0,0,1)的法线贴图会对应到一个像素色(128,128,255)。

Specular map: also called a gloss map. This is a grayscale map that determines how strong the specular effects are for each texel. A black color means no specular at all, while a white color means maximum specular. Specular lighting is used for highlights on metallic / plastic surfaces.

  • 高光贴图(Specular map):也可以称为光泽度贴图(gloss map)。这是一种灰度贴图(grayscale map),决定着各个像素(texel)的反射强度。黑色意味着完全没有反射,相反白色意味着最大反射。高光贴图(Specular map)用于金属和塑料表面的最亮区。

Self-illumination map[optional; default:black]: this map is also grayscale and determines parts of the diffuse texture that emit light due to their intrinsic nature. For example, a ship hull texture might contain small windows. The self-illumination map will be white on the texels belonging to the windows, and black everywhere else. The self-illumination map should not contain any bloom effect ( blurring the edges ), since this effect is typically added in real-time by the engine. Also, be careful to not apply a self-illumination map for texels used in dynamic effects ( like thrusters ). A thruster effect is added in-game if the thruster is used; if you add a self-illumination to the thruster, it will get applied even when the thruster is not functioning !

  • 自发光贴图[可选择;预设:黑色]( Self-illumination map[optional; default:black]):这种贴图也属于灰度贴图(grayscale map),决定着漫反射材质的固有发光属性。例如:一艘船的外壳材质可能包含一些小窗户。自发光贴图在属于窗户的像素(texel)上会是白色的,而其他地方都是黑色。自发光贴图不会包括任何高光(bloom)效果(模糊边缘),因为这种效果是引擎实时加入的。同样注意,自发光效果不要使用在具有动态效果的像素(texels)上(比如推进器)。推进器如果在游戏中使用时,会自动加入其效果;如果你把自发光效果加到推进器上,那推进器在处于停机状态时还会发光!

Opacity map[optional; default: white]: this map is grayscale and is used to determine which texels are opaque ( white ) or transparent ( black ). Intermediary values ( in the grays ) are possible, but transparency requires sorting of the geometry from back to front, so avoid them.

  • (不)透明度贴图[可选择;预设:白色]( Opacity map[optional; default: white]):这种贴图属于灰度贴图(grayscale),用于决定哪个像素(texel)是不透明的(白色)或透明的(黑色)。取中间值(在灰色里)也是可以的,但透明度需按几何从后到前排列,因此最好不要使用

Ambient occlusion map[automatic]: a grayscale map that contains a multiplication factor to dark the diffuse texture. It is separated from the diffuse, because diffuse textures can be tiled, while the ambient maps need to be skinned ( unique UV-mapping ). The generation of ambient occlusion maps can be automated, so you normally don't have to do anything specific for them.

  • 环境闭塞贴图[自动]( Ambient occlusion map[automatic]):一种灰度贴图(grayscale),对上色材质的暗化包含了乘法系数。它与漫反射材质存在区别,漫反射材质可以平铺(tiled),当环境贴图(ambient map)需要蒙皮(skinned)(特殊UV贴图)。环境闭塞贴图(ambient occlusion maps)会自动生成,因此你一般不需要为它们做任何特别的事情。

Miscellaneous map[optional; default: black]: a texture that packs miscellaneous data together, see section e). This is an RGB texture, but each color channel represents different informations.

  • 混色贴图[可选择;预设:黑色] (Miscellaneous map[optional; default: black]):一群混色数据的材质,见:#e) 混色材质(The miscellaneous texture))。这是一种RGB材质,但是每种颜色通道(color channel)代表了不同的信息。

Mutitexture.jpg

Illustration 4: Examples of texture maps

图4:材质图例子

c) Texture files types/names

c) 材质文件类型/名称(Texture files types/names)

Most image formats are supported. It is better to provide textures in a lossless format, or in a very high quality lossy format. Those textures will get re-processed and maybe re-compressed by the ASEToBin tool, so we must avoid at all costs compressing a texture twice.

(引擎)支持大多数图。最好提供无损(lossless)格式,或高质量有损(lossy)格式。那些材质会被ASEToBin工具再处理或重压缩,因此我们必须尽量避免压缩两次。

– The preferred format is lossless compression with TGA, BMP or PNG
– Alternatively, use uncompressed TGA, BMP or PNG
– Finally, use very high quality JPG.

  • 首选lossless压缩格式为TGA,BMP或PNG
  • 或者只使用未压缩的TGA,BMP或PNG
  • 最后,使用非常高品质的JPG

Temporary files ( for example for work-in-progress ) can use lower quality, but make sure to send the highest quality as possible for the final version.

Since the .3DS file format uses a 8.3 format, try to use texture file names that do not exceed 8 characters ( and 3 for the extension, but that's easier ). If you fail at this rule, the material table / bitmap names will have to be fixed manually.

临时文件(比如工作进程中)可以使用较低品质,但是在最终版本中要尽可能的发送高品质。

之后3DS文件格式使用一个 8.3 格式,试着使用不超过8字符的材质文件名(3个字符的扩展名,这样更容易些)。如果你未能遵照这种规则,材质表/位图(bitmap)名称就必须人工修复

d) Texture coordinates / UV mapping

d) 材质坐标/UV贴图(Texture coordinates / UV mapping)

– The engine supports multiple UV coordinates sets, but shaders have to be re-written to take their specific use into account. If you need to use multiple UV coordinates sets, you're probably not using a standard material / shader, so please contact me.

引擎支持多重UV坐标设置,但是考虑到他们的特殊用法,着色方式就必须重写。如果你需要使用多重UV坐标设置,也许你没有使用标准材质/着色方式,请联系我。

–If your object is symmetrical, you can save 50% of the texture space ( or increase the virtual resolution by 100%, depending on your point of view ) by sharing the texture coordinates of one half with the other half. Keep in mind that if your texture contains words ( like a number, a reference, a name ) it will appear mirrored. It is strongly advised to share texture coordinates on symmetric objects. Note: you can do that with pars of an object that gets repeated.. imagine a car with 4 wheels. You could allocate space for only one wheel in the UV map, and have the 4 of them share the same space.

  • 如果你的模型是对称的,你可以保留50%的贴图使用(或增加100%贴图分辨率)以共享贴图坐标的一半跟另一半。记住,如果你的贴图含有文字(比如数字,说明,名称),它就会出现高光反射。在对称物体上共享贴图坐标得慎重考虑。注:你可以在一个物体的某部分重复使用...想象一辆汽车有 4个轮子。你可以只在一个轮子上使用UV贴图——并使其余3个轮子共享这个贴图。

Do not waste too much texture space. The “islands” ( groups of triangles in the texture map ) should be packed together as tightly as possible. Do not keep gaps of tens of pixels between their edges.. they should almost touch each other ! If an “island” has a hole, you can try to fit other “islands” inside this hole.

  • 不要浪费过多材质空间。“islands”(在材质贴图中的三角组)应该尽可能的紧紧捆扎(pack)在一起。不要在它们的边有数十像素的裂口。它们每个边之间应该是近乎接触的!如果一个“island”有一个洞,你可以试着把其他island填补到这个洞中。

–If your ship is modular, try to pack all modules ( wings, fins, gears, etc.. ) within the same texture map. Switching textures costs a lot of rendering performance, so it's better to pack as many textures in a single one as possible, even when objects are separated.

  • 如果你的船是模块化的,试着将所有的模块(翼、鳍、起落架等)放在同一张材质贴图内。贴图转换会牺牲很多渲染性能,所以尽可能将所有材质都放到一张贴图内,尽管这些对象是分离的。

Avoid deformations/stretching of texture coordinates! Your whole object must use a constant resolution in world space. To test this, assign a checkerboard texture to your object, and verify that all the black & white squares have the same visual size. Make sure they appear as squares, and not as rhombus, or with degenerated angles.

  • 避免变形/拉伸材质坐标!你的整个对象/物体必须使用相同的分辨率。要测试是否达到要求,分配一个棋盘格贴图(checkerboard texture)到你的对象/物体上,然后验证全部黑、白方块有相同的视觉尺寸。确认它们成正方形出现,而不是菱形或其他形状。

–Be careful with seams. A curved / smooth surface should be seamless.

  • 当心接缝。一个弯曲/光滑表面应是无缝的。

–Do not generate too many “islands” ( groups of triangles ), as it will make seams more likely to appear, and painting the textures much harder.

  • 不要生成太多"island"(三角形组)。那样似乎会致使更多的接缝出现,使得绘制贴图更加困难。

e) The miscellaneous texture

e) 混色材质(The miscellaneous texture)

The miscellaneous texture is a special kind of texture that can be used to customize the object's appearance.

混色材质是可以设置对象/物体外表的特殊材质。


Custom colors: In-game, players will be able to choose a primary and a secondary custom color. Various parts of the textures ( such as paintings ) should then be colorized by those primary and secondary colors.Custom color should be max 40%.

  • 自定义颜色:在游戏中,玩家可以去选择一个主要色和一个自定义颜色。各个部分的材质(诸如涂装)应该由这些不同颜色组成。自定义颜色应该控制在船体的40%以下

–In order to achieve that effect, paintings and other-customizable pixels in the textures should be left in white ( or gray gradiants ) in the diffuse map. The other types of maps ( self-illumination, specular, bump ) are unchanged.

  • 为了达到这种效果,材质中的涂装和其他自定义颜色(other-customizable)像素应该在漫反射贴图(diffuse map)中保留白色(或灰度等级(gray gradiant))。至于另外类型的贴图(自发光、反射、凹凸( self-illumination, specular, bump ))则不变。

–All pixels of the textures that can be customizable should be painted into a grayscale mask, where zero ( black ) represents the original diffuse color, and one ( white ) represents the playerchosen custom color. As there are two custom colors ( primary and secondary ), there should be two of those grayscale masks.

  • 所有可自定义材质的像素都应该绘制到灰度遮罩(grayscale mask)中——用“零”(黑色)表现原始的漫反射颜色,另一个(白色)表示玩家自定义颜色。当有两种自定义色彩时(主色和副色),则应该有两个这样的灰度遮罩(grayscale mask)。

–The primary color mask should be copy/pasted into the red channel of the “misc” texture; while the secondary color mask should be copy/pasted into the green channel of the “misc” texture.

  • 第一颜色遮罩(color mask)应该复制/粘贴进混色(misc)材质的红色通道(red channel);反之,第二颜色遮罩应该复制/粘贴进混合(misc)材质的绿色通道(green channel)。

–If you are only using a primary color but no secondary color, keep the secondary color mask completely black ( the green channel of the “misc” texture will be black ).

  • 如果你只用主色而没有副色,那副色遮罩就保持完全黑色(混色(misc)材质的绿色通道会是黑色)。

–If your whole texture doesn't use custom colors at all, keep both masks black ( both the red and green channels of the “misc” texture will be black ).

  • 如果你的整个材质全部没用自定义颜色,那就把两个遮罩都保持黑色(混色(misc)材质的红色和绿色通道是黑色)。

Dirt map: when ships fly in atmospheres, dirt accumulates on the hull, between the plating, or near the thrusters. You can paint a dirt map ( grayscale too ) which encodes the maximum amount of dirt that can affect a S/S. Black pixels will appear completely clean, while white pixels will appear dirty.

  • 脏蚀贴图(Dirt map):当船飞入大气时,灰尘积累在船壳上的镀层之间,或者推进器附近。你可以绘制一个(脏蚀(dirt)贴图)(也是灰度贴图)使用编码表现飞船变脏的程度。黑色像素表现完全干净,白色像素则会变脏。

–The dirt effect will darken the diffuse map, and reduce the specular effect on dirtied pixels. It's a completely in-shader effect, so you don't have to worry about how to apply it or mix it with other maps.

  • 脏蚀效果会使漫反射贴图(diffuse map)变暗,所以,在脏蚀像素(dirtied pixel)上使用高光(specular)效果。这是一种完全的内着色效果(指在引擎中实现),因此你无需担心要怎样才能在其他贴图上应用或混合它。

The dirt map is not meant to replace aging textures. If the S/S is so old that it becomes rusty, damaged ( with scratches ), you should use a completely different set of textures. In-game, the engine will determined based on the age of the S/S whether to apply the “clean” textures set, or the “aged” one.

  • 渐脏贴图不意味着取代旧化(aging)材质。如果飞船/空间站变得老化、陈旧,损坏(和很多刮痕);你应该使用一个完全不同的材质设定。在游戏中,引擎会基于飞船/空间站的年龄决定是否应用“干净的”材质设定,或“陈旧的”。

Miscmap.jpg

Illustration 5: Example of player-customized colors applied thanks to the red and green channels of the "misc" texture. Model is the “Volcano MK1” turret from Ebola/spAce/Juan.

图5:由于玩家自定义颜色应用需要由的红色到绿色通道的“混色”材质("misc" texture)。 模型是“Volcano MK1”炮塔,制作:Ebola/spAce/Juan.

f) Texture painting

f) 材质绘制(Texture painting)

– If you are painting tiling textures, make sure there are no visible seams when you tile / wrap textures on the left/right and top/bottom edges.

  • 如果你绘制平铺材质(tiling textures),要确定没有可见的接缝当你平铺/重叠(tile / wrap)材质在左/右边缘和上/下边缘。

–Windows are an excellent way of “giving a sense of scale” to your S/S. Use and abuse of them !

  • 窗户赋予你飞船/空间站以比例感感的好方法。尽情采用!

–Be coherent with your usage of colors. Player-customizable colors ( such as paintings on the hull ) should be painted in gray/white gradiants, and use a mask in the miscellaneous texture ( see section e ). Non-customizable colors should stay coherent: do not mix flashy reds, yellows, blues, greens.. Prefer unsaturated colors: grays, subtle blues/reds, etc..

  • 你的颜色用法要连贯清晰。玩家自定义颜色(比如外壳上的喷漆)应该用灰/白等级绘制,再就是在混色材质中使用遮罩(#e) 混色材质(The miscellaneous texture))。非自定义颜色更应该清晰连贯:不要浮华的混杂着红、黄、蓝、绿……宁可为不饱和色:灰色、微篮/红,等……

–Unless otherwise explicitely stated ( like for vehicles ), do not cover large areas of the texture in paintings. Prefer to use details, stripes / trims / bands, etc..

  • 除非另作明确说明(例如小型交通工具)不要用绘制材质遮盖较大的区域。宁可使用条纹/装饰/带纹…等细节。
上一页
下一页