Perlen Material - LuxRender Wiki
Luxrender GPL Physically Based Renderer

Perlen Material

Personal tools

From LuxRender Wiki

Jump to: navigation, search


Perlen Material Breakdown

Diese Seite zeigt, basierend auf einem echten Projekt, wie man nur mithilfe prozeduraler Texturen ein Perlenmaterial erstellt.

Lass uns einen Blick auf die Attribute werfen, die das Glossy Material zu bieten hat, bevor wir anfangen das eigentliche Material zu machen.

Glossy Material

Lux bietet eine Basismaterialtypen zwichen denen Sie wählen können. Da wir ein Perlen Material erstellen wollen, ist der Glossy Typ eine gute wahl, da es einen diffuse und specular Aspekt für das reflektierende Licht besitzt.

Mit den normalen Werten eines Glossy Materials erhällt man ungefähr so etwas

basic Glossy Material

Konzentrieren wir uns mal auf den specular Teil, um zu sehen wie dessen Parameter das ergebniss beeinflussen.

Die normalen Parameter, des specular Teils, die Sie ändern können sind die Farbe, die Menge und die Härte (exponentieller Wert).

Specular Menge Variationen

Hier sehen Sie eine Variation der Menge. Diffuse steht auf 1 (weiß) und die Härte auf 500.

Specular Amount Variation from 0 to 1

You can see the character of the sphere starts as a matte ball, then changes to a plastic ball and ends up being almost metallic in appearance. It is important to keep in mind that the specular part is indeed a reflection, not just a specular highlight trick. This means, that when turning on specularity, you also turn on real reflection, best seen with the example on the right. To speak in blender terms, glossy specularity is comparable to the he glossy reflection available in blender internal.

Specular Roughness Variation

Now lets vary the roughness part. This is done by manipulating the exponent value.

For this example I've set the amount to 0.5 pure white, diffuse is at 1.0 pure white.

Roughness Variation from 1 to 100000

Again it starts at a matte material and gets more and more polished until it could be used as starting point for a billiard ball. Keep in mind, that we used an amount setting of 0.5 so we are more on a plastic side, thus the billiard ball effect. What we already see, is that at a setting of 50 we already have a pearl like effect.

Specular Color Variation

Now for the last available specular parameter, the color. I use a value of 0.75 for the amount and 1000 for the exponent while varying the saturation of a yellow hue.

Specular Color Variation from 0.1 to 1

Again, the specularity is a real reflection, so the reflected environment now gets a tint. Colored reflections are typically a property of metallic surfaces, so the character of the ball now moves more to some metallic aspect, though not really metallic in itself.

Whats also interesting to note, is that we also get quite a pronounced blueish tint. Just using color for the specular seems to effect the diffuse color as well. The reason for this is the following ( a good educated guess from my side) :

An object can only reflect the amount of light it receives. The two channels diffuse/specular have to use/share this amount of light. If light gets reflected by the specular channel it will not reach the diffuse part. Setting the amount value of the specular channel to 1 for any hue results in no light for the diffuse reflection in that color. For a full spectrum of colors, this means if you steal a color (specular color) the diffuse part will get a tint in the complementary color. In our example the complementary to yellow is blue, thus the blueish tint.

Diffuse Amount Variation

So much for the specular part. Now lets have a look at the diffuse one. I set the specularity to 0.5 and 500 roughness and just vary the diffuse from 0 to 1.

Variation of the diffuse from 0 to 1

What we see here, is again a shift from a metallic character to a plastic one. Combining this with the observations made before, I think its valid to state that the ratio in intensities between diffuse and specular control the materials character.

diffuse < specular : metallic

diffuse > specular : plastic

Also keep in mind, that the specular channel gets the light first. All light reflected by the specular part wont reach the diffuse part.

Basic Pearl Considerations

Now back to the pearl. Pearls have certainly some plastic aspects in it, but have also some pronounced reflections with a hint of some metallic character to it. Thus by applying the previous observations, I would say a ratio of 1:1 with not too smooth a surface should provide a good start.

Basic Pearl Setup

Pearl start.jpg

That already has some pearl character to it. Still has no color, so lets add some. The basic color is given by the diffuse part. So for a starter lets just add some slightly yellow/orange color to the diffuse part.

Pearl start yellow.jpg

We remember, that using a colored specularity enhances the metallic effect, so lets add a faint blue to the specular channel. This not only gives a slightly more metallic appearance, but also should enhance the yellow part of the diffuse channel, since blue is the complementary color to yellow.

Pearl s yb.jpg

Adding thin film interference

Pearls are made of countless very thin layers of mother of pearl, produced by the pearl oyster. These thin layers create the same effect as a very thin film of oil on water, a colorful interference pattern. The effect isn't too pronounced on pearls but its there.

Luxrender offers a thin film property for materials, but unfortunately only for completely smooth surfaces (glass, mirror). Mixing such a material with the actual glossy one can bring in the thin film effect, but destroys the materials character by adding a perfectly smooth reflection. So we have to come up with some way to fake these thin film effect.

I decided to simulate such an effect by adding a color pattern consisting of slightly blue and pinkish colors. Now the immediate idea to do this, would be to add a texture to the diffuse part with the desired colors. I decided to use another approach.

The glossy material offers an absorption attribute, which lets you specify colors to be absorbed by a certain amount. If a color gets absorbed you will see the complementary color.

Lets setup an absorption texture for our pearl.

Thin film strong.jpg

I use a blender marble texture to modulate between green and orange at a relatively low contrast and very low turbulence. The basic color is set to a dark grey. This main color gets multiplied with the texture, so as long as there is no hue in the the main color, it can act as gain for the texture.

The absorption depth is set to 1, which in itself is a gain value for the amount of absorption done. The setting shown above is too strong of course, so we will lower the absorption depth and add it to our pearl material. This is another reason I chose the absorption technique. I have one adjustment parameter to control the amount of the thin film effect. To achieve the same control using a texture for the diffuse part would involve some elaborate texture mixing.

Thin film added.jpg

Adding another material

The current setup is already quite ok, but the specular, while good at the highlights is too pronounced at the other areas. I imagine having a sphere inside the pearl with a much smoother specularity, something like this.

Pearl diffuse.jpg

I just took the previous material setup without the absorption and decreased the roughness value to 5, giving a very smooth specularity, which adds to the diffuse part, but not in a completely diffuse way.

To have those both aspects together in one material, lux offers the mix material. The mix material has two slots for input materials and an amount parameter, which controls the blending of these two materials. Input materials can be any material, except light or portal.

Now lets mix these two materials.

Pearl diffuse spec.jpg

Using the mix amount parameter we can now look for the best balance for these two materials. See below how the material behaves when going from low to high values ( 0.25, 0.5, 0.75 ). A value of 1 has 100% of material 1 and a value of 0 100% of material 2.

Pearl mix series.jpg

Lets settle on a value of ~0.65.

What I also did in my crown project, was to add a bump texture to the second ( more diffuse) material. The idea was to simulate a slightly irregular layer beneath the top reflecting one. So I use a relatively big texture size to have the modulation comparable to the size of the pearl itself ( the dimension of the pearl in this example is 0.7 blender units ).

I use a blender clouds texture with smooth noise and a noise depth of 2. Below is a variation of the texture noise size to find a good value for the bump's size. I exaggerated the bump setting (0.1) to clearly see the bump distribution.

Pearl bump series.jpg

Lets settle here on the 0.5 texture size. Now lets add this bump map to the second material slot and have a look at the result.

Pearl diffuse spec bump.jpg

One should experiment with the bump settings to find a good value for the bump amount, but I have now chosen a value of 0.01 for this setup.

What about SSS

Real pearls exhibit a certain amount of SSS (subsurface scattering), which enhances the glow of a pearl and makes it appear softer. Luxrender as of version 0.6 has not yet any SSS to offer, it's planned for a later release. So again, we have to find a way to fake SSS.

A way to do this is by using a mattetranslucent material type and mixing it with the existing material at hand. A mattetranlucent is a matte material with an additional translucent part to it. The translucent light shines diffusely through the object, but no real scattering is applied.

We want the translucency to have the color of creamy white, very similar to the yellow hue we used before. A pure mattetranslucent looks like this

Pearl trans.jpg

We have now to mix this material with the already created one. As you see, there is no real limit to the stacking of mixed materials, which on the one hand is extremely powerful, but on the other hand very confusing. The multitude of parameters added with each mix material is enormous and cannot really be overseen. So the advise here is to adhere to the KISS ( Keep It Simple Stupid) strategy, and always test the individual building blocks separately against the attributes you want to achieve.

Ok, so lets mix the translucent part and make a test series to get a good mixing amount value.

Pearl trans mix series.jpg

The above series use 0.5, 0.7 and 0.9 resp.

I choose a value of 0.79 and have arrived at a final pearl material.

Pearl final.jpg


To recapitulate: this pearl material consists of 3 major building blocks, each having it own attributes, which add to the overall pearl appearance. This is a good starting point for further adapting this material to an actual scene, light setup etc. It is not finished, but should act as solid base. Once all the elements are defined and understood you can create a whole spectrum of pearl materials, suitable for your project.