Skip to content

LuxRender Materials

Jason Brenneman edited this page Oct 13, 2023 · 14 revisions

Materials

LuxRender supports a variety of physically based material models. The materials vary in the way incoming light is reflected on the surface (and transmitted through it, with some materials).

Typically, materials can be adjusted by changing their color, assigning textures and bump maps (either bitmap or procedural) and setting roughness and displacement values, but the exact options depend on the material.

This page contains an overview of the material types. Information about specific parameters is explained further down the page.

Matte

Material_matte

Matte is LuxRender's most basic material. It represents a dull, diffuse surface. It is very quick and efficient to render, so it works well for background objects such as walls. It can represent dull surfaces such as matte plastic, clay, concrete, unpolished stone, and drywall.

Diffuse

This is the only color for matte, it determines the color of light scattered off the surface. Any light not scattered off the surface is absorbed (lost).

Matte_kd

Examples of diffuse color for matte. RGB values for each image, from left to right: (.64 .64 .64) (.64 .10 .10) (.10 .64 .10) (.10 .10 .64) (.10 .10 .10).

Sigma

The sigma parameter determines how rough the surface appears, with zero being perfectly smooth. The maximum value is 90 degrees, however very rough materials will have a sigma of no more than 30 degrees in the real world. The rougher the surface the more light is reflected back at grazing angles, giving it a flatter look. When sigma is zero the Lambertian reflectance model is used. When sigma is non-zero the Oren-Nayar reflectance model is used.

Matte-sigma

Sigma, from left to right: 0, 10, 20, 30, 60 ,90.

The Lambertian reflectance model represents a perfectly smooth surface. This model assumes that the light is reflected equally in all directions, and that the object is thick enough that no light is transmitted through the object. It also assumes that the light exits the material very close to the point of entry, such that the error of pretending the light exits exactly at the point of entry is small.

The Lambertian model does not consider the roughness of the surface. This makes it inaccurate for many materials such as clay, concrete, sand and cloth, where a plain Lambertian material would appear too dark at grazing angles. The Oren-Nayar reflectance model was developed to correct this. It is a microfacet-based model, where each facet is assumed to be a Lambertian reflector. The model takes into account the interplay between neighboring facets, such as shadowing and inter-reflection. This model is used for rough surfaces. The sigma parameter is the standard deviation of the angle of the microfacet grooves.

Matte Transluscent

Material_matte_translucent

Matte Translucent is an extension of the matte material that also allows for transmission of light through the material. As its name implies, it is not shiny and transmitted light will obscure details. It is somewhat slower to render than plain matte due to the added calculations. It is well suited to plastic lamp covers, where glossy translucent would simply add calculation time, as well as dull polymers, some dull organic materials (such as cheese or banana peels) and some kinds of textiles (those that are not sheer or shiny).

Energy Conserving

This switch enables the newer energy-conserving mode of calculating the transmission and reflection colors, rather than the traditional mode. It is recommended that you always enable it. The descriptions of color parameters below assume that this mode is enabled.

Matte_translucent_energyconserving

Energy conserving enabled(left) and disabled(right). The red color amount is 0.6 for both reflection and transmission resulting in a total of 1.2 which is not physically possible. Energy conserving reduces the transmission color amount so the total will not go above 1.0. Without energy conserving the render time was also 15x longer in order to get the image clean from fireflies.

In traditional mode, separate color values are taken for reflection and transmission, and simply used as is. This means it is possible to specify that the material both reflects a ray at full power AND transmits it at full power, resulting in twice as much light energy as what actually hit the material to begin with. This is physically impossible, and can result in fireflies, and the material appearing to glow. To avoid this, you must make sure your reflection and transmission RGB values do not add up to more than 1. Energy-conserving mode causes the transmission color to be multiplied by 1-R (R being the specified reflection color). This effectively results in transmission being calculated on the light left over after reflection is taken into account. When using this option, remember that you need to specify a low reflection color to get the transmission effect.

Reflection Color

This is matte translucent's main color, it specifies the color of light that is scattered off the surface of the material. Any leftover light is considered to be transmitted. That means you will need to specify a darker color to get a highly translucent material. For a dark material, select a low reflection color and a low transmission/volume color.

Transmission Color

This determines the color of light that transmits through the material. For best results, you should leave this as 1.0 (full white) and use the object's volume to give the material its internal color. This allows for volumetric color absorption and, optionally, subsurface scattering. Color from the transmission setting is applied uniformly to transmitted light, and can make your object look unnaturally uniform in color, so using a volume is recommended.

Sigma

The sigma parameter determines how rough the surface appears, with zero being perfectly smooth. The maximum value is 90 degrees, however very rough materials will have a sigma of no more than 30 degrees in the real world. The rougher the surface the more light is reflected back at grazing angles, giving it a flatter look. When sigma is zero the Lambertian reflectance model is used. When sigma is non-zero the Oren-Nayar reflectance model is used.

The Lambertian reflectance model represents a perfectly smooth surface This model assumes that the light is reflected equally in all directions, and that the object is thick enough that no light is transmitted through the object. It also assumes that the light exits the material very close to the point of entry, such that the error of pretending the light exits exactly at the point of entry is small.

Matte_translucent_sigma_0to90

Sigma 0 to 90. Top left sigma 0, bottom right sigma 90.

The Lambertian model does not consider the roughness of the surface. This makes it inaccurate for many materials such as clay, concrete, sand and cloth, where a plain Lambertian material would appear too dark at grazing angles. The Oren-Nayar reflectance model was developed to correct this. It is a microfacet-based model, where each facet is assumed to be a Lambertian reflector. The model takes into account the interplay between neighboring facets, such as shadowing and interreflection. This model is used for rough surfaces. The sigma parameter is the standard deviation of the angle of the microfacet grooves.

Glossy

New_glossy

The Glossy material represents a diffuse surface with a varnish coat. It is well suited to most plastics, lacquered wood, glazed ceramics (porcelain/tile), and wet surfaces. With the "multibounce" option enabled, the material will have a soft appearance, mimicking the scattering by fuzz or hair, making it well suited to rendering many types of cloth. It is slower to render than matte however, and can impact render times if used for a large surface such as a floor.

Diffuse Color

This is the color of the matte base layer, and will be the main color of the material.

Glossy_kd

Examples of diffuse color for glossy. RGB values for each image, from left to right: (.64 .64 .64) (.64 .10 .10) (.10 .64 .10) (.10 .10 .64) (.10 .10 .10).

Specular Color and IOR

This is the color of the varnish coat. In many real world materials, all color is in the base rather than the gloss, so this color should often be left as gray. (For example, the paint on porcelain is applied before the glaze, so your paint texture should only be on the diffuse channel). Darker colors will make the material less shiny, especially at shallow angles. Optionally, you can specify an index of refraction for the coating material, however this will prevent you from coloring the coating, it will always be gray. This can be useful if you want to specify a specific material making up the coating. For example, a wet floor would have IOR = 1.333, the IOR of water.

Matte_50glossy_0_033_066_1

A matte grey material and a glossy grey material with black, dark gray, light gray and white specular colors.

The specular color should not be set higher than about .25, and many everyday materials will have much lower values, such as .03-.05. The IOR and specular color are related via the formula IOR = (sqrt(Ks)+1)/(1-sqrt(Ks)) (Ks is the proper term for specular color). This translates a specular color of .25 to an index of refraction of ~3. A specular color of .05 results in an IOR of approximately 1.6, which is still a bit on the high side. A specular color of 1.0 (full white) results in an IOR of infinity, which is impossible. Even the most extreme meta-materials would only have a specular color of approximately 0.9 (IOR = 40)

Roughness

This determines how shiny the material is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are shinier, with 0 being matte. If your exporter uses the direct roughness control, lower values are shinier, with 0 being a perfect reflector and .8 being matte. Values between .8 and 1 are an unrealistic "super-matte" and should be avoided. To convert exponent to roughness use the following formula: ROUGH = SQRT(2 / (EXPONENT + 2)).

Exponent

A glossy grey material with exponent 1, 10, 100, 1000 and 10000 (roughness: 0.816, 0.408, 0.140, 0.045, 0.014).

Absorption Color and Depth

These allow you to specify the color and depth of light absorption by the varnish. Note that since this is an absorption color, it will seem to work "backwards". Setting it to blue will cause blue light to be absorbed, leaving you with a yellow-orange appearance. To defeat this option, set the color to full black (0.0).

Absorption-example

Examples of various absorption settings.

Multibounce

The option will simulate light being scattered at the surface by things such as fuzz or fine hair. It is useful when using glossy for a skin or cloth material, and will give a soft, fuzzy appearance.

Multibounce

A multibounce LuxBall.

Glossy Translucent

Material_matte_translucent

Glossy Translucent represents a diffuse surface with both a transmission component AND a varnish coat. It is effectively a combination of glossy and matte translucent. Remember that as a result of this, it is the slowest to render of the four "basic" materials, you should use it only when you need both transmission and glossiness. This material is well suited to most organic materials, including skin, internal organs, leaves, eyes, milk, ketchup, alien slime, etc. It can also work well for soap, and certain plastics.

Note: Glossy translucent does not have matte translucent's "energy conserving" option, it acts as though it was always on. So transmission will always be calculated based on the leftover light from the reflection steps.

Diffuse Color

This is the color of the matte base layer, and will be the main color of the material, assuming it is set above .4-.5 or so. Any light not reflected is transmitted, so lower than that it will be mainly the transmission/volume color

Transmission Color

This determines the color of light that transmits through the material. For best results, you should leave this as 1.0 (full white) and use the object's volume to give the material its internal color. This allows for volumetric color absorption and, optionally, subsurface scattering. Color from the transmission setting is applied uniformly to transmitted light, and can make your object look unnaturally uniform in color, so using a volume is recommended.

Specular Color and IOR

This is the color of the varnish coat. In many real world materials, all color is in the base rather than the gloss, so this color should often be left as gray. (For example, the paint on porcelain is applied before the glaze, so your paint texture should only be on the diffuse channel). Darker colors will make the material less shiny, especially at shallow angles. Optionally, you can specify an index of refraction for the coating material, however this will prevent you from coloring the coating, it will always be gray. This can be useful if you want to specify a specific material making up the coating. For example, a wet floor would have IOR = 1.333, the IOR of water.

The specular color should not be set higher than about .25, and many everyday materials will have much lower values, such as .03-.05. The IOR and specular color are related via the formula IOR = (sqrt(Ks)+1)/(1-sqrt(Ks)) (Ks is the proper term for specular color). This translates a specular color of .25 to an index of refraction of ~3. A specular color of .05 results in an IOR of approximately 1.6, which is still a bit on the high side. A specular color of 1.0 (full white) results in an IOR of infinity, which is impossible. Even the most extreme meta-materials would only have a specular color of approximately 0.9 (IOR = 40)

Roughness

This determines how shiny the material is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are shinier, with 0 being matte. If your exporter uses the direct roughness control, lower values are shinier, with 0 being a perfect reflector and .8 being matte. Values between .8 and 1 are an unrealistic "super-matte" and should be avoided.

Absorption Color and Depth

These allow you to specify the color and depth of light absorption by the surface coating. Note that since this is an absorption color, it will seem to work "backwards". Setting it to blue will cause blue light to be absorbed, leaving you with a yellow-orange appearance. To defeat this option, set the color to full black (0.0). This parameter is not related to volume absorption.

Absorption-example

Examples of various absorption settings.

Multibounce

The option will simulate light being scattered at the surface by things such as fuzz or fine hair. It is useful when using glossy translucent for a skin or cloth material, and will give a soft, fuzzy appearance.

Multibounce

A multibounce luxball, using the basic glossy material.

Two-Sided

This option will enable a second set of specular color, absorption, and roughness controls for the back face of the material, that is, the side opposite the normal. This is useful for planar surfaces and open meshes, such as leaves or textiles. Many of these items are much less glossy on the back, this option allows for that. If this option is left off, the back face will use the same settings as the front face.

Metal2

Material_metal

The Metal2 material is an upgraded version of the old metal material. Rather than accepting simply presets or measured data, Metal2 simply has a generic Fresnel input that allows simple loading of both measured and arbitrary NK values. The Fresnel color texture can help by generating an NK profile to give a particular color, allowing simple custom colors and reflection color texturing.

Fresnel

Defines the NK curve used by the metal. This can be a constant value, although it is more useful to supply one of the Fresnel textures. The Fresnel color texture can be used to give custom colors to the metal. The Fresnel name texture can load presets and measured data files in the Sopra or Luxpop formats. Some exporters have an option to auto-generate a Fresnel color or Fresnel name texture to simplify the configuration of measured data and custom colors.

Roughness

This determines how shiny the material is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are shinier, with 0 being matte. If your exporter uses the direct roughness control, lower values are shinier, with 0 being a perfect reflector and .80 being matte. Values between .80 and 1 are an unrealistic "super-matte" and should be avoided.

Metal_rough_line

Varying roughness values for the metal2 material, using the fresnelname texture's aluminum preset. From left to right, roughness = .01, .05, .20, .40, and .80. Exponent = 19998, 798, 48, 10.5, and 1.

Shiny Metal

Material_shiny_metal

The Shiny Metal material represents a generic base metal with a polish coat. It is suited to any sort of generic polished metal. It is difficult to use for dull metals since the roughness effect only works on the polish coat.

Reflection Color

This is the color of the metal base, it will determine the color of direct reflections. Note that this is not affected by the roughness value.

Shiny_metal_with_various_reflection_colors

Shiny metal with various reflection colors.

Specular Color

This is the color of the polish coat, it controls the color of the highlights. You can set it to 0 to defeat the polish coat, leaving you with the mirror material. This component IS affected by the roughness value.

Shiny_metal_with_various_specular_colors

Shiny metal with various specular colors. Dark grey (default), light grey, red, yellow and black (no polish coat).

Roughness

This determines how shiny the polish coat (specular component only) is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are shinier, with 0 being a dull coating. If your exporter uses the direct roughness control, lower values are shinier, with 0 being a perfect reflector and .8 being a dull coating. Values between .8 and 1 are an unrealistic "super-dull-coating" and should be avoided.

Shiny_metal_roughness

Shiny metal with roughness values 0.8, 0.4, 0.2, 0.1 and 0.05.

Thin Film

Shinymetal_thinfilm

This allows you to define a film coating under the polish. This usually results in a rainbow colored reflection. It has two controls, a depth and IOR. The IOR should match that of your film material (Cleaning solution, which can leave such a film behind, has an IOR of ~1.3-1.35, due to being almost entirely water). You can vary the thickness to achieve the desired effect if you do not know the exact amount. Thickness of several hundred nm will result in the most pronounced effect.

Shiny Metal vs. Glossy

The Shiny Metal and Glossy materials both simulate a base material with a glassy coating on top of it. (in technical terms, a base reflector with a dielectric coat). The difference is that Glossy has a matte base, while Shiny Metal has a mirror-like metallic base. One can think of it in this sense:

  • Glossy = coated Matte material
  • Glossy Translucent = coated Matte Translucent material
  • Shiny Metal = coated Mirror material.

(That is not entirely how it works in the LuxRender core, but it is close enough for most material configuration needs)

Mirror

Material_mirror

The Mirror material represents a perfectly specular mirror. It's a handy shortcut for adding a mirror to your scene. It is simply Shiny Metal without the microfacet-polish coat.

Reflection Color

This is the color of the mirror. Adjusting it will control the apparent "brightness" of the "mirror world." A value of around .55-.65 is a good starting point.

Thin Film

This allows you to define a film coating on top of the polish. This usually results in a rainbow colored reflection. It has two controls, a depth and IOR. The IOR should match that of your film material (Cleaning solution, which can leave such a film behind, has an IOR of ~1.3-1.35, due to being almost entirely water). You can vary the thickness to achieve the desired effect if you do not know the exact amount. Thickness of several hundred nm will result in the most pronounced effect.

Mirror_ThinFilm_10-2500nm

Mirror material with a thin film coating starting at a thickness of 10nm and continuing until 2500 nm. Notice that as the film thickness exceeds 700 nm greater thickness are required to see any noticeable change. The IOR is 1.333 (water).

Glass

Glass_header-360x360

The glass material represents a smooth dielectric substance. It works well for materials such glass, crystals, clear liquid, transparent plastic, and gemstones.

IOR

The index of refraction for the material. This value determines the overall appearance of the material, and should be set according to the material you are trying to simulate.

Ior_param_line

Index of refraction examples. From left to right, hydrogen gas (1.000132), ice (1.31), common crown glass (1.519), heavy flint glass (1.805), and diamond (2.41).

Reflection Color

This is the color of light reflected from the surface.

Transmission Color

This is the color that light will be filtered to after being transmitted. For perfectly clear glass, set both reflection and transmission colors to 1.0. The color given here will be applied to the material uniformly, you may wish to derive the color from the objects volume instead. (or use the glass2 material, which uses the volume for nearly everything).

Cauchy B

This is the B value to Cauchy's equation. (The value specified under IOR will be used for n) Setting this to anything other than 0 will enable chromatic dispersion, aka splitting the spectrum into a rainbow of colors. Be warned this is an intensive effect that will greatly increase the number of samples (and photons, if applicable) that are needed!

Dispersion_prism

Glass prism. IOR: 1.52, Cauchy B: 0.01.

Architectural

This option disables refraction during transmission. The effective result is that transmission will appear as though the glass had an IOR of 1.0, while reflections will use the specified IOR. The resulting glass will show only the transmission/reflection colors, volumes effects, and reflections, and is not terribly realistic. However, it won't look much different for a thin sheet of glass such as a window, and it will render much faster, as there is less to compute.

There are several other important features to architectural mode, besides reducing the necessary calculations of the material. Because there is no refraction during transmission, architectural glass is transparent to shadow rays and alpha, neither of which is the case in non-architectural mode. This is especially important for window glass. Because it is transparent to shadow rays, it is possible to perform direct light sampling through the window to outside light sources, greatly improving the render efficiency. And because it reflects but still propagates alpha, it allows you to have realistic interior reflections and absorption on the windows, while still being able to composite in a backdrop for the view outside of the window.

Glass_architectural

Glass with architectural option disabled(left) and enabled(right). IOR: 1.52.

Glass_sheet_architectural

Glass sheet with architectural option disabled (two left) and enabled (two right).

Thin Film

This allows you to define a film coating on top of the glass. This usually results in a rainbow colored reflection. It has two controls, a depth and IOR. The IOR should match that of your film material (Cleaning solution, which can leave such a film behind, has an IOR of ~1.3-1.35, due to being almost entirely water). Refer to the image below to gain the desired effect.

Glass_ThinFilm_10-2500nm

Glass material with a thin film coating starting at a thickness of 10nm and continuing until 2500 nm. Notice that as the film thickness exceeds 500 nm greater and greater thicknesses are required to see any noticeable change. The IOR is 1.333 (water).

Glass vs. Glass2

LuxRender also contains as "Glass2" material which functions essentially as an "empty shell" for a volume. This volume then gives the material its IOR, as well colors in the form of absorption and scattering. It is important to remember that the Glass material can use volumes for absorption and scattering as well, it will simply use its own IOR value, and the reflection and transmission colors will still be used. This is the same way you would use volumes with the other transparent/translucent materials.

In most cases, Glass and Glass2 will be similar in appearance, given the same volume, and IOR settings on the Glass material and the volume being similar. However, Glass2 can accurately calculate the relative index of refraction between two surfaces (such as water in a glass), which Glass requires to be done manually with a 3rd mesh and the user calculating the relative IOR value by hand. The volume system allows for its mediums to be given more specific and technical IOR data than the Glass material, such as using the Sellmeier equation, so Glass2 technically can handle light more accurately than Glass.

On the other hand, since the Glass2 material does not define its own surface, it lacks the Glass material's option for things such as a separate reflection color (for painted surfaces) or using a thin film coating. Depending on your exporter, it may also be more work to set up Glass2 when you just want some generic glassy surface for an object off to the side of the frame.

Examples

Glass_with_various_colors_non_volumetric

Glass with various colors using reflection and transmission color and no volumes. IOR: 1.52.

  1. Clear glass. Reflection and transmission is both set to full white.
  2. Red glass. Reflection and transmission use same color.
  3. Green glass. Reflection and transmission use same color.
  4. Blue glass. Reflection and transmission use same color.
  5. White-red glass. Reflection is full white and transmission is using a white-red procedural texture. Note that the red color is for the most part at the back side of the glass, i.e where the light ray exits the glass, since the texture is set at the transmission channel.

Glass_with_various_colors_volumetric

Glass with various colors using volumes. IOR: 1.52.

  1. Red volume. Reflection and transmission colors are set to full white.
  2. Yellow volume. Reflection and transmission colors are set to full white.
  3. Green volume. Reflection and transmission colors are set to full white.
  4. Reflection color is blue and transmission color is full white, using a green volume.
  5. Reflection color is full white. Transmission color and volume are blueish-pink.

Glass_with_decreasing_reflection_color

Glass with decreasing reflection color. Transmission color remains constant at 0.9. IOR: 1.52. Reflection colors used: 0.9, 0.7, 0.5 and 0.2.

Glass_with_decreasing_transmission_color

Glass with decreasing transmission color. Reflection color remains constant at 0.9. IOR: 1.52. Transmission colors used: 0.9, 0.7, 0.5 and 0.2.

Glass2

Glass2_header_360x360

Glass2 is an updated version of the basic glass material. It is the recommended material for glass, crystals, gemstones, transparent plastics and clear liquids.

It takes its properties almost entirely from the volume assigned to the object using it. It does not even have its own color or index of refraction. Since it takes its IOR from the object's volume properties, it is able to understand the IOR between surfaces to some degree, and due to the nature of the volume system this allows for more specific and technical optical properties than are possible with the older glass material.

Architectural

Glass2_architectural_180x180

This option disables refraction during transmission. The effective result is that transmission will appear as though the glass had an IOR of 1.0, while reflections will use the specified IOR. The resulting glass will show only the transmission/reflection colors, volumes effects, and reflections, and is not terribly realistic. However, it won't look much different for a thin sheet of glass such as a window, and it will render much faster, as there is less to compute.

There are several other important features to architectural mode, besides reducing the necessary calculations of the material. Because there is no refraction during transmission, architectural glass is transparent to shadow rays and alpha, neither of which is the case in non-architectural mode. This is especially important for window glass. Because it is transparent to shadow rays, it is possible to perform direct light sampling through the window to outside light sources, greatly improving the render efficiency. And because it reflects but still propagates alpha, it allows you to have realistic interior reflections and absorption on the windows, while still being able to composite in a backdrop for the view outside of the window.

Dispersion

Dispersion_prism

Glass prism using the Cauchy Fresnel texture. IOR: 1.52, Cauchy B: 0.01.

This enables chromatic dispersion, which is ignored otherwise. Chromatic dispersion is the splitting of the spectrum into a rainbow of colors, such as from a prism. Be warned this is an intensive effect that will greatly increase the number of samples (and photons, if applicable) that are needed! When using dispersion, it is recommended that the volume have a Fresnel texture type other than "constant" as constant does not supply enough information to calculate dispersion accurately.

Glass vs. Glass2

LuxRender also contains a "Glass" material which has its own color and IOR values that it will use. Glass can be used with volumes as well, however it will ignore the IOR, and will still add its own transmission color unless this was set to 1.0 (full white).

In most cases, Glass and Glass2 will be similar in appearance, given the same volume, and IOR settings on the Glass material and the volume being similar. However, Glass2 can accurately calculate the relative index of refraction between two surfaces (such as water in a glass), which Glass requires to be done manually with a 3rd mesh and the user calculating the relative IOR value by hand. The volume system allows for its mediums to be given more specific and technical IOR data than the Glass material, such as using the Sellmeier equation, so Glass2 technically can handle light more accurately than Glass.

On the other hand, since the Glass2 material does not define its own surface, it lacks the Glass material's option for things such as a separate reflection color (for painted surfaces) or using a thin film coating. Depending on your exporter, it may also be more work to set up Glass2 when you just want some generic glassy surface for an object off to the side of the frame.

Example of Glass2 IOR Handling

Luxball_in_waterglass

This image demonstrates the glass2 IOR handling. There are mainly four different interfaces in this scene (air/glass, glass/water, air/water, and water/LuxBall). You only have to define the volumes (air, water, glass, LuxBall) with the specified IOR. Assign them to the interior, exterior slot respectively in the material for the interfaces. The IOR handling of the glass2 material calculates the right relative IOR.

Rough Glass

Roughglass_header-360x360

The Rough Glass material represents a rough dielectric surface. It works well for frosted glass and some kinds of ice.

IOR

The index of refraction for the material. This value determines the overall appearance of the material, and should be set according to the material you are trying to simulate.

Ior_param_line

Index of refraction examples. From left to right, hydrogen gas (1.000132), ice (1.31), common crown glass (1.519), heavy flint glass (1.805), and diamond (2.41).

Reflection Color

This is the color of light reflected from the surface.

RoughGlassSamples

Rough glass material with RGB all set to 0.0, 0.3, 0.7 and 1.0 for all transmission and reflection combinations. Roughness is 0.075 for all of the images. Note that the bottom left image is an impossibly black material.

Dispersion

Enables chromatic dispersion to be calculated from the Cauchy B value (see below). Setting this to true will enable chromatic dispersion, aka splitting the spectrum into a rainbow of colors. Be warned this is an intensive effect that will greatly increase the number of samples (and photons, if applicable) that are needed!

Cauchy B

This is the B value to Cauchy's equation. (The value specified under IOR will be used for n).

Roughness

This determines how clear the material is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are more transparent, with 0 being a matte glass surface. If your exporter uses the direct roughness control, lower values are clearer, with 0 being a perfectly reflective and transmissive surface like the glass and glass2 materials, and .8 being matte. Values between .8 and 1 are an unrealistic "super-matte" and should be avoided.

Rough_glass_roughness

Rough glass with roughness values 0.8, 0.4, 0.1, 0.05 and 0.01.

Mix

Material_Mix

The Mix material is a special material that is used to combine two other materials. Note that it is possible to use one mix material as a component of another mix material. This allows for complex shader combinations. When mixing materials that have interior volume(glass, rough glass and translucent), you need to specify the resulting volume in the mix material.

Material 1

Slot to attach the first component material.

Material 2

Slot to attach to the second component material.

Mix Amount

This specifies how much each component material contributes to the final result. A mix amount of 0 results in only the first component, 1 results in only the second component, everything else is somewhere in between. The mix amount is also texture-able, to allow the blending to be localized.

Example

Mix_material_examples

  1. Mix of clear glass2 and red velvet. The blue interior color is set in the mix material, not in one of the materials that are about to be mixed.
  2. Mix of silver and green rough glass.
  3. Mix of black highly glossy and cyan less glossy using a procedural texture as mix amount. Both materials have different procedural bump maps.
  4. Mix of glossy blue and glass2 using a procedural texture as mix amount.

Null

Null_header

Null is a special material that has no effect whatsoever on the light that strikes its surface. An object using the null material by itself will be invisible. This can be useful for a light that you want to emit without casting a shadow from other lights (remember that it will still be visible, since it emits its own light).

Null can be used with Mix material for two different tasks:

Opacity

It can be used without a texture to change the opacity of the output material. A mix that is part null will appear sheer, or if turned up high enough, ghostly-transparent.

Alpha Maps

When the mix amount is controlled by a texture, Null can be used for alpha mapping. In this case, set the null material in slot 1 and the mix amount to 1.0 (some exporters use the texture values directly rather than multiplying by the entered value, so this setting might not matter for all 3D packages)

If you have a PNG with transparency you can use this directly. Create a mix material where the first material is of the "Null" type, and the second material is the visible material. Set "Amount" to 1.0 and select texture and use the PNG file as an imagemap. In the imagemap's "channel" dropdown select "alpha".

Otherwise you can use this procedure:

In this example the mix control [mask] image's black parts will be mapped to invisible so create your mix control image accordingly.

  1. Open your base image in your favorite image editor. This tutorial will be using the GIMP.
  2. To make the background invisible make the background black (as stated above, the mix control image's black parts will be mapped to invisible)
  3. Shift+O for Select by color tool and select the black background
  4. Now invert the selection (Ctrl+I) to select everything else
  5. Flood that with white color by selecting the bucket and holding down Shift to fill all colors within the selected area (or it will try and do it color-by-color)
  6. Save it as 'Mask.jpg'
  7. Set up a mix material
  8. Amount: Set to 1 then select texture and use the 'Mask.jpg' image you just created
  9. Layer one is Null
  10. Layer two is matte with your original image which will now be masked by your mix control image.

In this example the mix control [mask] image's black parts were mapped to invisible. But this is as long as the Null material is in mat1 slot. If null is in mat2 then white will be invisible.

Null and Volumes

The null material can also be used with the object volumes feature in LuxRender to create a "volume-only" material. This is because LuxRender uses the regular material settings to define the surface of the material, and the medium settings to define how light is filtered as it moves through the material. Since null defines a surface that has no affect on light whatsoever, the only thing that appears is the color filtering through the object volume. The result is a mesh that looks like smoke or vapor.

At this time, only the surface of a material can emit light, the medium itself cannot. Since the surface of this material is "null", meshes with this material cannot be mesh lights without losing their volume-only appearance.

It is important to note that this technique is for rendering a mesh as a volume. LuxRender can render voxel data as well, assuming a compatible exporter is available, but that is outside the scope of this page.

Options

Null has no parameters of its own. Your exporter may offer emission or volume options, but these are technically not material parameters and are only located there for convenience.

Examples

Alpha_map

Procedural alpha mapping with the blender-voronoi texture.

Smokeball

A volume-only luxball created with null + homogeneous volume.

Glossy Coating

Material_glossycoating

Glossy Coating is an "empty gloss coating" material. It is used to add gloss layers on top of other materials. It is something of a special glossy material that has no base reflector of its own, but rather takes another material node as its base.

Base Material

The material node that forms the base reflector beneath the coat. If you use the matte material, the result will be the same as the regular glossy material. The material specified here can be any material type, including null, mix, layered, or another glossy oating material. The only exception is that the initial node in the chain is not glossy coating, as all glossy coating materials need to have a base material specified.

Specular Color and IOR

This is the color of the varnish coat. In many real world materials, all color is in the base rather than the gloss, so this color should often be left as gray. (For example, the paint on porcelain is applied before the glaze, so your paint texture should only be on the diffuse channel). Darker colors will make the material less shiny, especially at shallow angles. Optionally, you can specify an index of refraction for the coating material, however this will prevent you from coloring the coating, it will always be gray. This can be useful if you want to specify a specific material making up the coating. For example, a wet floor would have IOR = 1.333, the IOR of water.

Matte_50glossy_0_033_066_1

A matte grey material and a glossy grey material with black, dark gray, light gray and white specular colors.

The specular color should not be set higher than about .25, and many everyday materials will have much lower values, such as .03-.05. The IOR and specular color are related via the formula IOR = (sqrt(Ks)+1)/(1-sqrt(Ks)) (Ks is the proper term for specular color). This translates a specular color of .25 to an index of refraction of ~3. A specular color of .05 results in an IOR of approximately 1.6, which is still a bit on the high side. A specular color of 1.0 (full white) results in an IOR of infinity, which is impossible. Even the most extreme meta-materials would only have a specular color of approximately 0.9 (IOR = 40)

Roughness

This determines how shiny the material is by varying the roughness of microfacets. If your exporter uses the exponent to control roughness, higher values are shinier, with 0 being matte. If your exporter uses the direct roughness control, lower values are shinier, with 0 being a perfect reflector and .8 being matte. Values between .8 and 1 are an unrealistic "super-matte" and should be avoided. To convert exponent to roughness use the following formula: ROUGH = SQRT(2 / (EXPONENT + 2)).

Exponent

A glossy grey material with exponent 1, 10, 100, 1000 and 10000 (roughness: 0.816, 0.408, 0.140, 0.045, 0.014).

Absorption Color and Depth

These allow you to specify the color and depth of light absorption by the varnish. Note that since this is an absorption color, it will seem to work "backwards". Setting it to blue will cause blue light to be absorbed, leaving you with a yellow-orange appearance. To defeat this option, set the color to full black (0.0).

Absorption-example

Examples of various absorption settings.

Multibounce

The option will simulate light being scattered at the surface by things such as fuzz or fine hair. It is useful when using glossy for a skin or cloth material, and will give a soft, fuzzy appearance.

Multibounce

A multibounce LuxBall.

Layered

Layers

Introduction

The layered material is exactly that - a material that is comprised of a number of layers of other materials. As light hits the material it gets reflected/transmitted through the various layers, just like a real layered material.

Note that this is not the same as the mix material. The mix material combines two materials by taking say 90% of the first material and 10% of the second material at the same time - there is no interaction between the materials. The layered material on the other hand simulates the interaction as light bounces between layers. Each layer can have its own bump-map.

The different layers are ordered with Layer 1 being the top-most layer on the side of the normal. If light hits the surface from the back-face (ie, the side opposite the normal) - then it will hit the bottom layer first (ie, Layer 4 if you have 4 layers). Thus the layered material is double sided. If you want to have a glossy material on both sides you need to define something like : rough-glass, matte, rough-glass.

An opacity parameter (defaults to 1.0 - fully opaque) controls how much of the light entering a layer interacts with it. For instance if you have a matte layer, this would normally reflect or absorb all of the light. In the layered mat if you set the opacity to 20%, then 20% of the light will pass through the layer as if it's not there. Note that this 20% will not be scattered but will pass through in a straight line - just like it was mixed with a null material.

Also, the opacity parameter isn't always needed to allow a layer to transmit. For instance a rough-glass layer will still transmit/reflect light with an opacity of 1.0, because it has an inherent transmission property.

The layered mat can reproduce many of the standard LuxRender materials. For instance a glossy material can be created by using a rough-glass layer on top of a matte layer.

Limitations

The downside to the layered material is speed. Calculating the way light bounces around between the layers takes time. If all you need is a glossy material - then the standard glossy material is optimized for this - not only will it be much faster, but it will also have less noise (due to optimized sampling).

Parameters

Currently the layered material accepts 4 layers - although you could put another layered mat in slot 4 to increase this. Here's a sample from the .mat file:

MakeNamedMaterial "mylayered"
	"string namedmaterial1" ["myroughglass"]
	"string namedmaterial2" ["mymatte"]
	"string namedmaterial3" [""]
	"string namedmaterial4" [""]
	"float opacity1" [0.75]
	"float opacity2" [0.50]
	"float opacity3" [1.0]
	"float opacity4" [1.0]
	"string type" ["layered"]

Velvet

Velvet_header_360x360

The Velvet material represents a fuzzy, velvety surface. It works well for velvet and other types of cloth. Its appearance can vary wildly with lighting conditions, you may find it easier to use it in a mix with another material such as glossy.

Parameters

  • Thickness defines the thickness of the "fuzz" along the surface. Higher values will give a more pronounced fuzzy-look.

  • p1, p2, and p3 represent 3 polynomials that define the appearance of the fuzz. They are rather abstract, so its best to just play around until you get a good result.

Velvet_thickness_0to1

Velvet with thickness values 0.1 to 1.0. A thickness of 0.0 would give a pure black material

Velvet_p1_p2_p3_examples

Velvet at different p1, p2 and p3 values. Thickness is constant at 0.1

Top row:

p1: -60    -40    -20    20    40    60
p2:  10     10     10    10    10    10
p3:   2      2      2     2     2     2

Middle row:

p1:  -2     -2     -2    -2    -2    -2
p2: -60    -40    -20    20    40    60
p3:   2      2      2     2     2     2

Bottom row:

p1:  -2     -2     -2    -2    -2    -2
p2:  10     10     10    10    10    10
p3: -60    -40    -20    20    40    60

Car Paint

Material_car_paint

Car Paint is an advanced glossy material, simulating a diffuse surface with multiple reflective coatings. It works well for car paint, obviously, but is also well suited to any sort of "high-tech"-looking painted surface, such as painted aircraft skin, star ships, futuristic weapons, etc.

For some quick paint jobs, car paint contains several presets derived from the paper that the car paint material itself was based on.

Carpaint_presets

The carpaint presets. Top row, from left to right: White, Polaris Silber, Opel Titan, Ford F8. Bottom row, from left to right: Blue Matte, Blue, BMW 339, 2k Acrylack.

Parameters

The parameters of the car paint material may seem complicated at first, but when the basics are understood it's not that difficult.

There are 12 parameters - which seems a lot - but you can group some of them so that you actually have only 6 (M1-3, R1-3, Spec col 1-3).

Carpaint001

You work with three gloss "layers" in carpaint and each layer has three parameters that can be controlled. In a nutshell, they are specular color (color/brightness) R (fresnel power) and M (roughness). For example the first layers parameters are "Specular color 1", "R1", "M1". (note: "layer" is a bit of a misnomer, as they do not actually stack, they are merely chosen at random. But it will be used here as a term of convenience)

When setting up the gloss layers, you may find it easiest to "solo" each layer by turning the specular color on the other two layers to full black, allowing you to configure your M and R values for each layer one at a time. You will find that using higher values for M and R (such as R=.9, M=.2) produces a more "metallic" look for that layer, while lower values (such as R=.01, M=.02) produces a more "glassy" or "waxy" appearance.

"Diffuse color", "Absorption color" and "Absorption Depth" are general settings, that affect the whole material.

  • Diffuse Color should be a well known parameter, and can simply be seen as the basic color of the material. So when you want to render a Ferrari Testarossa it surely will be red!

  • Specular color controls the color and brightness of the reflections for each layer. When you set the specular color to green, the reflection of a gray object will appear green on the surface of your car paint. The reflection of a red object will appear yellow - the combination of red and green. Increasing the value of this color will result in that layer reflecting more light, producing a stronger reflection. You can also mix the specular color by using different layers.

In the image below the first and second layers have different values to show how they effect each other (the diffuse color of the material is gray). If both have the same value (the ball in the middle) you get a perfect mix (red + green = yellow). The left ball shows the red dominating (orange) and the right one green (bright green).

Carpaint003

Specular color in different layers.

  • The R1-3 value controls the strength of the Fresnel effect. With low R values, the reflection will only be near full strength when viewed from a very steep angle. At high values, it will be almost evenly distributed across the material.

The image below illustrates the effect of raising all 3 R values together. Pay attention to the size of the dull area in the middle of the sphere, where it faces the camera head on:

Carpaint002

R1-3, Fresnel power.

Generally, you want to use a lower R value for your brightest, most glossy layer, and increase it for the duller layers. How much will depend on the paint you are simulating.

  • M1-3 controls how strongly the reflections (which are set with R1-3) are scattered. It can be set between 0.0001 and 1.0. A value of 1.0 will make the reflections scatter the most (you will not be able to perceive the shape of anything in the reflections from the material).

ATTENTION!!: The minimum of this parameter is 0.0001! If you set it to 0.0 it will actually will be on maximum. It must have a value above 0.0! The Image below illustrates the effect:

Carpaint004

M1-3 (reflection scattering).

  • Absorption color and depth. Absorption means that the light which reaches the car paint is not reflected but "swallowed" by it. Assuming a color space consisting of red, green and blue and the laws of additive color mixing, there are some very interesting facts about car paint in LuxRender.
  • If you put a lamp into your scene with white light, this light is a perfect mixture of red, green and blue. When you give the absorption color of your car paint a value of red (left Ball in the image below) it will absorb the red component of the light from your white lamp. The effect you can see below might be confusing at first, but it's logical. Red is absorbed, and green and blue still reflect to the camera. The mixture of green and blue is cyan and that is what you see below. The ball in the middle has green as the absorption color and that means that a mixture of red and blue is still reaching the camera - hence the ball is magenta. For the right ball: absorption color = blue, so it appears red + green = yellow. Depth

The absorption depth controls how far the light goes into the surface of your car paint before it is totally absorbed. When the depth is 0.0 the light is absorbed directly. That means among others, that the diffuse color of your car paint will disappear under the effect of your absorption settings. When you set a little depth, the diff color will shine through a little bit, like you can see below (the diffuse color is gray there). The absorption depth can have values between 0.0 and 15.0.

Carpaint005

Example for the absorption color and -depth (diff col = gray).

Here is the effect of a different diffuse color:

Carpaint006

Example for the absorption color and -depth (diff col = yellow).

The image above is nearly the same as the first one. The values of absorption are the same and only the diffuse col has changed - to yellow. As you see the left ball is green with a little yellow shining through. But why green? Red is absorbed from the paint, so green and blue are left plus yellow from the diffuse color. Yellow and blue are complementary, which means they cancel each other - so only green is left.

But wouldn't that mean, that we should also have no yellow? Well, the reason why we still see that yellow touch is the value of the absorption depth. Remember, until the light reaches that depth it is not affected by the absorption, so not all of the diffuse color is affected.

Example

Here is an example of the settings for simple realistic car paint - absorption color is black and depth is 0:

Carpaint007

Scatter

Scatter

Scatter is a diffuse material with a surface-scattering effect. In most cases, it is best combined with the null material and homogeneous volume in a mix material for rendering things such as clouds, flames, gas halos, corona discharge, etc. When combined with null+homogeneous, it can give the volume more color and an extra scattering "kick" to light as it crosses the boundary of the mesh, mimicking the glow flames (for example) have when viewed edge-on.

Parameters

  • Diffuse color is the only color of the material, it is the color of the reflected and scattered light.
  • Phase function (asymmetry) is a number between -1 and +1 that determines if the scattering is primarily forward (same direction as the ray was traveling) or backwards (back towards where the ray came from). Positive values are more forward scattering (best for clear particles), negative values are more backward scattering (best for opaque particles). 0 is isotropic, meaning the light is scattered evenly in all directions.

Example

St_elmos_fire

The cloud in this image is a mix of 10% scatter, 90% null. Note the scattering effect around the edges of the cloud.

Channels

See this page for more information on bump and displacement mapping.

Brick_material

LuxRender's materials can be configured by specifying colors or textures to be used on various channels. Each channel represents a particular material characteristic. Which channels are available depends on the material type. See the specific material pages for details on each material's channels.

Volumes

Volumes, sometimes also called "mediums" are another property of meshes, in addition to the surface materials described above. They define how light behaves as it moves through transmissive materials, or the space between meshes. Many exporters treat volumes and surface materials as a set, as both contribute to the final appearance of the mesh. See LuxRender Volumes for more information.

Portals

Portals are special "guides" placed over the windows in interior renderings. They help LuxRender find the light entering the room from outside. For more information, see the Portals page.

Emission

Emission

Mesh objects can be converted into emitters be enabling the emission property for that mesh. While this is technically a mesh property, many exporters treat it as a material property or use a "light" material to designate emitters. Emitting meshes act as a collection of area lights, and will illuminate nearby objects as well as appearing to glow themselves.

Emitting meshes are one of the primary methods of lighting in LuxRender.

For more information, see the LuxRender Lighting page.

Clone this wiki locally