How to use the Corona Fabric Material?

Overview

Woven fabrics are composed of many yarn strands interlaced with each other, which gives them several properties that require a dedicated material. The Corona Fabric Material makes it easy to set up fabrics with distinctive patterns and physically-accurate shading behavior. It is mainly intended for textiles (twill, satin, velvet), however it can also be used for anything woven, such as wicker or bambooworking.
 

swirl3.jpg

 

Glossary

Weave - the structure or pattern created by interlacing two sets of yarns.

Yarn - a continuous strand of fibers that has been twisted or spun together so it can be used to make fabric.

Weft - a horizontal strand of yarn.

Warp - a vertical strand of yarn.

Plies - yarn strands are composed of several strands themselves, twisted in a helical fashion. These sub-strands are called "plies".

Fibers - the tiny filaments that make up yarn and help determine how rough the fabric looks.

Sheen - a subtle highlight effect visible mainly at the grazing angles of the fabric. Typically seen in such materials as velvet. 

 

Fabric Geometry

Pattern details

The macro-level structure of the fabric is the yarn, which is made of warps (vertical strands) and wefts (horizontal strands). Warps interlace above and below wefts, according to a weave pattern.

 

Weave pattern - pattern to be tiled across the surface. Several patterns are available:

Flat

Plain

Twill

Satin

Mosaic

Diamond

Spiral

Broken Twill

Shaded Twill

Herring Bone

Huck a Back

Welts and Pique

 

Mock Leno

 

You can also specify a custom pattern using a map. The map should be reasonably low-resolution and should consist of black and white pixels only. Pixels of any other color will be interpreted as either white or black, whichever their brightness is closer to. 

 

Pattern size (h/v): when you specify your own pattern, you need to specify the resolution of the pattern, which should be an exact match to the resolution of the bitmap texture. 

 

Weft repeats  - into how many strands each weft should be split

Warp repeats - into how many strands each warp should be split

Plain pattern

 

 

Plain pattern 

with warp repeat = 2

 

Twill pattern

with warp repeat = 3

and weft repeat = 2

Tiling (h) - number of pattern tiles in the horizontal direction. This value must be specified even if a custom pattern is used. In that case, the map tiling value should match this one.
 

Tiling (v) - number of pattern tiles in the vertical direction. This value must be specified even if a custom pattern is used. In that case, the map tiling value should match this one.


Scale - multiplier for both tiling values

3x3 diamond tiling

 

10x10 satin tiling

 

Custom pattern of size 80x80

with tiling of 2x2

Yarn strands

Once the pattern is determined, the geometry of the yarn itself can be refined. Strands can be flat or cylindrical, have various diameters and can oscillate at different amplitudes. Flatter strands will typically have low oscillations, while rounder ones will bend more.

 

Weft diameter - fraction of the space filled by each horizontal strand

Warp diameter - fraction of the space filled by each vertical strand

Diameter of 0.5

Diameter of 0.9


Amplitude - Strength of the yarn oscillations when interlacing 

Amplitude of 0.1

Amplitude of 0.6

                     (Both illuminated by a light source on the right)

 

Thickness - Thickness of the yarn, which determines the roundness of the strands

Thickness of 0.1

Thickness of 0.8

                     (Both illuminated by a light source on the right)

Distortion

To prevent the geometry from being too regular, the yarn strands can be distorted sideways along their length.

 

Texture - custom map for distorting the the yarn strands. If none provided, a default noise map is used


Strength - strength of the distortion effect. The sideways bending can go from none all the way to the strand boundary, after which the space belongs to a different strand

Distortion strength of 0.3

Distortion strength of 1.0


Frequency - smoothness of the distortions.

Distortion frequency of 0.1

Distortion frequency of 0.5

 

Depth

To induce a sense of depth, parallax effect can be enabled to change the geometry according to the view angle. This effect is useful for close-ups and fabrics with distinctive yarn strands. Because of its heavy performance cost, it should only be used when its impact is visually noticeable, and when the surface is not at a high grazing angle.
 

Parallax quality - quality of the effect. If set to zero, disables parallax entirely.

 

Yarn offset - how much below the surface the yarn strands should be. This parameter is sometimes useful when large amplitude and thickness values cause the strands to flatten at the top. This however can drastically reduce the quality of parallax for curved surfaces.

Parallax with amplitude of 0.6

and thickness of 0.4

Parallax with amplitude of 0.2

and thickness of 0.1

 

Plies

Yarn strands are composed of several strands themselves, twisted in a helical fashion. These sub-strands are called “plies”.

 

Count - the number of plies

Twisting - how much the plies twist

Strength - how much impact on the shading the plies have

4, 6, and 8 plies

Twisting of 0.15, 0.4, and 0.8

Strength of 0.2 and 0.7

 

Fibers

Similarly to plies, fibers can be used to induce even finer-scale bumps.

 

Texture - custom map for distorting the normals. If none provided, a default noise map is used

Twisting - how much the fibers twist

Strength - how much impact on the shading the fibers have

Fiber strength of 0.2

Fiber strength of 0.8

 

Frequency - scale of the perturbations

Fiber frequency of 3

Fiber frequency of 10

 

Yarn appearance

This section allows users to precisely customize how fabrics are illuminated. The base layer of a textile is modeled by a standard reflective rough surface, similar to the Corona Physical Material. Additionally, light can enter the fabric, and either refract specularly, or bounce inside (scatter) and come out on either side. 

 

Surface

Surface parameters control the specularity of the material. They influence both reflection and refraction.

 

Weft color - Albedo of the wefts

Warp color - Albedo of the warps

Roughness - How rough the surface is. Low values make the surface smooth, which brings it closer to a mirror. High values scatter light more uniformly

Refraction - How much light is able to enter the yarn, to then either refract specularly or scatter within the strands. If this value is less than 1, a fraction of the light supposed to enter the fabric will instead be diffusely reflected.

Base IOR - The index of refraction of the material, which determines the bending angles of light. With higher values the material appears more reflective. 

Bump - Intensity of additional bump mapping.

 

Scattering

Scattering parameters control how much of the light that enters the yarn bounces within the strands, on which side it exits, and with what color. 

 

Scattering color - the color of the light that bounces within the strands

Amount - how much light scatters within the strands, as opposed to how much directly refracts specularly without any internal interaction. Low values make most of the light refract specularly, while high values make most of it scatter inside.

Directionality - how much of the light that scatters comes out on the same side as it entered, as opposed to how much comes out on the other side. Low values make most of the scattering light reflect, while high values make most of it refract.
 

Examples

A simple plane-shaped colorless fabric is rendered from a top-view, with two spherical light sources. One is a red light that provides frontal illumination (it is located near the camera), and the other is a blue light that provides illumination from the back (the fabric lies between the blue light and the camera).

 

Diffusedness

No diffuse (Refraction = 1)

No scattering

Semi-diffuse (Refraction = 0.5)

No scattering

Left: Without scattering or diffusion, and at such an angle, most of the light is specularly refracted, which is why the dominant color is blue and the shape of the light source is clearly visible underneath the fabric.

Right: With partial diffusion, some of the front light reflects, making the red color more dominant than before.

 

Scattering amount

No diffuse

Semi-scattering (Amount = 0.5)

Balanced (Directionality = 0.5)

No diffuse

Highly-scattering (Amount = 1.0)

Balanced (Directionality = 0.5)

Left: Both red and blue light contribute, as scattering adds both reflection and refraction. The silhouette of the blue light is still quite visible due to specular refraction, making the blue color more dominant in the center.

Right: With almost no specular refraction, the silhouette of the blue light is blurred, giving the fabric a more uniform look.

 

Scattering directionality

No diffuse

Highly-scattering (Amount = 1.0)

Highly-reflective (Directionality = 0.2)

No diffuse

Highly-scattering (Amount = 1.0)

Highly-refractive (Directionality = 0.8)


Left:  the fabric has almost no specular refraction, and all scattering is reflected, making red the more dominant color

Right: the fabric has almost no specular refraction but all scattering is refracted, making blue the more dominant color, without making the blue light silhouette more visible

 

Opacity

Specifies how transparent the material is. When using a texture, white areas are interpreted as fully opaque and black areas are interpreted as fully transparent. Values between white and black are semi-transparent. 

 

Sheen Layer

Specifies the strength, roughness, and color of the subtle highlight effect visible at the grazing angles of the material. 

 

Tips & Tricks

Custom Weave Pattern

You can use a custom Corona Bitmap or a procedural texture to define the areas where wefts and warps show up in your fabric material, as if the texture was woven. 

corona-flag.jpg

 

If you simply set a Corona Bitmap as the pattern, the result most likely won't be realistic and will appear as if it was a print applied to the surface of the fabric:

default-texture.jpg

 

To fix that, we need to make some adjustments:

  • We need to make sure that the resolution of the bitmap texture (width x height in pixels) is the same as the "resolution" of the fabric material (the number of wefts x warps).
  • We need to disable texture filtering so that we end up with a texture consisting of sharp pixels without any blurring. To do this, we need to set Interpolation to "Nearest Neighbor" in the Corona Bitmap's settings.

In the below example, we reduced the resolution of the Corona logo texture to 100x100px in a 2D editor, set its interpolation to "Nearest Neighbor", and set the scale of the fabric material's pattern to 100:

interpolation-nn.png
scale100.png

 

The result is a woven version of the Corona logo:

woven-logo.jpg
woven-logo2.jpg

 

Examples

 

Weave pattern: Plain (default)

default.jpg
 
 

 

Weave pattern: Herring Bone

herringbone.jpg
 
 

 

Weave pattern: Spiral

spiral.jpg
 
 

 

Weave pattern: Diamond

diamond.jpg
 
 

 

Using Refraction and Scattering

scattering.jpg
 
 

 

Material setup:

scattering-ui.png
 

 

 

 

 

 

 

 


 

Was this article helpful?
2 out of 2 found this helpful