Normal map (Bump mapping) 法线贴图(凹凸映射) Standard Shader系列10

Normal map (Bump mapping) 法线贴图(凹凸映射)

本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>)
仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。
文章中涉及到的操作都是基于Unity2018.3版本
参考链接:https://docs.unity3d.com/Manual/StandardShaderMaterialParameterNormalMap.html

在这里插入图片描述
Normal maps are a type of Bump Map. They are a special kind of texture that allow you to add surface detail such as bumps, grooves, and scratches to a model which catch the light as if they are represented by real geometry.
法线贴图是凹凸贴图的一种。它们是一种特殊的纹理,允许您添加表面细节,如凹凸、凹槽和划痕到模型上,在计算光照后,就好像它们是由真实的几何体表示的。

For example, you might want to show a surface which has grooves and screws or rivets across the surface, like an aircraft hull. One way to do this would be to model these details as geometry, as shown below.
例如,您可能想要显示一个表面有凹槽和螺钉或铆钉的表面,如飞机外壳。一种方法是将这些细节建模为几何体,如下所示。
在这里插入图片描述
A sheet of aircraft metal with details modeled as real geometry.
一种飞机金属薄片,其细节被制作成真实的几何体。

Depending on the situation it is not normally a good idea to have such tiny details modelled as “real” geometry. On the right you can see the polygons required to make up the detail of a single screwhead. Over a large model with lots of fine surface detail this would require a very high number of polygons to be drawn. To avoid this, we should use a normal map to represent the fine surface detail, and a lower resolution polygonal surface for the larger shape of the model.
根据不同的情况,将这些微小的细节建模为“真实的”几何形状通常不是一个好主意。在右边,你可以看到组成一个螺丝钉的细节所需的多边形。在一个拥有大量精细表面细节的大型模型上,这需要绘制大量的多边形。为了避免这种情况,我们应该使用法线贴图来表示精细的表面细节,对于较大的模型形状,使用分辨率较低的多边形表面。

If we instead represent this detail with a bump map, the surface geometry can become much simpler, and the detail is represented as a texture which modulates how light reflects off the surface. This is something modern graphics hardware can do extremely fast. Your metal surface can now be a low-poly flat plane, and the screws, rivets, grooves and scratches will catch the light and appear to have depth because of the texture.
如果我们用凹凸贴图来表示这个细节,那么表面的几何体就会变得简单得多,并且这个细节可以用纹理来表示,它可以调节光线在表面上的反射方式。现代图形硬件可以非常快地完成。你的金属表面现在可以是一个低多边形的平面,螺丝,铆钉,凹槽和划痕会捕捉到光照,并且由于纹理的原因看起来会有深度效果。
在这里插入图片描述

The screws, grooves and scratches are defined in a normalmap, which modifies how light reflects off the surface of this low-poly plane, giving the impression of 3D detail. As well as the rivets and screws, a texture allows us to include far more detail like subtle bumps and scratches.
螺丝、凹槽和划痕被定义在一个法线贴图中,它修改了光线在这个低多边形平面表面的反射方式,给人以3D细节的印象。除了铆钉和螺丝,纹理还允许我们加入更多细节,比如细微的碰撞和划痕。

In modern game development art pipelines, artists will use their 3D modelling applications to generate normal maps based on very high resolution source models. The normal maps are then mapped onto a lower-resolution game-ready version of the model, so that the original high-resolution detail is rendered using the normalmap.
在现代游戏开发美术管线中,美术将使用他们的3D建模应用程序来生成基于高分辨率源模型的法线贴图。然后将法线贴图映射到低分辨率游戏使用的模型版本,以便使用法线贴图渲染出原始的高分辨率细节。

How to create and use Bump Maps 如何生成和使用法线贴图
Bump mapping is a relatively old graphics technique, but is still one of the core methods required to create detailed realistic realtime graphics. Bump Maps are also commonly referred to as Normal Maps or Height Maps, however these terms have slightly different meanings which will be explained below.
凹凸贴图是一种比较古老的图形技术,但仍然是创建写实细节的实时图形所需的核心方法之一。凹凸贴图通常也被称为法线贴图或高度贴图,但是这些术语的含义略有不同,下文将对此进行解释。
What are Surface Normals? 什么是表面法线
To really explain how normal mapping works, we will first describe what a “normal” is, and how it is used in realtime lighting. Perhaps the most basic example would be a model where each surface polygon is lit simply according to the surface angles relative to the light. The surface angle can be represented as a line protruding in a perpendicular direction from the surface, and this direction (which is a vector) relative to the surface is called a “surface normal”, or simply, a normal.
为了真正解释法线贴图是如何工作的,我们将首先描述什么是“法线”,以及它如何在实时照明中使用。也许最基本的例子是一个模型,在这个模型中,每个表面多边形仅仅根据相对于光的表面角度被照亮。表面角度可以表示为一条从表面垂直方向伸出的直线,这个方向(它是一个矢量)相对于表面被称为“表面法线”,或者简单地说,法线。
在这里插入图片描述
Two 12-sided cylinders, on the left with flat shading, and on the right with smoothed shading
两个12面的圆柱体,左边是平面着色,右边是平滑着色

In the image above, the left cylinder has basic flat shading, and each polygon is sh

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值