General概述

The traditional method for adding bevels to a mesh isthrough the 3d app』s modelling tools. However, depending on the 3d app, this can be a laborious process, can introduce a lot of extra geometry and requires even more work to handle cases where multiple objects intersect each other.

傳統為模型添加倒角需要通過三維軟體的建模工具,然而,這種方式中通常會帶來不小的工作量。而且在三維軟體中,有時會為了倒角,導致模型面數的大幅提升。如果場景中有大量通過物體穿插布爾運算構造的形體,那和問題就更為嚴重了。

Redshift』s Round Corners shading node produces a shading effect that simulates the look of round beveled edges but without introducing extra geometry. It can also work with intersections of objects, as shown in the images below.

Redhsift在Round Comers節點無須修改模型就可以模擬倒角效果。對於相互穿插進行布爾運算的形體,Round Corners節點也同樣有效。如下圖:

Wireframe view of the scene線框顯示的場景

Without round corners沒有倒角

With round corners 倒角

Round Corners Parameters倒角參數

Radius半徑

This controls the size of the bevel. Larger values will produce larger bevels. Since the Round Corners node is a shading trick, it cant represent very wide bevels so we advise using relatively small values to avoid any potential visual artifacts. More information about this can be found below.

半徑控制倒角的大小,值越小倒角越大。因為Round Corners節點是在光影上模擬倒角效果,所有不能讓倒角寬度太大。最好使用較小的半徑,這樣的倒角效果視覺上不會有明顯的瑕疵。

Num samples

Round Corners works by shooting rays to discover edges and corners. The Num samples setting controls how many of these probing rays will be used. Larger values will produce smoother results, especially around corners but this will come at the cost of longer render times. We recommend starting with the default value of 6 and only increasing if absolutely necessary.

Round

Comers通過發射採樣射線來「尋找」邊緣的拐角。「Num Samples」用於指定使用多少採樣射線。數值越大,倒角越圓滑,特別是對轉角處作用最明顯。但數值越大,渲染時間會增加。我們建議使用默認參數6,必要時再增加。

Round Corners Example倒角實例

Using the Round Corners node is very simple: all you have to do is connect the node to the lighting shaders bump input, as shown below.

使用這個節點很簡單:只需要連接這個節點到光影著色器的Bump Map節點上

If the object is already using bump mapping, you』ll need to use Redshift』s bump blender node to combine your previous bump map with the round corners node.

如果物體已經使用了凹凸貼圖,那就需要使用Redshfit的Bump Blender節點。來將Round

Corner節點與原來的Bump Map節點做融合。

如下圖,能看到Maya中的節點連接方式,不同的三維軟體方法不同。

In the images below, you can see how this works in Maya. The settings should be identical for all other 3d apps.

We mix a fractal bump map with a round corners node, via a bump blender node我們將Fractal、Bump Map與Round Corner節點用Bump Blender節點融合到一起。

For this example, we used the bump blenders "additive mode"這個例子,我們使用Bump Blender節點的Additive Mode。

And here』s the result! 這是渲染結果。

Artifacts and Limitations 瑕疵與局限

Since the Round Corners shading node is essentially a shading trick, there can be cases where it will fail. Here we explore the most common problematic cases.

因為Round Corner節點是在光影模擬倒角效果,因而可能是一些情況不適用。我們來舉一些常見的問題案例:

Effect of radius半徑效果

When the radius setting is pushed too much, the resultant image will exhibit artifacts that have to do with the number of samples or with lighting. Below we see how the low (default) num samples produce what appear to be triangular artifacts.

當Radius設置太大時,渲染結果會由於採樣數量和光影的限制而顯得不真實。下面的幾幅圖說明了低採樣值(默認值)所造成的效果。

Radius 0.05. Looks ok.半徑0.05。 看起來沒問題。

Radius 0.1. Still looks ok but some small artifacts appear near corners.半徑0.1。 仍然看起來不錯,但一些小的文物出現在角落附近。

Radius 0.3. Notice the visible triangular artifacts near the corners.半徑0.3。 注意角落附近可見的三角形偽影。

The triangular artifacts can be helped with a larger num samples settings. However, even then, a large radius setting creates a situation where the lighting/reflection rays are rounded but are getting blocked by the mesh which still has sharp corners and edges! When this happens some edges might not look rounded, as shown below.

三角形摺痕問題可以通過提高Num Samples來緩解。但如果Radius設置過大,可能導致光照或者反射採樣經過了「倒角」,但受制於實際多邊形的邊緣仍然很硬,使得邊緣總體看上去沒有被倒角。

Default 6 samples默認6個樣本

Increased to 32 samples which helps but some edges still dont look round增加到32個樣本,但有些邊緣仍然不看「圓」

If you bump into this issue, switching to traditional beveling methods might be a better choice for your scene or object.

如果你遇到這樣的問題,應該使用傳統倒角製作。

Another issue that can happen with round corners is with intersecting objects producing inner (hidden) or near-coplanar polygons.

另一個可能的問題是一旦使用了Round Corner,原來融合的物體可能分裂開來。

In the following example the hidden sides of the cubes are tricking the round corners algorithm into thinking that there are corners there.

下面的例子就是這種情況,原本希望兩個立方體融合在一起,但Round Corner節點誤認為他們的銜接處也需要倒角。

Two cubes, exactly side-by-side兩個立方體,完全並排

Inner (hidden) polygons producing false edges內(隱藏)多邊形產生假邊緣

The only solution in this case, is to delete the hidden polygons or boolean the objects together.

唯一解決這個問題的方法就是刪除內部隱藏的幾何體或者用布爾運算將它們真正的融合為一體。


推薦閱讀:
相关文章