LuxRender Materials Layered
Views
Personal tools
From LuxRender Wiki
Contents |
Luxrender Materials - Layered
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 optimised for this - not only will it be much faster, but it will also have less noise (due to optimsed 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"]
