Announcement

Collapse
No announcement yet.

IOR on fresnel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • IOR on fresnel

    In Mental Ray you can manually set the Fresnel effect in the mia shader, giving values for the 0 degree and 90 degree reflections. AFAIK this is not possible in the VrayMtl and it works instead through the IOR value. So based on that...

    1) I would like to add the ability to override the fresnel IOR in the VrayMtl and manually set the 0 and 90 degree reflections, like in the mia shader.

    2) until then, is there a table someone knows of that converts IOR values into their corresponding 0 degree and 90 degree values? Like:

    IOR:1.33 = 90 degree:100%, 0 degree:0%
    and so on...

    I've seen math formulas (which just hurt my head), but not any kind of conversion table (note that I do not mean a table listing materials and their IOR values).

    thanks!

  • #2
    You can get similar effects using the "facing ratio" output of a samplerInfo node, or a VRayFresnel node connected to the reflection color of a VRayMtl material.

    Best regards,
    Vlado
    I only act like I know everything, Rogers.

    Comment


    • #3
      thanks, that is very creative workaround!

      Now I just need to find that IOR conversion table...

      Comment


      • #4
        In 3dsmax in the mia material shader they actually have a curve representation of the brdf values. If you have Use Fresnel checked, you can change the IOR value and see how this effect the curve. Even though no values are show you can get a rough idea of what value they are.

        Comment


        • #5
          Neat. Unfortunately, I don't have Max.

          Comment


          • #6
            You could download the free 30 day trial just to have a look. No it seems silly to download it just for that bit at least it will give you an idea.

            Best,

            rich

            Comment


            • #7
              I was hoping for some chart on the web. Surely such a thing must exist.

              Comment


              • #8
                I'm not really sure what the point of a table is...

                If you want something accurate to a specific ior, then use the fresnel ior. If you don't want accuracy, but instead a creative falloff... use the samplerInfo into a ramp. Works great. I know, I'm a jerk. But it's true dammit!

                Comment


                • #9
                  Heya Shark,

                  On the 3dsmax side we had a similar discussion since someone wanted a method to use sampled brdfs for metals to give a more accurate look. One problem with physically accurate materials is that the material is only providing one part of the look, the lighting and environment is providing the rest. If you have a reference image of the material you want to produce and if you had the exact fresnel ior for the material's reflection, it doesn't guarantee that your 3d material will exactly match, unless the environment around your 3d object also matches the reference images environment. Ior values will only get you so far along with the look of a material so you might find it a bit easier to get the result you want by using things like incidence nodes, falloff maps or samplerinfo things. Using a fresnel node might be correct, but using a sampler info node might let you make a nicer image.

                  Comment


                  • #10
                    Originally posted by aweidenhammer View Post
                    I'm not really sure what the point of a table is...
                    Well, I want accuracy and control
                    The point of a table is to understand what the affect of a certain IOR would be.

                    For what it's worth, here's a very "ballpark" formula I can observe:
                    IOR: 1.3 = 0 degree: 0.03, 90 degree 1, brdf curve 4.5
                    IOR: 1.6 = 0 degree: 0.06, 90 degree 1, brdf curve 4.5
                    IOR: 1.8 = 0 degree: 0.08, 90 degree 1, brdf curve 4.5
                    IOR: 2 = 0 degree: 0.2, 90 degree 1, brdf curve 4.5
                    IOR: 5 = 0 degree: 0.5, 90 degree 1, brdf curve 4.5


                    I can of course just plug in a value if I had it. But it is not entirely obvious to be what the IOR value of t-shirt would be (I don't see 50% polyester 50% cotton mix on the table). Yet that value does affect the way rim lights look on a shirt. So the IOR matters quite a bit.

                    The SamplerInfo/ramp workaround is okay, but does not accurately replicate what the mia shader is doing. That is, fresnel fall off is much faster than the results of a ramp. You can see this pretty easily if you look at the VRay fresnel texture. If the ramp shader gave me an accurate fall off which I could manually adjust, that would be great, but it doesn't really.

                    I could do the same workaround using the VRay fresnel texture, but since that works with IOR, we are back to the same issue. So I do hope that the mia manual override for the fresnel will be included in a future release.

                    Comment


                    • #11
                      Originally posted by sharktacos View Post
                      I can of course just plug in a value if I had it. But it is not entirely obvious to be what the IOR value of t-shirt would be (I don't see 50% polyester 50% cotton mix on the table). Yet that value does affect the way rim lights look on a shirt. So the IOR matters quite a bit.
                      The rim lights on a cloth material are not related to any sort of IOR, but to the way the material itself is woven. The mia material approximation (which is actually Schlick's approximation to the Fresnel formula) is just as inaccurate.

                      It should not be too hard to derive a formula for the IOR that you need given a normal reflectance value... I will try to post it here a bit later.

                      Best regards,
                      Vlado
                      Last edited by vlado; 25-02-2011, 10:35 AM.
                      I only act like I know everything, Rogers.

                      Comment


                      • #12
                        Just a sort of mini bump for this, as I'd like to get some more info or tricks like sharktacos is after.
                        (ties into my current fxphd lighting class but it's mainly for metals as we utilise Schlicks falloff with MR)
                        Last edited by RobPhoboS; 24-10-2011, 06:08 PM.

                        Comment


                        • #13
                          In Vray you'll notice that the SSS shader has a IOR of 1.33 (the same as water). When working on cloth I tend to use a similar IOR -- somewhere between 1.3 and 1.4 is good because I want to have strong spec on the edges (where the edges of the fabric would pick up rim lights) and low spec on the front (since cotton is not shinny). For objects like wood where I want more spec/reflection I might go up to and IOR of 1.6. An IOR of 2 could be good for metal, and 10 would be chrome. These are all very unscientific results based on just "eyeballing" it. It would be quite helpful if vray for Maya had a way to visualize the curve like you can in Max. From what I can observe there is a great deal of change from 1-2 and then it levels off with only minimal change from 2-10.

                          For MR I find that the Fresnel works very differently. The results look quite wrong in fact (I suspect there is an error somewhere in how it is being implemented in Maya, which would not be surprising since the integration between Mental ray and Maya is notoriously buggy). So I only use the manual BRDF settings. To get the same results as you would with IOR 1.33 and the like, you need to set the BRDF zero degrees to .05 (=5%) rather than the default .2 (=20%) and change the curve from 5 to 3.

                          Again, all of this is just guess work based on observation. I would be great to have some science to back it up

                          Comment


                          • #14
                            I totally second the idea of having a curve repreentation of the resulting reflection distribution (0 to 90 degree) while tweaking IOR for Vray materials, as well as the flexibility to adjust the distribution in the schlick mode.
                            always curious...

                            Comment


                            • #15
                              Originally posted by sharktacos View Post
                              Again, all of this is just guess work based on observation. I would be great to have some science to back it up
                              We've been lucky enough to see close approximations of the real world IOR numbers being tapped into a spreadsheet to show the differences between the fresnel/schlick (& real world) differences in our classes.
                              Essentially, although with MR, the idea is to stick with fresnel for dielectric/insulator materials, and the schilick curve for metals/conductors.
                              As someone else suggested perhaps using some ramps will do for now when using vray, although I'd like to get a rough idea what the ramp should look like as a starting point.

                              Visually, it's a subtle difference but you can see it, of course when things are worn/dented I think it's less obvious.

                              Good, basic illustration on Zap's blog:
                              http://mentalraytips.blogspot.com/20...amaterial.html
                              Last edited by RobPhoboS; 25-10-2011, 11:00 AM.

                              Comment

                              Working...
                              X