如何在你的法线贴图上修接缝

How to Fix Seams on Your Normal Map 
原帖:http://www.andrewklein.net/bh/fix_normalmap_seams.html
大家好,我是笨笨,笨笨的笨,笨笨的笨,谢谢!水平有限,如有疏漏望海涵,如有译者注会用红色。
郁闷后正式开始:
郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷郁闷

 

 

This demo is a brief run-thru on how to fix the age-old problem of Seams in your Tangent Space Normal Map.

本教程将演示如何在(切线空间类型的)法线贴图上修补接缝这个老问题,这只是一个简单的示例。

 

Tangent Space Normal maps are infamous for being wracked with seams along UV borders. What most artists don't know is that setting up your UVs has a profound effect on your normal map! Take the following example. I make a slightly irregular sphere (so that we can easily see where the equator-cut-area is), and I cut the model's UV projection right along the center:

(切线空间类型的)法线贴图在遇到UV边界的时候就会出现臭名昭著的“贴图接缝”。可大多数的艺术家们并不了解UV的分法,对法线贴图的影响有多重大。看看下面的示例,我创建一个轻微变形的球体(这样我能轻易的看到赤道切面的区域),然后我沿着中间拆分UV:
 
(UV的剪开位置,原型模型)(下面那部分的UV块,旋转成这样 90度)

When I take this mesh into Zbrush, I can sculpt whatever I want, here a few random stars will do. But when I make a normal map, we are going to have some big problems:

当我把模型放到ZBrush中,我可以随意雕刻,我将刷上几个随机的星星。但当我创建法线贴图时,我将会遇到个大问题。
 
(接缝)

These Problems arise because Normal maps are lit as so... Red from the right, Cyan from the Left, Green from the Top, Violet from the Bottom, Yellow away from the viewer, Blue Towards:

这个问题的起因与法线贴图中颜色分量有关,法线贴图中各种颜色分量的具体表示如下:
红 = 右,青 = 左(红色通道)绿 = 上,紫 = 下(绿色通道)蓝 = 凸,黄 = 凹(蓝色通道)

If the UV shells are rotated when we create the map, then we are going to run into seams when we try and render the map, or view it in Maya's high quality renderer:

如果你在分UV时,旋转了UV块,那么我们在渲染时或是在MAYA中用高质量预览时,就会遇到接缝。


(接缝在MAYA中也存在)

But..... In certain cases, we can fix this by editing the channels of the map in photoshop. Since the Lower shell in this case is rotated 90 degrees, what we can do is take the Red Channel for the Lower shell and swap it with the Green Channel ... FOR THE LOWER SHELL ONLY... and then invert the colors to flip it correct. Follow me here:

但某些情况下,我们可以通过在PHotoshop中编辑通道来修复这个问题。仅当下面这部分UV块旋转了90度的情况下,我们可以通过交换这部分UV对应的红色与绿色通道,然后反转它们的颜色信息。来修复接缝,跟我来:

First I take the Red Channel and make a dupliacte. This will store it for later since I am going to override the real Red in just a second. 

首先复制一分红色通道。这样我们备份了个红色通道副本,因为下面我要覆盖原始的红色通道。
 
(复制 红色通道)

Use the Marquee Select tool to select the rotated lower shell in the Green Channel.

用无框工具选择球体下面那部分旋转过的UV对应该的绿色通道。

Copy that selection, then Paste it into the Red Channel. 

复制选区,然后粘贴到红色通道去。

(复制 + 粘贴)

Here is the Red Channel, now correct after having been pasted:

当我们粘贴好后,在红色通道中就已经修复完成了。

 (粘贴)

Now, leaving the same selection Marquee in place, lets select the Red Copy Channel, and Paste it onto the Green Channel

现在,保持选区,复制中红色通道副本,然后粘贴到绿色通道中去。


(粘贴 红色副本 去 绿色)

We no longer need the Red Copy once we use it to duplicate to Green. So at this point, right click on it and choose Delete:

我们不在需要红色通道副本了,删除它。


(红色通道副本上右键,删除通道)

Finally, we need to invert the direction of the green channel. In the green channel, what we see as White is actually Green when we view as RGB, and what we see as Black is actually Violet. If we invert the color, 50% gray will not change, but all the other values will. Black goes White and visa versa. Thus, Green goes Violet and visa versa. Soooooo..... on the model, slope up becomes slope down (and visa.... you get the idea).

最终,我们要反转绿色通道,在绿色通道中我看到的白色对应RGB中的绿色,黑色对应RGB中的紫色。如果我调到50%灰度值(RGB值 128,128,128)将不会有变化,但其它任何值都会。黑与白交换,反之亦然。因此,绿色与紫色交换,反之亦然。那么模型中向上的斜坡就变成了向下的斜坡(反之亦然,你明白了吧)

(图中操作就是反转颜色,PS中的Ctrl + I )

Save this out, and load it in as your normal map.... and:

保存,然后加载到你的法线贴图中去,那么:(没缝了~~)

 

I hope you enjoed this one! Make some use out of it.

希望你喜欢,并从中有所收获。

 

你可能感兴趣的:(PS,Zbrush)