CIORs (Complex Index Of Refraction)


#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.


#23

Yes, I know. Sorry. I was replying to the highjackers comments earlier. Forgot to quote. :slight_smile:
Interesting topic btw. I’ve been looking for an answer to that myself. For now, I think the closest we can come to CIOR is using fresnel reflections with a very high IOR, Like 20-40. Unfortunately maya doesn’t display the reflectivity curve like for example 3ds max, so it’s a bit of a blind man’s trial and error situation. :confused:


#24

I find your highjacking to be almost as illuminating as mine even if not as relevant. Please continue.

For now, I think the closest we can come to CIOR is using fresnel reflections with a very high IOR, Like 20-40. Unfortunately maya doesn’t display the reflectivity curve like for example 3ds max, so it’s a bit of a blind man’s trial and error situation. :confused:

Thank you for repeating my prior point, but that doesn’t work as well as one would hope. Thus, my initial posts of my crappy sink. I was using a mia_mat_x with Fresnel BRDF and IORs of “like 20-40”. I was the blind man trial-and-erroring, and never found a valid solution, just like the original poster. Having every element in common with the original post, it seemed a valid topic for me to comment on. However it is good to know you agree with my methods entirely.

I’ll post up the scene if anyone’s interested and we can play with it? I’m very open to a more empirical scene too however, but I’m not on a NDA for that project so it’s fair game if anyone wants to take a shot at it as a test-bed.


#25

Share that scene InfernalDarkness, I will be checking it in my spare time.

You saw the image I posted earlier (the bike, yeah)?, What rate do you asign to the metals?.


#26

Hrm… yes, well… You write such long posts… sometimes I’m too lazy to read the whole thing.
sorry about that. :stuck_out_tongue:


#27

Share that scene InfernalDarkness, I will be checking it in my spare time.

You saw the image I posted earlier (the bike, yeah)?, What rate do you asign to the metals?.

Sure thing, I’ll clean it up a bit and compress the textures or something so it’ll squeeze across the web, tomorrow when I’m back at work.

I’m not sure what you mean by “rate”, however? Metals generally aren’t so difficult, but in this particular scene and its accompanying master bathroom scene, I was unable to get good, predictable results for some reason. Trying the IOR technique has worked for me in the past, especially on brushed nickel and stainless steel metals.

Usually the only metal that thwarts me is “oil-rubbed bronze”, which pretty much requires texture map-painting to achieve the rubbed-edges effect.

Hrm… yes, well… You write such long posts… sometimes I’m too lazy to read the whole thing.
sorry about that. :stuck_out_tongue:

You’ll love or hate this song! Hope you get a laugh out of it anyway, my friend:


(clean version, by the way)


#28

well this topic is very interesting ! but as i really don’t understand the CIOR concept can someone help me to get the idea.

i will speak as the fool, but when i do metal shader i only use diffuse + specularity/reflection/Anisotropic ppties + nice texture. How does refraction come into the story ? do you guys use refraction for your metal shaders ? i don’t see how metal can have a refraction index ?

could you please post some photo of a metal that need CIOR or refraction and that can’t be done in mental ray , cause i’ve never seen that , and i feel like i’m missing something crucial.

Thanks for your help !

cheers !


#29

From Zap’s the article on the topic:

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”.

Making Better Metal with mia_material

His example render:

The theory behind using higher IORs for metal is to simulate or mimic microsurface scattering of highlights, basically. It can add a lot more zazz to your metals with a lot less work.

Edit:

In addition, when one searched “metal index of refraction” and finds some relevant sites, one can find the IORs of each metal type calculated for oneself.

Chromium = 3.68
Silver = .329

That site will also calculate your BRDF curves for you, towards the bottom, if Fresnel isn’t helpful for realism.


#30

thanks for the links !

Well i’m not sure i get all the story but for what i understand. he said

  • metal are not refractive but
  • to get an optimized BRDF curves its better to use fresnel reflections and High indice of refraction to draw the BRDF curves
    - But the goal of all this is to control the look of the curves that blend Diffusion/Reflection

In maya you can put all the indice you want you have no preview on your BRDF curves like said previously.

So to do stuff like this i prefer to use

  • a facing ratio node
  • i remap my facing ratio with a remap value node
  • now with the remap value you have full control on the look of your BRDF curves, you draw by hand the exact look of your BRDF curves
  • you then plug the out value in your reflectivity attribute
  • and you plug the inverse of this value in the diffusion weight attribute

then you get diffusion/reflectivity compensation and you have the full control on How your BRDF curves looks like.

its looks more intuitive to me than using obscur IOR to draw my curves !

cheers !


#31

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.