User avatar
By Mihai
#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.
Last edited by Mihai on Mon May 22, 2006 9:06 am, edited 3 times in total.
By DELETED
#155383
DELETED
User avatar
By RonB
#155384
Mihai,
Thank you for the information...yes, it is a bit technical but it does help very much. What would help even more are some settings as examples. I for one would very much appreciate that. But thanks again for your post!

Cheers, Ron
User avatar
By KRZ
#155385
applause applause! this is a very understandable material-faq! personally i benefitted from your description about the attenuation/transmittance-dependibility. before i just lowered transmittance to get a more saturated color,..but will now tweak the attenuation to simulate better reallife phaenomena.

if i have a wish, it would be excellent top back up your words with small pics of the topics. i can see this becomming a reference article:)

looking forward for part2!
User avatar
By Frances
#155392
Very nicely done Mihai. The only part that I have a question about is your using a semi-gloss plastic as an example of a surface that requires two bsdf layers. I consider plastic to be "homogenous" and not a substrate with a coating. For a plastic, it should be sufficient to simulate its reaction to light with color and roughness.

So perhaps before you go on to ND values, you could elaborate on the theory behind BSDF and layered materials as they pertain to Maxwell and the real world.

Thanks!
Last edited by Frances on Sat May 20, 2006 1:23 pm, edited 1 time in total.
User avatar
By Mihai
#155393
Yes some examples are always good, this is all a bit abstract. But i didn't understand right away exactly what a setting of roughness 4 would look like, the only way is to experiment yourself with simple scenes. With just a little time you start to get an image of what a certain setting will look like.
User avatar
By boilerhead
#155394
Great!
thank you very much Mihai :D
User avatar
By Mihai
#155396
About the plastic, you have plastics which are a combination of different materials with different reflective properties, but their "parts" are on such a small scale that they seem like the same material. So to mimic a material like that you need two bsdf's with slightly different roughness values. Another example could be a rough plastic with a clear coating. To make this type of material you could simply apply a coating, or again make two bsdf's. It depends exactly on what you need.

Another factor is for certain plastics you have a subscattering effect which makes the broader highlight. You could do this with sss, which in some cases could add to the render time, but you could also do it with a combination of bsdf's, again with different roughness and it would look practically the same but render faster.
User avatar
By glebe digital
#155397
Thanks for the effort Mihai. :)
Yeah the two-bsdf thing seems a bot obscure to me, as Francis says an elaboration on that concept would be interesting reading. :)

oh I see you've started whilst I was writing........ :lol:
surely though the base structure of a plastic is one structure [not two intermingled? If you create a thermo-plastic object in real life [through injection moulding for instance] you get a hard solid based on the properties of the final molecular structure, which would be just the same as a metal alloy for instance?
Last edited by glebe digital on Sat May 20, 2006 1:37 pm, edited 1 time in total.
By giacob
#155398
Frances wrote:Very nicely done Mihai. The only part that I have a question about is your using a semi-gloss plastic as an example of a surface that requires two bsdf layers. I consider plastic to be "homogenous" and not a substrate with a coating. For a plastic, it should be sufficient to simulate its reaction to light with color and roughness.

So perhaps before you go on to ND values, you could elaborate on the theory behind BSDF and layered materials as they pertain to Maxwell and the real world.

Thanks!
icant but quote u frances.. what baffle me more is just the multi bsdf system.. cant figure out what has to do with real phisical behaviour
User avatar
By Lutz
#155401
very good Mihai, now i understand better to work with the material editor!
User avatar
By Mihai
#155403
giacob wrote: icant but quote u frances.. what baffle me more is just the multi bsdf system.. cant figure out what has to do with real phisical behaviour
It's a way to mimic multilayer materials. May not seem obvious but many materials are made up of layers, for example:
Multilayer structures are becoming common in many domestic plastic products but in many cases the end user is unaware of the complexity of the product they are using. One example where the multi polymer structure is obvious is the tooth brush where the strong main body has an inlay of soft touch polymer in contrasting colour. On the other hand, how many people are aware that the squeezy bottle for their tomato sauce bottle contains at least 5 layers.
By giacob
#155409
i cant fully understand that a material can have a certain number if materials layered one over the other...i would fully comprehend if i had a rough layer and over this a glossy trasparent layer ........ what dont seems to me to be logical is blending two layer togheter , ..[/b]both not trasparent, to get a plastic surface....
User avatar
By Carl007
#155411
Thanks allot, please continue with this interesting subject..
User avatar
By jdp
#155412
@giacob, given mihai explanation it is quite simple, they are not layered over, they are mixed toghether as a sauce, if I am not completely wrong
Mihai wrote:On the other hand, how many people are aware that the squeezy bottle for their tomato sauce bottle contains at least 5 layers.
damn those 5 layers can be a tricky job to reproduce...

thx, mihai.. :)
  • 1
  • 2
  • 3
  • 4
  • 5
  • 14
Help with swimming pool water

Hello! I think the main problem with the color of[…]

Hello Julien, The command changed in Maxwell 5 as[…]

render engines and Maxwell

The question to ask yourselves is if you switch ov[…]

Workaround using the "RESOURCES BROWSER"[…]