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.


Without round corners With round corners Wireframe view of the scene


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 probe rays are used. Larger values 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 increasing if necessary.

 

Consider Same Object Only

When enabled, each object only considers itself for edge rounding. For example, two separate objects do not round between each other.

When disabled — by default, separate objects can be rounded across themselves.

 

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 a bump map, you'll need to use Redshift's Bump Blender to combine your existing bump map with the round corners node.


In the images below, you can see how this works in Maya. The settings are 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.
Some small artifacts appear near corners.

Radius 0.3.
Visible triangular artifacts near the corners.


The triangular artifacts can be helped with a larger 'num samples' setting. 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.

6 samples

32 samples
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.

Inner (hidden) polygons producing false edges

Two cubes, exactly side-by-side


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