This page is currently available only in English


Round Corners

Table Of Contents


Introduction

The traditional method for adding bevels to a mesh is through 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.


Wireframe view of the scene


Without round corners With 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 can't 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.


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 Corners Example

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


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.


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


For this example, we used the bump blender's "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.


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 0.05. Looks ok.

Radius 0.1. Still looks ok but some small artifacts appear near corners.

Radius 0.3. Notice the visible triangular artifacts near the corners.


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.



Default 6 samples

Increased to 32 samples which helps but some edges still don't look 'round'


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.
In the following example the hidden sides of the cubes are 'tricking' the round corners algorithm into thinking that there are corners there.


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.