CIORs (Complex Index Of Refraction)


#3

Interesting site. It would be even more interesting if anyone here with a science degree or something could explain how one could use as much as possible of this for material creation in maya :slight_smile:

For example, the reflection calculator looks cool, and as it has values for 0-90* I guess one could interpret that to maya reflection ior values.


#4

Maxwell Render plugs into Maya and supports this. Others may as well.


#5

Simple way to use that site for everyday purposes is to check the graph at the bottom of that page after you select your material, and just roughly simulate the brdf curve shown there in Maya.


#6

This topic is a pretty big one. But if you really want to understand it and don’t mind spending some money, fxphd has a class that explains this in depth. You’ll be able to understand it from a science point of view (for the most part) and learn how to implement the concepts with the mia_materials as best we can. The class is: MYA214. I took it and I highly recommend it. Learned a ton of stuff about shading metal.

Hope that helps!

-Justin


#7

This is interesting (for metals)

http://mentalraytips.blogspot.com/2007/10/making-better-metal-with-miamaterial.html

Well, then we try the fresnel mode.

“What” I hear you yell, “Fresnel” is for dielectrics… transparent stuff… like water, glass and such. It is based on the Index Of Refraction. Metals aren’t transparent, they can’t refract stuff! O’le Zap’s gone completely bonkers now!

Well… actually… no. Metals are indeed not refractive, and are indeed not dielectrics (meaning, electrical insulators). They are Conductors, and for some baroque reason these are also considered to have an “Index of Refraction”.

Now, don’t ask me how on earth someone came up with the idea of refractive metals or how this is actually calculated… I didn’t write the laws of Physics (I just abuse them) so just trust me it’s there… and these values are high. Not your average “1.3” ish like for water, but values like “25” or “50”.

So, if you turn on the Fresnel reflection mode and put in an IOR of 50 you get something like this (Again UI from 3ds Max coz it has the neat curve):

Then looking on the site linked to in the OP are values are around 1-5??


#8

In essence, the higher IOR for metals attempts to simulate surface dispersion of light. It generally works really well, but at the same time…

Metals can be a real struggle. You’ll think you’ve got it nailed then you end up with crap like this:

Geo’s clean, sink maybe sloppy but here’s a Blinn:

Sink is a wreck, but that doesn’t explain the mess when using a mia_mat_x here:

In this scene, I really struggled with metal. Checked all my normals, etc. No matter what I couldn’t get it right, so I eventually just dulled it all down with a flat gray Blinn (fixed the sink) and made do.

Another part of the same scene, please ignore the crap geometry and low-res granite map. Here, the pot filler turned out okay, but why?

Sometimes metals are a breeze, but at other times I just can’t seem to nail them at all.


#9

it looks like your zero degree reflection value is to low.
or there is nothing which reflects, or perhaps try to increase the reflection raydepth.

if i have problems like this, i isolate the object and render it with a nice contrasty hdr map to check if its a shaderproblem or a reflection problem because of the surrounding objects.


#10

it looks like your zero degree reflection value is to low.
or there is nothing which reflects, or perhaps try to increase the reflection raydepth.

if i have problems like this, i isolate the object and render it with a nice contrasty hdr map to check if its a shaderproblem or a reflection problem because of the surrounding objects.

Thanks for the response, fortunately this client already signed and I don’t have to trog through the 26th revision on this kitchen mess… Wish my bosses would realize 3 revisions is plenty, and any more should be new charges/change orders, but alas… You can’t fix stupid.

The objects’ geometry is fine, it’s merely the shader, and I tried a score of variations to no avail. Fortunately the client didn’t actually need a close up of my crappy sink, I only rendered it to try to diagnose why it looked so horrible. And failed, I might add! One would think (and hope) that since it’a all a digital medium, any problem can be diagnosed. But as a scene’s complexity rises, often I’m left “screwed” - it would take more time to diagnose this mess than to create a new scene from scratch, or close enough that diagnostics are completely pointless.

So the key would be: how do I avoid such catastrophes in the future? Is there anywhere that stores mia_mat_x settings for people to share, so that we know certain metals will look a certain way? I’ll admit this production example is rather unscientific…


#11

You should check out mr materials.com. It has a Maya section and they have a standard scene that people submit shaders in so that it’s reasonably consistent etc. They use the Mia material.

Shading and lighting metals is hard because metals rely SO heavily on reflections as opposed to actual ‘lighting’. It’s also harder the more flat surfaces you have, such as with your stove/oven in your last render because instead of catching highlights along curves and bevels you have to try and get sheens across a vast flat area. Things like area/portal lights, the mia_lightSurface shader and actual geometry ‘reflectors’ are good tools for creating highlights and reflections for metals.

I was working for about 2 years for Rotor Studios who mainly work on cars and other vehicles, using almost exclusively the Mia and Carpaint shaders. It’s tough! All about reflections and area light sources (whether actual area lights or not). They have lots in their online gallery.

In order get consistent results from car to car and from one project to another we had to build up a huge library of materials, using a few different methods. There are so many different (yet very similar) plastics/metals/leathers in cars it’s quite intimidating haha.

:thumbsup:


#12

Thanks for the vote of confidence and reassurance, Jozvex! I really didn’t intend to hijack this thread, but to point out to the Original Poster, Joie, that IOR isn’t as effective as one would hope. It’s certainly not a quick fix for otherwise crappy shaders or in the case of that oven/stove, crappy modeling.

But using that stove as an example, in a scene where you can only use real lights (as in, the bulbs/fixtures/tubes that are going to exist in the actual, physical scene, which is an actual, physical kitchen I measured and photographed to make this scene), I suppose it would really come down to modeling. The stove is a real quicky, I think I may have even just swapped some crap over from Chief Architect at the time. As such it has poor topography at best and nary a beveled edge, corner, or anything like that. So perhaps it’s the modeling itself in that case.

But the faucet fixtures and (note) the pot pourer above the stove are all modeled rather painstakingly in Rhino, by myself. And back to the sink faucets… How is it possible for a metal to even look like that, in the mia_material one? I swear I tried 50 different ways to make metal work, including some of my own presets which have worked in other scenes just fine.

Anyway, perhaps we’ll have to set up a clean scene to actually test some of this stuff. That scene is a wreck, I was posting it mostly as an example of utter metal failure, trying to use IOR to save the day didn’t help in my case. Trying to use it wrong, most likely!


#13

Ok, I started this thread because a friend took that FxPhd class and told me about the CIORs. He told me that the teacher was using a pretty big and complex excel sheet to create the magic numbers to feed the mia_x. Even with that, the resulting numbers were aproximated or mia_x were unable to fully incorporate them.

So this is my guess…, I’m pretty sure we can take the standard IOR and add the CIOR to it and get the correct numbers that mia_x is able to understand. That would as simple as make mia_x understand the extintion coeficient, that’s all.

Right now I’m using the Maxwell way, this is, low difuse, high gloss, use fresnel and give pretty high IOR, like 20 or so. That makes mia_x metals to look as good as can be (try that InfernalDarkness).

I wrote this thread just because of my disapoinment when talking with my friend and realised that, in fact, there wer CIORs out there! :smiley:


#14

…to create the magic numbers to feed the mia_x.

I saw/read a really nice essay or “paper” on the topic awhile back, and will try to dig it up.

It basically explained protosurface scattering (and thus, the Fresnel effect) “mathematically” in terms of why/how photons collide and bounce and interact with the minute surface deformities on any given object. While in the lab this is sweet as pie, in the real world nobody’s actually observed or evidenced photons even existing in the first place thus far, and they remain a construct of a phenomenon, much like gravity. It is understood electrically however, except that “modern science” refuses to pay attention to actual science in this regard.

Thus, Maxwell and Planck and others were quantifying the effects of light, but the actual mechanism was still a mystery to them (and modern consensus science), and as such it gets really, really icky when we try to plug in such math into another simulation (mental ray, Vray, what have you) such as IOR.

By raising the IOR past 2.5 (diamondish), we’re attempting to simulate the effects of protosurface scattering caused by the tiny imperfections we see in metal with our eyes, correct? A blatant example would be brushed nickel faucet fixtures, similar to those I was attempting with my previous (mess of a) kitchen example. I was using IORs of 10-50 in my tests, but it didn’t help in that case. In other scenes, however, I’ve had some success using IORs higher than 20.

I’ll post up some test renders while I’m at work tomorrow if I can.


#15

@InfernalDarkness, I think there is something going really wierd with your metals because mia_x can do great metals and I do them all the time, see an example here:

Well, the metals are OK if you don’t pay attention to the fact that they are reflecting almost black everywere (and yes, the red metallic paint is mia_x material indeed, no car paints there).


#16

Hey Joie,

That class is still going on this term. It’s a really good one and if you don’t mind paying for it and want to understand this stuff I’d highly recommend it. It’ll answer all your questions…and then some. Perhaps have you asking a few more questions to boot! :slight_smile:

-Justin


#17

mia_material_x is great for metals, I do them all the time. however, you’re never going to have a realistic result unless you use some decent textures and decent compositing. You can’t just apply a chrome preset mia to a surface and expect it to look photo realistic.

My top reasons why some people’s metals don’t look right.

1: Lack of textures.
Nothing is perfect. Even a brand new metal item will have imperfections. At least texture your reflection glossiness.

2: lack of glow on highlights.
Perfect lenses do not exist (The eye is also a lens). Therefore strong highlights will produce glow, always. Good lenses create a very subtle glow, but glow nonetheless. Without it, it will look wrong.

3: crappy or just plain wrong environment reflections. well, it’s sort of self explanatory I think.

4: DOF: When using a shallow depth of field, blurring with a Zdepth does not blur reflections appropriately. even if your focus is on the metal object itself, the reflections will still be blurred by DoF in reality. Either you use real raytraced DoF or fake it with glossiness where possible.

Hmm, there’s probably more, but that’s all I can think of for now.
Here’s an example of an image I made long ago with the mia_material_x. (the spraycan model is from some tutorial, don’t remember which exactly):

EDIT: aah, yes. and also, metals never reflect 100% of the environment, Nothing does, not even mirrors, even if mirrors are pretty close.


#18

You are very right lostparanoia, I do metals all the time with mia_x materials with no problems so far, usually not anisotropic ones because they are very time consuming for animation, but blurry ones are perfect.

This post is about the use of mia_x with complex indexes of refraction, which can’t be achieved with them, as you can see.


#19

Whaaat?! Is this true? I had no idea!
I guess its easy to test out.


#20

ya, Maxwell is the only renderer I’ve seen that has the extinction coefficient value. This came up in a previous thread about using Fresnel for highly-reflective materials, which is problematic because of the lack of this setting.


#21

Straycat, you can test it easily asking yourself this question: If you are taking a photo of something reflected on a mirror…, ¿You focus the mirror or the subject?. If you focus the subject, the mirror blurs, if you focus the mirror, the subject blurs. :slight_smile:


#22

Yeah seems completely logical when you think about it. I guess I just never gave it much thought.