Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


Warning

Please note that many example images shown in this article state that Material Diffuse Color should be 186/187. This was correct on earlier iterations of the PBR implementation but is no longer the case.

Diffuse Color should always be 255,255,255 to get the maximum information from the texture. These example images will be updated with current information in the future.

Overview

Table of Contents
maxLevel3
minLevel2
excludeOverview

Photoshop set up for Physically Based Shaders

The first thing we have to do is set up Photoshop correctly. When working with Physically Based Shaders you have to be aware that the default RGB color space is sRGB. In sRGB space, a 50% mid-gray is not 0.5 or 127 but rather 0.5 raised by the inverse of gamma 2.2, which equals 187 in Photoshop. In a nutshell, the reason that sRGB is used is to avoid banding artifacts (and to use a conservative range of values to avoid misrepresentation on the typical non-calibrated monitor). In sRGB space you get more precision for darker colors to which the human eye is more sensitive. Before working on colors, please make sure that your screen is calibrated properly.

To achieve that, we have to go to "Color Settings". To get there we go to "Edit" and then select "Color Settings...". The RGB should be set to sRGB and Gray to Gray Gamma 2.2.

By default, Gray is usually set to Dot Gain 20% which will result in a color transformation in the alpha channel. In this case, a value of 127 will come into the engine as 104, which can cause inconsistencies, so please make sure Gamma 2.2 is used instead.

Image Modified

Image Modified

After Photoshop has been set up we can get our correct values by looking at the chart and "color" picking the values. Please remember that your Gloss Map goes into the Alpha of Normal Map.

Here are the values for all the materials. To get the values "color" pick the swatches. Please click on the image to download the .bmp source file (it is uncompressed and gives you the true values) and DO NOT color pick from the images here in the document since it's a .jpeg, meaning it's compressed and therefore will give you the wrong values!

Image Modified

Image Modified

If you want to understand more about Physically Based Shaders and how they work, please see: Physically Based Shading.

Specular Texturing for Physically Based Shaders

As we're using physically based shading for our project and truly being "next gen", the gloss map is one of the most important map if not the most. It requires a different thinking in how we use our specular maps.

The gloss maps have to be treated like a diffuse texture and customized according to it and in some occasions painted like one. If you don't use any metals or your asset has no metal parts, then we don't use a spec map at all.

All the gloss maps go into the Alpha Channel of the Normal Map.

Material types

There are only two categories of substances which are relevant for rendering: metals (conductors like iron, gold, copper, etc.) and non-metals (dielectric materials like plastic, stone, wood, skin, glass, etc.). Both have special characteristics regarding diffuse and specular reflectance.

Metal absorbs all light that enters underneath the surface; hence metal has no diffuse reflection. This means that metal should have a black diffuse color. All visible light is reflected directly from the surface (specular reflectance). The different types of metal have characteristic specular colors.

In contrast to metal, non-metal has diffuse reflection; however the specular reflection is a lot weaker and less varied than for metal. Specular reflectance for non-metal is monochromatic (no color, just gray). Most non-metals reflect only a small fraction of the light as specular - for most materials between 2% and 5%.

Specular Color and what it does to the asset

The specular color defines how much light gets reflected immediately from the surface when the light source is directly above the surface. This is the minimum specular intensity, under grazing angles it will increase due to the Fresnel effect. As the specular color is specific for a certain type of material, it can also be considered as a mask for the type of material/substance. The specular color is a physical value which should be picked directly from a reference table. As such, it does not leave much artistic freedom.

Most non-metals reflect 2% to 5% of the light as specular and the highlight is monochrome/gray. As the variation is so little, it is often enough to use a constant specular color instead of a specular texture map. However, if metal and non-metal are mixed in a single texture, it is required to use a specular map, as metal has a much brighter specular color than non-metal. If a specular map is used, the specular color in the material editor should be set to white which is 255/255/255, as it gets multiplied with the values from the specular map and would otherwise lower the physical values from the map.

If no metal is used in the texture your spec map should be white and the specular color values based on provided by the "Physically Based Shading" image. You can get it again by clicking this link.

Gloss values and what they do to the asset

Another big thing to keep in mind is how gloss works and how it should be used.

Gloss defines the roughness of a surface. A low gloss value means that the surface is rough while a high value means the surface is very smooth and shiny. The roughness influences the size and the intensity of specular highlights. The smoother/glossier a surface is, the smaller the specular highlight will be. A more narrow/smaller highlight will at the same time be brighter in order to obey to the rules of energy conservation.

Most materials should have a gloss map, as it can give a lot of variation to the shading. Gloss is closely related to normal maps, as high frequency details in a normal can create some feeling of roughness as well. However, gloss is more the micro-scale roughness of the material.

With this we can paint our maps dictating how much usage parts of an object has gotten (since a heavily worn parts of an object is smoother and the it will have a tighter gloss and more reflectivity than parts who haven't been used that much)

Image Modified
Based on these basics we need to start thinking on how to set up our gloss map. This is the most important step in setting up your gloss map!

  • The general value for non metals is between 53 and 61.
  • The Gloss map always goes into the Alpha channel of the Normal map.
  • No Spec map is needed unless you have Metals or your asset has metal parts.

How to texture for Physically based shading

The most important maps for Physically based shading are your gloss and normal maps. You should start texturing with those two maps alone, which will help you to define your surface, and then as a last step add your diffuse map.

The diffuse texture itself should have no lighting information at all.

Exporting your Normal Map with your Gloss Map out of Photoshop

Gloss and normals kind of belong together. The normal map defines the bumpiness of a surface on a macro scale while the gloss is the roughness on a micro scale.

The two maps are the most important for shading detail, so you should starting to texture with your normal map and your gloss map. Once you achieved the desired result, you should start working on your diffuse texture. Please remember that your diffuse should have no lighting information at all.

The gloss map needs to go always into the normal map alpha, even if you're using a spec map for your metals and metal containing surfaces.

To export your normal map with the gloss in the alpha channel, name it and always add the suffix _ddna (in this case courtyard_wall_arch_marble_ddna).

Image Modified

Image Modified

Examples of gloss maps and how to set up the shaders

Following are some examples with explanations of how the gloss map is affecting the asset and how it defines the material. It is also explained and showed how a gloss map should look to achieve the desired material and look.

These examples are placed on Orbs in the Asset Zoo to serve as a guide. Above them are the same materials without the diffuse, so we can see better what the gloss and normal map is doing.

Marble tiled floor material

Expand

As you can see the marble tiled floor is a very smooth surface with a mostly tight spec, a high and sharpened reflectivity. There are some sections which are not reflective, have a wide spec, and are therefore are not as smooth looking.

Image Modified

The big dark grey tile has a very wide spec, is not as smooth and has a very low reflectivity. By the look at the gloss map we can analyze why. As you can see most of the map is very light and bright. Where the tile is located you see that it's dark grey. This is the reason why that part is dull looking compared to rest of the tiles. Please pay also attention on how we're defining the cracks and dirt by adding localized darker areas. We also have a mid level of contrast. All this helps in conjunction with the normal map to define the material and make the surface more interesting, also making it more believable.

Image Modified

To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

Stone material

Expand

Stone is a very rough surface with a very low reflectivity and a very wide spec.

Image Modified
If we take a look at the gloss map we can see that it's pretty dark and muted. The level of contrast is not very high. All this creates a very low and unsharpened reflectivity, with a wide spec and low highlights. The material appears to have a high roughness.

If you look closely at the gloss map you'll see also that it has unevenness in light and dark areas. This helps to make the surface look interesting as it creates different values as light travels across it, helping in making it look more believable.

Image Modified

To set up our Shader correctly we need to set in the Material editor the Glossiness to 255, otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

Sandstone bricks material

Expand

The sandstone brick material is also a rough surface with low reflectivity and a wide spec. It is though not as rough as stone.

Image Modified
Taking a look at the gloss map we see a muted map, with greys in the mid to dark range. It is muted with a not high level of contrast and it represents a low and an unsharpened reflectivity, with a wide spec. But as opposed to stone it's not as dark and muted.

Again you can see how different values of grey help to make the surface look more interesting, as differences in specularity occur when it's hit by the light. This makes our material more believable.

Image Modified
To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

Painted marble material

Expand

As you can see the painted marble material is a fairly smooth surface with a tighter spec. You can also see as the parts where the paint has worn off, it's duller with lower and less sharpen reflectivity and wider spec. It also has parts where it has the opposite.

Pay close attention to how the paint is actually visible on the spec (breaking the smoothness) where the light hits it.

Image Modified
The general set up for this map is light and bright with greys in the mid to high range. We have a mid level of contrast. Tthe white speckles will break the roughness of the surface and the cracks. Worn off and chipped parts will be rougher and therefore darker. That way we achieve the look and believability we're looking for.

Image Modified
To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

Marble unpolished material

Expand

The unpolished marble material is a rougher surface with low and unsharpened reflectivity. It shows also a high roughness, with very wide and low highlights.

Image Modified
If we look at the gloss map, we see a dark and muted map resulting in a low level of contrast. This gives us a low and unsharpened reflectivity and makes also the material rough. This also makes the spec wide with low highlights.

The different values of dark and light in the map create uneven specular values and reflectivity, making the surface believable and interesting.

Image Modified
To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

White/black and grey polished marble material

Expand

As opposed to the unpolished marble, we have a very smooth surface, with a high and much sharpened reflectivity. The spec is very tight with high highlights.

Image Modified
To achieve that the way we need to set up our gloss map is very light and bright with some contrast.

By having through the map different values of lights and darks, we can break the spec, reflectivity and sharpness. This helps make the surface look more interesting and believable.

Image Modified
To set up our Shader correctly we need to set in the Material editor the Glossiness to 255, otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values should be between 53 and 61 for non-metals.

Image Modified

Polished white marble bricks material

Expand

The polished white marble brick material is a very smooth surface, but we have the crevices an in real life dirt accumulates there in making them less reflective.

Image Modified
Looking at the gloss map for it we can see a very light and bright map with a higher contrast. This makes the material very smooth as its polished bricks, but as you look towards the corner we see dark areas creating less polished and less reflecting parts of the material.

The different values of dark and light make the material more believable and interesting as it creates different values in highness and sharpened reflectivity and smoothness.

Image Modified
To set up our Shader correctly we need to set in the Material editor the Glossiness to 255 otherwise the gloss map will not work.

As for the Specular Color, you have some creative freedom in how high you should set it and what achieves the best look for the asset. The values it should be between 53 and 61 for non metals.

Image Modified

Non metal with metal material in the same texture

Expand

When a texture contains a part that is metal, we need to add color in the spec map to the metal part of it, since the metal will have a different spec color than the non metal parts. The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. But we won't control the spec color in the shader. We have to do it in the texture itself, to do that we have to take the values from the Physically Based Shading chart and add the color into our spec map.

In this case we use a dedicated spec map and our gloss map will still go into the ALPHA CHANNEL of the Normal map!

We have an example of how the texture of the spec map would look. In the color map of the spec we can see the gold parts having a yellow/goldish color. This makes the specular color that gets reflected yellow/goldish, which in this case is gold. As you can see the rest of the map is grey with a value of 55,55 and 55 for the non metal parts.

Image ModifiedIn the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights. Pay close attention to how white and contrasting the metal parts are.

We want the metal to have a high level of reflectivity, smoothness and tight highlights with some darker parts to break up the spec and make it more believable and interesting.

Please look also at the rest of the gloss map. We see that the surfaces are being defined by parts. There are parts of the object which are rough with low highlights, wide spec and low reflectivity.

Image Modified
Once the asset is in the engine we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.

Image Modified
Finally our asset will look like this in the game.

Image Modified

Metals

Expand

When a asset consists purely of metal, we don't need a diffuse texture at all. Metals have no color and are defined by the color of the light they bounce back. Therefore we use our spec range sheet and color sample the metal according to it.

The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. But we won't control the spec color in the shader.

We have to do it in the texture itself. To do that, we have to take the values from the Physically Based Shading chart and add the color into our spec map.

Image Modified

In this case we use a dedicated spec map and our gloss map will still go into the ALPHA CHANNEL of the Normal map!

Image Modified
In the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights.

Pay close attention to how white and contrasting the metal parts are. There are two examples of the gloss map. We have an unpolished metal, with wider spec and lower reflectivity, and we have the polished metal with a whiter gloss map that gives us a tight spec and high reflectivity.

Image Modified

Image Modified

Once the asset is in the engine, we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.

Image Modified

Oxidized / Rusted Metals

Expand

Most of the metals you will encounter in the real world and in our game will be used, worn and even oxidized. We still don't need a diffuse texture at all. Metals have no color and are defined by the color of the light they bounce back. Therefore we use our spec range sheet and color sample the metal according to it. The gloss map in the alpha channel of the normal map, still defines the smoothness, reflectivity and tightness of highlights. We need to start out with this at first and really paint in the spots where the oxidization would naturally build. Those areas we want to have less gloss and less reflectivity.

As you look at rust in general you can see that there's still some glimmer coming through it. Please think about that, look at reference, and incorporate that into your gloss map. As mentioned before, with metals we won't control the spec color in the shader. We have to do it in the texture itself. To do that, we have to take the values from the Physically Based Shading chart and add the color into our spec map. What we need to look at is our spec map and texture it accordingly. We start painting with the base color of the metal, taken from the spec ranges sheet, and paint in the color of the rust or oxidization in accordance of our gloss map.

In the alpha channel of the normal map we still have our gloss map, which will define our reflectivity, smoothness and highlights.

Image Modified

After we're done with our gloss map we paint according to our gloss map our spec map, to get different specular color of the oxidization.

Image Modified

Once the asset is in engine we need to open up the material editor and set the specular value of the material to 255. This has to be done since the color map of the spec map is controlling the specular color and not the shader.

Please don't forget to set the value of the gloss also to 255 so the gloss map in the alpha channel will work.

Image Modified

Here's our final asset looks in game with the normal, gloss and spec map working.

Image Modified

Subsurface scattering for environments

Expand

One of the biggest things to take our visual quality to truly "next gen" is using subsurface scattering in environments and the materials for it.

You have materials that have a bigger amount of subsurface scattering like marble and you have some who have less or none. Since the cost of using it is very low we recommend using it frequently. The only time you shouldn't use it is on pure metal surfaces. Sometimes a surface doesn't have a lot of subsurface scattering, but we still recommend using it with a very low value.

There are three colors of subsurface scattering we can use: red, blue and yellow. The red color of the subsurface scattering should be use more in conjunction with skin on characters. The blue should be use more with ice, but it can also be used with surfaces to give it a colder look. The yellow is the main color it should be used for environments and its surfaces, especially on marble.

To show the difference better here are two screenshots of a marble pillar, the first without subsurface scattering, the second with.

Image Modified

Image Modified
To set the amount of the subsurface scattering you go to the tab and set the value to something that looks good. Please be careful and don't set it too high, as it will look like wax. The recommendation is to go up by increments of .05. We have some degree of artistic freedom here.

Image Modified


Chinese

概述

Table of Contents
maxLevel3
minLevel2
excludeOverview

在Photoshop中设置以符合Physically Based Shaders

我们要做的第一件事情是需要保证Photoshop的设置是正确的。当你打算为你的Physically Based Shaders 绘制贴图的时候你应该清楚你的显示器应该调整到sRGB的色彩空间,一个50%的灰度在值不等同于0.5或者127,它相当于反向的gamma2.2的值有0.5的提高,这个值等于在Phot0oshop中的187。简而言之使用标准的原因是为了避免一些条纹的产生。sRGB空间使得更敏感的人的眼睛能感觉到更多更精确的暗部颜色,在开始调色前,请确认你的屏幕颜色较准正确。为了实现这个目标,我们需要到“"Color Settings”中,你打开Ps后可以选择 "Edit" 菜单选择"Color Settings..."。将RGB设置为sRGB接下来设置Gray到Gray Gamma 2.2.

 默认情况下,Gray 一般设置为Dot Gain 20%,这会导致颜色在alpha通道中产生变化。对于一个127的数值在引擎中就会降低变成104这样就会导致一个不一致的结果,所以才必须要使用Gamma 2.2的原因

Image Modified

Image Modified

完成了Photoshop 里面的设置后,我们可以可以从样品的列表中通过颜色的拾取功能来获得当前想要的材质数据。请不要忘记你的 Gloss Map 现在已经移动到 Normal Map里面去了。

你现在看到的这里的数值几乎是可以针对所有的不同类型的材质。使用颜色拾取工具拾取样本来获得这些数值。请在图象上面单击下载这个图像文件并且保存成为一个bmp文件(这是未压缩的数据,可以给你正确的值),一定不能从在这个文档中下载的jpg文件中拾取这些颜色,这样以来你将会从压缩的数据中获得错误的值。

Image Modified

Image Modified

.如果你不知道什么是 Physically Based Shaders 和他是怎么工作的请参看:Physically Based Rendering

为 Physically Based Shaders制作Specular 贴图

我们使用physically based shading 技术可以真正将我们的项目变成次时代游戏,在pbs中光泽度(gloss map )贴图几乎是最重要的贴图了,它要求我们需要去想一下如何去使用我们的specular maps。

光泽度(gloss map )贴图几乎和绘制 diffuse texture 差不多去绘制或者修改成你想要的效果。举例如果你不想使用任何的金属效果或者你的美术资源没有任何的金属部件,我们几乎不需要使用spec map就可以实现很好的效果。

我们将光泽度(gloss map )贴图放置到Normal Map.的Alpha 通道中去。

材质类型

这里有关的渲染几乎只有两种类型的材质:他们是 金属 (导体类似铁, 黄金, 铜, 等等.) 以及 金属((绝缘材料 类似塑料, 石头, 木材, 皮肤, 玻璃, 等等)。或者两者颜色和光泽都比较特殊的材料。

金属吸收所有光线进入表面下层,因此金属没有漫反射。这里的意思是金属的diffuse应该是黑色的。所有可见光从表面直接反射(高光反射。这就意味着不同的金属类型应该用油不同的高光颜色。

对比金属类型的材料,非金属物体应该包含漫反射;然而非金属的高光的反射将比金属材料变化少很多力度弱很多。非金属高光反射单色没有颜色只有灰色大多数非金属只反照了一小部分的反射值,几乎大多数材质(材料)在2%和5%之间

Specular Color 的工作原理

specular color定义了当光源出现在物体表面正上方时有多少光线从表面立即被反射。这是最小的高光强度,在掠射角下将增加菲涅尔效应。由于高光色的颜色一种特定类型的特定材料参数,它也可以被视作为一种材质物质类型的遮罩。所以高光色是一种物理值应该在参考列表中获取正确的数值。因此,高光参数不会留下太多的自由空间让美术人员去更改。

几乎所有的非金属的高光反照率都介于 2% 和 5%之间并且它们的高光颜色都是单色(灰度)。由于变化小,所以表现specular color 的时候经常使用一个常数来体现它应有的物理效果而不是一张specular 贴图。然而如果金属和非金属混合在一个贴图中,specular贴图就是必须的了,作为金属类材料的specular 颜色将会比非金属的specular 明亮很多。如果使用了specular map,你必须将material editor中的specular color调整成纯白色也就是255,255,255。这是因为如果你不更改成纯白色的话这个数值将会与specular map的像素的数值相乘这样会降低specular map的亮度从而使得你得到了错误的高光数值。

如果非金属材质使用贴图,届时你的spec map 颜色应该是白色的,在引擎材质编辑器中的 specular color 的值请参考这个"Physically Based Shading" 图片。你可以在这个连接中得到。

gloss 光泽度数值和工作原理

另一个比较大应伽牢记在心的事情是光泽度的工作原理和如何应用它

光泽度定义了表面的粗糙程度。低光泽度值意味着表面粗糙,而高光泽度 的表面非常光滑是有光泽的。光泽度的高低影响 specular高光的大小和强度。表面光滑有光泽的物体他的specular高光面积将会比较小。一个细小亮点将会比较明亮这是因为为了遵守能量守恒的物理规则。

几乎所有的材质都应该拥有光泽度贴图,因为这样会给你的材质带来很多的变化。光泽度和 normal maps关系非常的密切,在一些高频率和细节重复的normal map中创建一些粗糙 的感觉将会比较好。不管怎么说,光泽度是材质微观细节的粗糙度。

我们可以绘制我们的贴图了,甚至我们可以描述你的物体有多少部分是使用过的(因为一个严重磨损部分的部分更为光滑,它会比那些没有使用的部分更多光泽度和更多的反射率比


Image Modified
 基于这些基础知识,我们需要开始思考如何建立我们的光泽度贴图。是你建立光泽度贴图最重要的一步

  • 非金属一般53和61之间的
  • Gloss map 一定要放进 Normal map的Alpha 通道中
  • 不要使用 Spec map 除非你的物体是金属的或者你的物体有金属部件

 如何为Physically based shading 制作贴图

Physically based shad比较重要的贴图是你的gloss 和normal map。开始制作的时候你需要制作单独的两张贴图,它们将会帮你定义你的表面特性,之后最后的一步就是增加你的 diffuse map

diffuse 贴图它自身一定不能包含灯光信息。

使用 Photoshop输出你的Normal Map 复合你的Gloss Map

Gloss 和normals 彼此相互依赖。 normal map定义宏观尺度表面的凹凸程度而 gloss 则定义微观尺度下的表面光泽度。

对于材质细节来说这两张贴图都非常的重要,所以你应该开始去制作你的normal map和gloss map。一旦你达到了预期的效果,你应该开始制作你的 diffuse texture,请千万切忌diffuse map必须永远不能包含光照信息。

gloss map 应该永远放置在normal map的alpha通道中,甚至如果你已经为你的金属材质使用了spec map 和这个金属材质包含了表面。

将输出你的normal map with the gloss in the alpha channel,这个选项,这个贴图的命名规则永远是 suffix _ddna  (例如:庭院_墙_石头_ddna)

Image Modified

Image Modified

举例来说明如何设置 gloss maps 和shaders

以下举一些例子来说明gloss maps如何影响美术资源它是如何定义的材质的 。还会教你理解,怎样将一个 gloss map达到预期的材质和效果。

这些范例都放置在资源Zoo里面的Orbs 作为范例。这些资源使用同一个材质除了他们的diffuse不同,这是因为我们可以看得更清楚gloss 和normal map在做什么工作。

大理石地面材质

Expand

正如你可以看到的大理石铺就的地面是一个密集的规格非常光滑的表面,高和尖锐的反射效果。有些部分是不反光,有大量的区域是看上去不光滑的表面。

Image Modified

 你看到暗灰色的瓦片占据了非常宽阔的空间,这部分的表面是不是光滑的表面,而且反照率很低。通过观察光泽地图我们可以分析这是为什么,就像你看到的一样多数的贴图区域时非常的明亮的。什么地方使用这块区域就会表现比较黑的效果,这就是为什么这块区域看起来与众不同的原因,

同时注意我们是如何通过增加局部较暗区域的细节来定义的裂纹和污垢。我们同时还拥有一个中等级别的对比度。所有这一切都是帮助你的normal map 去定义材质部分的细节使得表面更加有特点和真实。


Image Modified

 我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属

Image Modified

岩石材质

Expand

岩石材质通常拥有比较粗糙的表面以及非常低的反照率和较宽的高光范围。

Image Modified
 如果我们打开一张岩石材质的gloss map你会惊讶的发现它真的很暗和较低的对比度。所有的这一切在一起将会是降低和柔化反射率,结果就是你看到的非常宽的高光面积和非常低的高光值。所以这个材质就会拥有较高的表面粗糙度。

如果你放大观察 gloss map 你会发现其实亮区和暗区的颜色并不是均匀分布的。这是因为让物体表面看起来不太死板使得光线使用不同的值穿过表面。看起来更真实

Image Modified

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属

Image Modified

砂岩砖块材质

Expand

The sandstone brick material is also a rough surface with low reflectivity and a wide spec. It is though not as rough as stone.

砂岩砖块材质同样通常也是拥有一个比较粗糙的表面以及较低反射率和宽大的高光区域,虽然它不像石头那样粗糙。

Image Modified
 我们打开砂岩砖块的材质的gloss map 后发现它非常的柔和。灰度的表现也是比较中等的水平。它比较柔和又拥有不是太高的对比度这意味着较低的和柔和的反射率,拥有较宽的高光范围。但是相对于岩石材质没有那么暗和柔和,比较居中。

你可以再一次的去观察不同的灰度数值你会发现当光线照射到不同的反射率区域的时候就会产生不同的效果这是非常有趣的,这使得效果看起来更加真实。


Image Modified
 

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属


Image Modified

彩绘大理石材质

Expand

就像你看到的一样彩绘大理石材质拥有一个较为光滑的表面以及较为紧实的高光效果。你同样会看到一部分有磨损的区域,这部分区域拥有较低和较小锐利反射率以及一个较宽的高光区域。它也同样有一部分区域是相反的。

 留意当光线照射在模型上后去思考绘制高光贴图的变化(阻断光滑效果)

Image Modified
 通常情况下设置彩绘大理石材质的gloss map是从灰度开始到明亮的取值区间来绘制细节。我们往往会有一个中间层次的白色斑点来做对比用来打破的表面粗糙和裂缝的效果,磨损碎裂的部分将是非常粗糙的,所以是颜色比较暗。

这样的方法将会让我们得到较高的物理仿真度,这就是我们需要的。

Image Modified
 

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属


Image Modified

大理石未抛光材质

Expand

未抛光大理石材质通常拥有一个非常粗糙的表面以及比较低和模糊的反射率,它体现了较高的表面粗糙度,拥有非常大的高光面积以及很低的高光效果

Image Modified
 如果我们看它的 gloss map我们会发现是一张非常黑而且非常柔和低对比度的贴图。这是因为这样会给我们材质带来较为不锐利的反射率以及比较粗糙的材质效果。它同样也会产生较为宽大的高光面积以及比较低亮度的高光效果

在贴图中使用不同颜色数值的暗部和亮部区域会导致不均匀的高光 和反射率,使得物体表面看上去更真实又变化。

Image Modified
 

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属


Image Modified

白色/黑色灰色抛光大理石材质

Expand

相对于未抛光大理石,抛光的大理石拥有非常光滑的表面,而且拥有非常高且非常锐利的反射率,高光也是非常紧实和明亮的。

Image Modified
 为了实现这样的效果我们需要去设置我们的gloss map 要非常的明亮才好并且保留一些对比度

通过运用明暗不同的数值我们可以打破高光、反射率和锐度的连续性。使得物体表面看上去更真实更有变化更有趣。

Image Modified
 

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属


Image Modified

抛光的白色大理石砖材质 

Expand

抛光的白色大理石砖材质拥有比较光滑的表面,但我们这种材质往往是有裂缝的,在现实生活中里面灰尘积累使他们会降低反射率。 

Image Modified
我们看到gloss map 发现这张贴图非常的明亮而且拥有比较高的对比度。这使得大理石砖块看起来比较光滑,但是就像你看到的一样在砖块衔接处和裂缝处有一些黑色的区域是为了减少抛光或增加材质的粗糙度。

这些黑白区域会得到不同的数值可以使得材质更加真实可信,有趣的它在反射率和光滑效果里面创造了不同的高度和锐度的效果。

Image Modified
 

我们开始设置我们的当前的材质,我们需要设置材质编辑器里的Glossiness 到255 否则gloss map 将不能正常工作

作为这个材质的Specular Color。你拥有一些自由的创意空间去设置具体多高比较合适,你需要设置它怎么才能实现好的视觉效果。数值应该在53-61区间因为是非金属


Image Modified

 非金属材质和金属材质共用贴图

Expand

当一个贴图包含了一部分的金属部分,我们需要在spec map 中增加颜色到金属uv的部分,直到金属部分对比非金属部分拥有不同的高光颜色为止,在normal map的alpha 通道里存放的 gloss map仍然定义光滑程度,反射率,高光聚集程度。但是我们没办法控制材质的高光颜色,我们需要去修改贴图自身。接下来我们要做的就是

获取Physically Based Shading 样品列表里面的颜色数值将这些数值的颜色会值到我们自己的贴图上去。

在这种情况下我们需要单独的高光贴图但是我们 gloss map 仍然存放到Normal map!的ALPHA通道中去 

我们有一个范例可以让我们知道怎么绘制我们的spec map以及它是什么样子的。在高光贴图的颜色信息中我们可以清楚地看到金色部分拥有黄色或金色的颜色。这使得高光色会反射黄色/金色,这里将会是金色。就像你看到的剩下的部分贴图将会是一个灰色的颜色他们的值是55,55 ,55这部分是非金属部分的高光色。

Image Modified

在normal map 的alpha通道中我们需要保留我们的gloss map贴图,因为这张贴图定义了我们材质的反射率,光滑程度以及高光范围等,请注意金属部件的颜色多白比较合适

我们希望金属拥有一个比较高的反射率,光滑程度和紧实的高光效果配合一些黑色部分的高光屏蔽效果使得金属更加真实可信和看起来更加有趣性。

请观察剩下的部分的gloss map。我们看到这部分已经定义好了。这部分的物体表面将会比较粗糙,他们的高光将会比较低,高光面积比较宽大和比较低的反射率。

Image Modified
 一旦我们将资源放入到引擎中我们需要打开引擎的材质编辑器并且设置这个材质高光的数值为255。当spec map的颜色正确控制高光色而不是shader本身的颜色的时候就表明完成了。

请不要忘记设置光泽度的数值到255,这时光泽度(gloss map)的贴图在nomalmap的alpha 里面并且已经开始工作了

Image Modified
 最后我们可以看到我们的资源在游戏中的效果

Image Modified

金属材质

Expand

当美术资源是纯金属材质的时候,我们将不再需要diffuse 贴图。金属材质是没有颜色的金属所体现的颜色是有灯光的颜色反射回来决定的。所以我们使用高光颜色的样品颜色列表来取样定义金属材质。

 gloss map 需要保存在normal map的alpha通道中,它依然定义表面的光滑度,反射度以及高光范围。但是我们不能再shader中控制spec color 。

我们需要在spec color 贴图自身来定义高光色,我们可以从Physically Based Shading 样品列表中获取spec map的颜色数值制作你需要的金属材质

Image Modified

在这种情况下我们需要单独的高光贴图但是我们 gloss map 仍然存放到Normal map!的ALPHA通道中去 

Image Modified
 gloss map依然存放在normal map 的alpha 通道中,来定义我们的反射率,光滑程度,以及高光。

请留意金属部分的颜色的亮白程度。我们这里有两个gloss map的范例文件。我们有一个未抛光的金属,它拥有比较宽的高光范围和比较低的反射率。我们还有一个是经过抛光的金属,它挺有比较白的gloss map 这将会使得金属拥有比较紧实的高光以及较高的反射率。

Image Modified

Image Modified

 一旦我们将资源放入到引擎中我们需要打开引擎的材质编辑器并且设置这个材质高光的数值为255。当spec map的颜色正确控制高光色而不是shader本身的颜色的时候就表明完成了。

请不要忘记设置光泽度的数值到255,这时光泽度(gloss map)的贴图在nomalmap的alpha 里面并且已经开始工作了

Image Modified

氧化/生锈的金属

Expand

大多数的时候你会在经常现实世界和游戏中的金属是使用过的,即使氧化磨损。所以依然我们不需要diffuse 贴图,金属依然没有颜色,获得颜色的方法是从灯光的反射回来的结果。因此我们使用我们高光颜色列表里面的颜色取我们想要的金属样品。 gloss map 存放在 normal map的 alpha 通道,依然定义光滑程度,反射度,高光紧实程度。我们需要开始绘制一些自然氧化效果的斑点来达到真实金属的效果。我们希望这些区域低光泽反射率

就像你看到一样一些被腐蚀的部分你可以看到一些拥有闪光点在这金属材质上面。请想一下,可以将这些部分纳入你的 gloss map。就像之前说到的一样我们不用shader里面的高光色控制spec color。我们使用spec map本身贴图来做这件事情,为了实现这一效果我们需要去Physically Based Shading 高光颜色样本中去拾取我们想要的数值来绘制我们的 spec map。因此我们需要确认我们这张spec map是什么样子的。我们接下来需要从高光颜色列表中拾取合适的颜色为这个金属材质绘制spec map的基础颜色,以及为这张gloss map绘制剩下的被腐蚀或者氧化的部分。

gloss map依然存放在normal map 的alpha 通道中,来定义我们的反射率,光滑程度,以及高光。

Image Modified

当我们完成我们的gloss map 我们需要依据我们的gloss map来绘制我们的spec map,这样我们需要为那些氧化或腐蚀的区域定义不同的高光色。

Image Modified

 一旦我们将资源放入到引擎中我们需要打开引擎的材质编辑器并且设置这个材质高光的数值为255。当spec map的颜色正确控制高光色而不是shader本身的颜色的时候就表明完成了。

请不要忘记设置光泽度的数值到255,这时光泽度(gloss map)的贴图在nomalmap的alpha 里面并且已经开始工作了

Image Modified

这是我们最后将资源放进引擎后的效果你看到normal,gloss 以及spec map 已经工作了。

Image Modified

环境次表面散射材质

Expand

材质使用环境次表面散射最大的事情就是将我们的视觉质量真正推进到了次世代。

你会有大量的材质将会用到次表面散射就像一些大理石一样,有的可能拥有较多的散射有的较小或则没有。因为使用它不会消耗太多资源所以我们推荐使用。但是当你的材质是纯金属的时候禁止使用。有些时候一个物体的表面不要有过多的次表面散射。但我们仍然推荐使用一些比较低的值。

当使用次表面散射的时候我们有三个颜色可以选择使用,分别是:红色颜色的次表面散射一般比较铁和角色的皮肤材质。蓝色的次表面散射比较适合表现冰块或雪地的物体,也可以用于一些一般的物体但是看上去更加冷色调。黄色是主要的颜色用于环境及其表面特别是在大理石材质上。
 为了显示差异,我们制作了两个截图的大理石第一张的大理石柱没有次表面散射,第二张有表面散射,对比差异。

Image Modified

Image Modified
 我们可以设置打开材质编辑器面板去次表面散射的力度,给它一个较为合适的值使得画面看起来比较满意。这里请当心不要设置太高的太高这样会看上去像蜡材质。我比较建议设置为0.5,但是不是绝对的这里可以给大家比较高的自由度。

Image Modified



On This Page

Table of Contents
maxLevel3
minLevel2
excludeOverview