- Sat May 20, 2006 12:43 pm
#155381
Many people seem to have trouble grasping the Maxwell material setup, what the settings are supposed to do and how they relate to traditional 3D naming conventions. So I'll try and explain certain concepts to hopefully make the Maxwell materials more intuitive.
First, try and approach the material system from a real life perspective, forget about what other renderers call diffuse, specular reflections, glossy reflections....this is not how light behaves in real life. So before going into the material components in Maxwell, examine what makes a surface look the way it looks in real life, how light interacts with it.
Why do we see a surface in a certain color? Well first we need to know what is light? "Light" is electromagnetic radiation traveling in waves. The waves of this radiation can have different wavelengths (distance between wave "tops"). The wavelength can go from ultra small (xrays for example) to very wide (radio transmissions).
What we call visible light is really a tiny portion of this whole range, or spectrum. So we talk about the visible light spectrum. Tiny variations in the wavelengths making up this visible light spectrum is what makes us see different colors. For example blue light has a slightly smaller wavelength than red light.
Ok, so back to why we see a material in a certain color. When light (EM radiation) falls onto an object, some of this radiation is absorbed by the object and converted into heat for example, and another part is reflected off of it and into your eyes. Some materials tend to absorb more of a certain wavelength of the visible light spectrum, and so less of that wavelength is reflected to your eyes. So then an object which you see as blue means that the surface of the object absorbs much less of the wavelength which gives blue light, so the wavelengths of the light that reach your eyes will be dominated by those that give blue light.
Given the info above it should be clear (I hope), that you see an object because light is reflected from it's surface to your eyes, so ALL light is reflected light. In Maxwell you can set an objects color by the parameter conveniently named reflection color. So if you want a blue ball, set this parameter to blue.
Another very important point is since some of this light (EM radiation) is absorbed by the surface, there is no way the surface will reflect back to you as much light as it received. This is why you must avoid setting the reflection color to RGB 255 as that would mean the surface doesn't absorb any light and the result is you lose contrast and get much more noise, since Maxwell has to keep calculating light reflecting back and forth between objects. The amount of light that is reflected back from white paper for example, converted to RGB values, is about 218.
What makes the difference between a perfectly reflective surface like a mirror, and an apparently non reflective surface like a carpet, is the roughness of the surface. When a surface is almost perfectly smooth, the light rays reflecting from the surface are more or less "uniform" in direction, and that creates a clear "picture" of the environment being reflected to your eyes from the objects surface. On the other hand if the surface is very rough, the incoming light rays will be bounced in random directions from the surface giving you a very rough picture of the environment reflected back to your eyes.
Back to Maxwell, how do you control how rough or smooth a surface is? With the roughness parameter. Less roughness means the surface will reflect light back in a perfect way, you get specular reflections. The opposite end is when you check Lambertian which means all light is reflected back in a diffuse way.
What makes an object more or less transparent? The EM radiation, even the visible portion of it, doesn't just hit the surface of an object and bounces back, it also penetrates the surface. How far it can move through the object depends most of all on how dense the object is. More dense means more atoms and as the light ray goes into the object and hits an atom it loses energy. You can say the light ray is absorbed faster the more atoms it hits. Some light rays can make it through the whole object. If there isn't enough density to absorb it all, the light ray is transmitted through the object. The object then becomes transparent. The more light rays that make it through, the more transparent the object becomes.
Some wavelengths are absorbed faster than others, depending among other things on the properties of the material it passes through. That's why we see tinted glass, for example green glass means all the wavelengths except those that give green light have been absorbed and so looking through this glass will make everything on the other side look green.
Taking all this to Maxwell, the attenuation distance parameter means how far can a light ray travel through an object before half it's energy will be absorbed. For example if you have an object 1cm thick and you set the attenuation distance to 1cm, it means half the energy of all light rays passing through it will be absorbed, so the light falling through it will be half as bright on the other side.
The transmittance parameter lets you set what (if any) tint the light that has passed through the object will have.
The attenuation distance and transmittance are connected together, they influence each other. For example if you set attenuation distance to 10m for a 1cm object (meaning a very light material, very little density), but leave transmittance value at RGB 0, the material will still be opaque. You need to set transmittance to a value of at least 1 for the attenuation distance to start being taken into account.
Also, if you set a transmittance color of say green for the same 1cm thick object, but leave attenuation distance at 10m, almost all wavelengths will simply pass through the object, no matter if they are green or blue or any other color. Result is you don't get a green tinted glass, you get clear glass. The solution is simply to lower the attenuation distance, making the object a little denser so that the other wavelengths have enough matter to pass through to get absorbed.
What is ND, and why is it called ND? The maximum speed of light is measured as it is traveling in a perfect vacuum, but as soon as light travels even through air, the light slows down. The denser the material it's traveling through, the more it will slow down. When light travels from one material to another of different density, this slowing down causes it to bend. Put your finger in a glass of water for example and the portion of the finger that's submerged in water will look bent. This effect is called refraction.
Since the amount of refraction depends on the difference in density between two mediums, we need to have a base to which we can compare all other materials. The "material", or medium has been decided as being vacuum. The amount of refraction a material has, or it's refraction index, is the amount light will bend as it goes from vacuum into this material. Vacuum is considered to have a refraction index of 1 and all other materials being denser than vacuum will naturally have a larger refraction index, they bend light more.
The index of refraction is commonly denoted as n.
Another effect is caused by the fact that light rays of different wavelengths are not refracted, slowed down, equally. Being bent with slightly different angles, the visible white light is broken up into it's components. You then see a rainbow pattern, this effect is called dispersion. This effect is in many cases so small that it can be ignored in Maxwell, you can leave dispersion off and you will get faster renders.
On to the "d" in ND. Knowing that all wavelengths don't refract equally, you have to decide exactly what wavelength you are measuring when deciding the refractive index of a material. The d in ND, simply means that a wavelength of 589.29 nm was used to determine the refraction index of a material.
The nd value is also applicable to opaque materials like metals and plastics, and they have a much higher nd than water for example, because the are denser and also absorb more light (*see below if interested). That's why you should set nd to 3 or more for certain plastics, and metals have even higher nd values.
*about complex index of refraction.
All measurements of refraction really consist of two parts, one is the refractive index, and the other tells how much EM radiation is absorbed by the material. This absorption value is called the extinction coefficient, denoted as k. For most transparent dielectrics there is so little visible light absorbed, that this k value can be ignored and things get easier. But for metals it can't be ignored and it can become important enough to change the visual qualities of the material. This is where the complex ior files come in handy. They take into account this k value and also specify it's value for many different wavelengths, not just one.
This is really not something for you to worry about, I just thought it could be helpful to understand what's so special about those ior files.
I hope this info doesn't seem to technical, I just think it's important to start thinking from the real world perspective for us to be able to look at a surface, decompose the different light interactions and apply that to a Maxwell material. Take a typical semi glossy plastic, you have both a pretty rough reflection, and a more specular one. So we know we need at least two bsdf's, with different roughness settings. This is not an exotic material, it's extremely common, yet with the old beta material system it was not possible to make it. Same with a wine glass with red tinted glass at the bottom slowly turning into clear glass.
First, try and approach the material system from a real life perspective, forget about what other renderers call diffuse, specular reflections, glossy reflections....this is not how light behaves in real life. So before going into the material components in Maxwell, examine what makes a surface look the way it looks in real life, how light interacts with it.
Why do we see a surface in a certain color? Well first we need to know what is light? "Light" is electromagnetic radiation traveling in waves. The waves of this radiation can have different wavelengths (distance between wave "tops"). The wavelength can go from ultra small (xrays for example) to very wide (radio transmissions).
What we call visible light is really a tiny portion of this whole range, or spectrum. So we talk about the visible light spectrum. Tiny variations in the wavelengths making up this visible light spectrum is what makes us see different colors. For example blue light has a slightly smaller wavelength than red light.
Ok, so back to why we see a material in a certain color. When light (EM radiation) falls onto an object, some of this radiation is absorbed by the object and converted into heat for example, and another part is reflected off of it and into your eyes. Some materials tend to absorb more of a certain wavelength of the visible light spectrum, and so less of that wavelength is reflected to your eyes. So then an object which you see as blue means that the surface of the object absorbs much less of the wavelength which gives blue light, so the wavelengths of the light that reach your eyes will be dominated by those that give blue light.
Given the info above it should be clear (I hope), that you see an object because light is reflected from it's surface to your eyes, so ALL light is reflected light. In Maxwell you can set an objects color by the parameter conveniently named reflection color. So if you want a blue ball, set this parameter to blue.
Another very important point is since some of this light (EM radiation) is absorbed by the surface, there is no way the surface will reflect back to you as much light as it received. This is why you must avoid setting the reflection color to RGB 255 as that would mean the surface doesn't absorb any light and the result is you lose contrast and get much more noise, since Maxwell has to keep calculating light reflecting back and forth between objects. The amount of light that is reflected back from white paper for example, converted to RGB values, is about 218.
What makes the difference between a perfectly reflective surface like a mirror, and an apparently non reflective surface like a carpet, is the roughness of the surface. When a surface is almost perfectly smooth, the light rays reflecting from the surface are more or less "uniform" in direction, and that creates a clear "picture" of the environment being reflected to your eyes from the objects surface. On the other hand if the surface is very rough, the incoming light rays will be bounced in random directions from the surface giving you a very rough picture of the environment reflected back to your eyes.
Back to Maxwell, how do you control how rough or smooth a surface is? With the roughness parameter. Less roughness means the surface will reflect light back in a perfect way, you get specular reflections. The opposite end is when you check Lambertian which means all light is reflected back in a diffuse way.
What makes an object more or less transparent? The EM radiation, even the visible portion of it, doesn't just hit the surface of an object and bounces back, it also penetrates the surface. How far it can move through the object depends most of all on how dense the object is. More dense means more atoms and as the light ray goes into the object and hits an atom it loses energy. You can say the light ray is absorbed faster the more atoms it hits. Some light rays can make it through the whole object. If there isn't enough density to absorb it all, the light ray is transmitted through the object. The object then becomes transparent. The more light rays that make it through, the more transparent the object becomes.
Some wavelengths are absorbed faster than others, depending among other things on the properties of the material it passes through. That's why we see tinted glass, for example green glass means all the wavelengths except those that give green light have been absorbed and so looking through this glass will make everything on the other side look green.
Taking all this to Maxwell, the attenuation distance parameter means how far can a light ray travel through an object before half it's energy will be absorbed. For example if you have an object 1cm thick and you set the attenuation distance to 1cm, it means half the energy of all light rays passing through it will be absorbed, so the light falling through it will be half as bright on the other side.
The transmittance parameter lets you set what (if any) tint the light that has passed through the object will have.
The attenuation distance and transmittance are connected together, they influence each other. For example if you set attenuation distance to 10m for a 1cm object (meaning a very light material, very little density), but leave transmittance value at RGB 0, the material will still be opaque. You need to set transmittance to a value of at least 1 for the attenuation distance to start being taken into account.
Also, if you set a transmittance color of say green for the same 1cm thick object, but leave attenuation distance at 10m, almost all wavelengths will simply pass through the object, no matter if they are green or blue or any other color. Result is you don't get a green tinted glass, you get clear glass. The solution is simply to lower the attenuation distance, making the object a little denser so that the other wavelengths have enough matter to pass through to get absorbed.
What is ND, and why is it called ND? The maximum speed of light is measured as it is traveling in a perfect vacuum, but as soon as light travels even through air, the light slows down. The denser the material it's traveling through, the more it will slow down. When light travels from one material to another of different density, this slowing down causes it to bend. Put your finger in a glass of water for example and the portion of the finger that's submerged in water will look bent. This effect is called refraction.
Since the amount of refraction depends on the difference in density between two mediums, we need to have a base to which we can compare all other materials. The "material", or medium has been decided as being vacuum. The amount of refraction a material has, or it's refraction index, is the amount light will bend as it goes from vacuum into this material. Vacuum is considered to have a refraction index of 1 and all other materials being denser than vacuum will naturally have a larger refraction index, they bend light more.
The index of refraction is commonly denoted as n.
Another effect is caused by the fact that light rays of different wavelengths are not refracted, slowed down, equally. Being bent with slightly different angles, the visible white light is broken up into it's components. You then see a rainbow pattern, this effect is called dispersion. This effect is in many cases so small that it can be ignored in Maxwell, you can leave dispersion off and you will get faster renders.
On to the "d" in ND. Knowing that all wavelengths don't refract equally, you have to decide exactly what wavelength you are measuring when deciding the refractive index of a material. The d in ND, simply means that a wavelength of 589.29 nm was used to determine the refraction index of a material.
The nd value is also applicable to opaque materials like metals and plastics, and they have a much higher nd than water for example, because the are denser and also absorb more light (*see below if interested). That's why you should set nd to 3 or more for certain plastics, and metals have even higher nd values.
*about complex index of refraction.
All measurements of refraction really consist of two parts, one is the refractive index, and the other tells how much EM radiation is absorbed by the material. This absorption value is called the extinction coefficient, denoted as k. For most transparent dielectrics there is so little visible light absorbed, that this k value can be ignored and things get easier. But for metals it can't be ignored and it can become important enough to change the visual qualities of the material. This is where the complex ior files come in handy. They take into account this k value and also specify it's value for many different wavelengths, not just one.
This is really not something for you to worry about, I just thought it could be helpful to understand what's so special about those ior files.
I hope this info doesn't seem to technical, I just think it's important to start thinking from the real world perspective for us to be able to look at a surface, decompose the different light interactions and apply that to a Maxwell material. Take a typical semi glossy plastic, you have both a pretty rough reflection, and a more specular one. So we know we need at least two bsdf's, with different roughness settings. This is not an exotic material, it's extremely common, yet with the old beta material system it was not possible to make it. Same with a wine glass with red tinted glass at the bottom slowly turning into clear glass.
Last edited by Mihai on Mon May 22, 2006 9:06 am, edited 3 times in total.
Maxwellzone.com - tutorials, training and other goodies related to Maxwell Render
Youtube Maxwell channel
Youtube Maxwell channel