This page provides information on the Corona Distance map, its settings, and usage.
Corona Distance Map 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.
How does it work?
The Corona Distance map applies different colors to a material based on the distance from one object to another. These colors can be then mapped to various material or object properties such as opacity, displacement, or scattering distribution, or can be used as masks, just as any other map.
The Corona Distance map can be used with both 2D textures (such as bitmaps or procedural maps on the object surface) and 3D volumes (such as OpenVDB grids loaded using the CoronaVolumeGrid, or objects using the Corona Volume material).
How is it any different from Corona AO map?
There are some major differences:
- Corona Distance map cannot be used within a single object.
Corona AO map can be used to color different parts of a single object, or multiple objects, based on their distance from each other (convex or concave areas). The CoronaDistance map can only be used based on the distance between two or more different objects.
- Corona AO is raytraced, so it is computed only during the actual rendering. This means that the CoronaAO map cannot be used, for example, as a distribution map to scatter instances using CoronaScatter, as a displacement map, or as a bump map. CoronaDistance can be used in such cases, and it updates in real time, even in the viewport.
- The quality of the CoronaAO map improves progressively during rendering, so it first appears noisy, and then gradually becomes noise-free with each subsequent render pass. CoronaDistance is computed in one go, and immediately renders noise-free.
Distance from – Defines the objects from which the distance is being calculated.
Color near – The color or texture used near the surface of any objects included in the Distance from list. The exact distance is specified using the Distance near parameter.
Distance near – When any surface of any objects included in the Distance from list is closer than this distance, Color/texmap near is used. For distances between near and far, a blend between the near and far colors/texmaps is used.
Color far – The color or texture used far from the surface of any objects included in the Distance from list. The exact distance is specified using the Distance far parameter.
Distance far – When all surfaces of any objects included in the Distance from list are farther than this distance, Color/texmap far is used. For distances between near and far, a blend between the near and far colors/texmaps is used.
Color inside – When enabled, a different color/texmap is applied for points that are 'inside' (based on the shading normal) the Distance from objects. When disabled, the same distance gradient as for outside objects is used.
Precise mode – More robustly determines the inside of all meshes.
Fast mode – A bit faster mode which works correctly only with simple meshes.
Generally you don't need to use the fast mode unless you need to render older scenes.
Distance scale – When used, both near and far distances are multiplied by the color values in the Distance scale map. 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.
Example of using Corona Distance Map as a Surface Scattering Map in Chaos Scatter and a spine as Distance From object.