Table of Contents

This article explains the settings and values for the Corona Distance shader in Cinema 4D.


Overview


The Corona Distance shader lets you create “smart” materials that know how far away they are from objects in the scene. Use this to add waves around a coastline, wear-and-tear where objects meet, dirt and noise under window sills, and more.

 

 

Distance


Near distance – When a surface of any objects included in the "Distance from" list is closer than the distance set here, a defined color or texture map is used. For distances between near and far, a blend between the near and far colors or texture maps is used.

Far distance – When all surfaces of any objects included in the "Distance from" list are farther than the distance set here, a defined color or texture map is used. For distances between near and far, a blend between the near and far colors or texture maps is used.

Distance scale – When used, both near and far distances are multiplied by the color values of the texture map or shader defined here. A value of 1 (white) means near and far distances are unchanged, while lower values reduce both near and far distances. Use this to add noise or variation to the distance calculations.

 

Near color


Level – This is the intensity (also considered as the visibility) of the color.

Color – This parameter defines the color used for the near-surface from the objects defined in the "Distance from" list.

Texture – Defines the texture map or shader that will be used for the near color.

Mix mode – Controls the blending mode of the texture map or shader.

Mix strength – Controls the intensity of the texture map or shader that is being used.

 

 

Far color


Level – This is the intensity (also considered as the visibility) of the color.

Color – This parameter defines the color used for the far-away surfaces from the objects defined in the "Distance from" list.

Texture – Defines the texture map or shader that is used for the far color.

Mix mode – Controls the blending mode of the texture map or shader.

Mix strength – Controls the intensity of the texture map or shader that is being used.

 

Inside color


Enable – When enabled, a different color or texture shader is applied for the surfaces that are 'inside" (based on the shading normal) of the "Distance from" objects list. When disabled, the same distance gradient as for outside objects is used instead.

Detection mode – This defines the method to calculate the color of the inner surfaces.

Precise – This mode determines more robustly and precisely the inside of all meshes, even complex geometry objects.
Fast – This is a bit faster mode that works correctly only with simple meshes.

Generally, you don't need to use the fast mode unless you need to render older scenes.

Level – This is the intensity (also considered as the visibility) of the color.

Color – This parameter defines the color of the surfaces that are 'inside" (based on the shading normal) of the objects defined in the "Distance from" list.

Texture – Defines the texture map or shader used for the inside color.

Mix mode – Controls the blending mode of the texture map or shader.

Mix strength – Controls the intensity of the texture map or shader that is being used.

 

Distance from


Objects –  This object's list defines the objects from which the distance is being calculated.

Include children – When enabled, if the objects from the above list include nested objects, they'll also be considered as if they were already defined in the list.

 

 

Differences between the Corona AO shader and the Corona Distance shader


There are some major differences between these two shaders:

  • The Corona Distance shader cannot be used within a single object
    The Corona AO shader can be used to colorize different parts of a single object or multiple objects based on their distance from each other (convex or concave areas). The Corona Distance shader can only be used based on the distance between two or more different objects
  • The Corona AO shader is raytraced, so it is computed only during the actual rendering process.
    This means that the Corona AO shader cannot be used, for example, as a distribution map to scatter instances using a Cloner or Scatter object, as a displacement map, or as a bump map. The Corona Distance shader can be used in such cases, and it will update in real time, even in the viewport
  • The quality of the Corona AO shader will improve progressively during rendering, so it first appears noisy and then gradually becomes noise-free with each subsequent render pass. The Corona Distance shader is computed in one go and immediately renders noise-free
 

 

 

Examples


 

Distance Near

Distance Near: 0 (default value)

Distance Near: 250

Distance Near: 500

Distance Near: 1000

Distance Near: 2000

Distance Near: 4000

Distance Far

Distance Far: 0

Distance Far: 500

Distance Far: 1000

Distance Far: 2000

Distance Far: 4000

Distance Far: 8000

 

 


 

 

Color Near

Color Near: R: 111 G:111: B:111

Color Near: R: 80 G:80 B:80

Color Near: R: 25 G:25 B:25

 

 

 

 

Color Far

Color Far: R: 252 G:252: B:252

Color Far: R: 150 G:150: B:150

Color Far: R: 50 G:50: B:50