Community Forums

Maya Training

+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2011
    Posts
    17
    DT Subscriber

    Need help with IOR values in ' Exploring mental ray Materials in Maya'

    I am doing the 'Creative Development: Exploring mental ray Materials in Maya with Ed Whetstone' course and have become stuck on '4. Shading for liquid interfaces'.

    Ed states that you need 3 interfaces (with a material for each),to correctly render the glass and liquid. I understand why you would need these interfaces but can't work out how he arrives at the index of refraction values. It's probably just me being a dumbass.

    He says that you need the folowing interfaces:

    Glass & Air - Which i assumed to mean the top portion of the glass above the liquid level
    Glass & Liquid - The seperate inner liquid geometry below the surface geometry
    Liquid & Air - The seperate surface geometry which forms the liquid surface

    Maths
    Now if we follow Ed and divide the index of refraction values for these i get:

    Glass (1.5) / Air (1) = 1.5
    Glass (1.5) / Liquid (1.33) = 1.12 (Ed says this was 0.8 but i get 1.12)
    Liquid (1.33) / Air (1) = 1.33

    Ed has applied a index of refraction value of 1.33 to the Glass_MAT which encompasses the entire glass including the top piece above the liquid which i assumed was the Glass / Air interface and therefore thought should have a value of 1.5.

    Ed has applied a index of refraction value of 0.8 to the WineGlass_Mat (seperate inner liquid geometry) which i assumed was the Glass / Liquid interface. Going by the above maths this should be 1.12.

    Ed has applied an index of refraction value of 1.5 to the Wine_MAT (the surface of the liquid) which i assumed was the Liquid / Air interface and going by the above maths this should be 1.33.

    Again this is probalby just me being a dumbass but i can't quite work out how he arrived at the index of refraction values and if i've understood which materials should be applied to the different pieces of geometry.

    If anyone could shed some light on this, I would be grateful.

    Thanks.

  2. #2
    Join Date
    Apr 2012
    Posts
    107

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    I have not seen that tutorial you are addressing but I believe you are making things quite complicated than it should be. A while ago a made a test scene of a few wine glasses and some wine in some of them. You can see the rendered result from the below post:

    http://www.digitaltutors.com/forum/s...ne-Glass-Scene

    That is how I did the above scene:
    First I modeled the glasses using bezier curve tools then I revolved them. Then I converted to poly and detached the inner piece to create the liquid.
    Then for the lighting I used sIBL and one direct light with a couple of soft boxes.
    For the material I used mia_material x for all the objects, for the glass.
    1. This is the setting I used for the glass:
    Color: Black(to make clear glass not to have any diffuse color), Reflectivity: 1 (to be fully reflective), IOR: 1.52 (this what maya recommends to make crown glass), Transperancy: 1 ( to be fully transparent), BRDF: Check Fresnel Effct ( to mimic the real world reflection),
    Advanced / Specularity Balance: 0 (to see the soft boxes instead of any artificial specularity). Then make sure all the normals are fine and to have enough reflection and refraction rays in the global render settings under the quality tab.
    2. I used the same material for the liquid but in the advanced refraction turn use max distance on then use some value to give it some limit to the refraction based on the distance, ( in my case I used the value 2)I used that to use some color in the max distance. I chose a red color. IOR:1.33(for water)
    One final tip: make sure not to duplicate the inner surface in making the liquid, but instead try to extract it. In brief, wherever you have a liquid make sure you only have the outer surface not the inner one then after extracting the inner surface, make sure to reverse the normal.

    For more info on mia_material_x look at the below link:

    http://docs.autodesk.com/MENTALRAY/2...mia_material_x
    Last edited by rebazcg; 04-30-2012 at 09:40 AM.

  3. #3
    Join Date
    Nov 2011
    Posts
    17
    DT Subscriber

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    Hi rebazcg,

    Thanks for the reply. Yeah, maybe I am making it more complicated than it needs to be. I was just trying to following along with the tutorial and understand why the instructor was doing what he was doing to achieve realistic results.

    I'll give your max distance refraction a try.

    I liked your render (http://www.digitaltutors.com/forum/s...ne-Glass-Scene) but I did notice that red liquid looks like it would be semi transparent but didn't look quite right. In the small glass you cannot see the liquid surface through the glass on the other side of the glass, when it looks like from the angle you should be able to see it.

    Also on the tall wine glass it looks like you would be able to see a hint of the surface of the liquid from underneath and also the glass itself doesn't appear to be casting any shadows.

  4. #4
    Join Date
    Apr 2012
    Posts
    107

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    yeah the liquid is semi transparent and to prove that, I just moved the small glass to the front of the ball and I believe the ball from behind is quite clear, here is the quick render preview of that,


    because the glass is 100% transparent and the ground is reflective so it is hard to see a shadow of the clear glass, even in real life on a ground like that.

  5. #5
    Join Date
    Nov 2011
    Posts
    17
    DT Subscriber

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    Does anyone else have any ideas on how the tutor arrived at the IOR values on my original post?

    Thanks

  6. #6
    Join Date
    Oct 2006
    Location
    Digital Tutors HQ
    Posts
    2,321
    DT Staff
    I am a Face of Change

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    Hi jamiem,

    I just re-watched the video.

    He says the last interaction or interface backwards.

    Water = 1.33
    Air = 1.0
    Glass = 1.5

    So, to apply materials, you take the Surface type / surroundings. Or in other words, the IOR of what the light is moving into divided by where it is coming from.

    So, Light comes from air and hits the glass. 1.5 / 1.0 = 1.5, great: Glass (1.5) / Air (1) = 1.5
    For the liquid, a similar situation: Liquid (1.33) / Air (1) = 1.33
    Now, I think Ed accidentally misspoke, because if we apply the above we get the following:
    Surface type / surroundings : Water / Glass : 1.33 / 1.5 = 0.888(repeating)

    Index of Refraction is all about bending light, so we always need to remember light gets bent from moving from its current material into a second material according to the formula: second material IOR / current material IOR.

    Clearer?

    I've accidentally flipped values while speaking, it happens.

    Actually, looking at his original materials, he had the IOR correct for each mat, but then he switched them up to be wrong. Let me email Ed and check.
    Last edited by chrisg; 05-02-2012 at 04:52 PM.

  7. #7
    Join Date
    Nov 2011
    Posts
    17
    DT Subscriber

    Re: Need help with IOR values in ' Exploring mental ray Materials in Maya'

    Hi chrisg,

    Thanks for clearing this up. It now makes more sense.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts