Announcement

Collapse
No announcement yet.

Maya Complex Fresnel IOR

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

  • Maya Complex Fresnel IOR

    Vlado,

    Quick Question, So I have been working my way through Grant Warwick Vray Videos just to learn some new work flows. This is obviously set up for 3ds max but most of it is applicable to maya. I have a question regarding the way he is creating materials in maya. He is using a 3dmax falloff curve node something that those of us in maya don't have. I know there are ways to simulate this based on a gradient map but I found this interesting post from here http://therenderblog.com/custom-fresnel-curves-in-maya/ and here http://therenderblog.com/custom-fres...n-maya-part-2/.

    So i downloaded the script and don't see any reason why this same theory cannot be applied to a VrayMTL my question is in maya were is the correct connection for the remap node. In Grants Videos he is turning off the use Fresnel and using this in place. Anyway in maya I am wondering if this is contected to the Reflection Color, Amount or in the Frensel IOR.

    Anyway I hope you find this some what interesting and I am sure will have some good thoughts.

    Quick update so connected to the the reflection color with IOR turned off seems to produce the correct result reflection on the glancing angles are stronger than look directly at the object.

    I am using Vray 3.0 and Maya 2015

    Best, J



    Click image for larger version

Name:	IOR_A.JPG
Views:	1
Size:	32.0 KB
ID:	880846Click image for larger version

Name:	IOR_B.JPG
Views:	1
Size:	57.9 KB
ID:	880847Click image for larger version

Name:	IOR_C.JPG
Views:	1
Size:	279.1 KB
ID:	880848
    Last edited by Jvincentfx45; 12-10-2014, 09:57 PM.

  • #2
    This is using the IOR values for Polycarbonate Plastic from http://refractiveindex.info/legacy/. My bad reading the code it seems the reverse node is already being generated in the code so its just the facing ratio of the smaple info node to the input value of the remap value node. That would make this image not correct for the reflections but correct i think for the input on the vray material.
    Attached Files
    Last edited by Jvincentfx45; 12-10-2014, 10:13 PM.

    Comment


    • #3
      The Correct output and setup Click image for larger version

Name:	IOR_E.JPG
Views:	1
Size:	178.1 KB
ID:	854367Click image for larger version

Name:	IOR_F.JPG
Views:	1
Size:	61.9 KB
ID:	854368Click image for larger version

Name:	IOR_G.JPG
Views:	1
Size:	46.2 KB
ID:	854369

      Comment


      • #4
        I've done this with this method and slightly changed his code to work with V-Ray;

        http://therenderblog.com/custom-fresnel-curves-in-maya/
        http://therenderblog.com/custom-fres...n-maya-part-2/

        I notice a huge difference in aluminium and to me it is the only one that works really well.

        I think just turning off fresnel altogether (and turning reflectivity to something other than one!!!) with Gold, Chrome etc actually works better than the actual fresnel curves - but that's just me.
        Maya 2020/2022
        Win 10x64
        Vray 5

        Comment


        • #5
          I haven't tried the code posted in those links after coming across a while back. In my tests, IIRC you can achieve the exact same connection in Maya with hooking up 3 sets of reverse node and remapValue node to the R G B channel of the reflection color. The only down side, comparing to Max, is that editing the shape of those curves is easier in Max as you get the tangent tool (and changing position of multiple points the same time?) whereas in Maya you kinda stuck with inserting many points in the maximized curve editor window to match complex Fresnel curves of each of the R G B and keep changing the shape of curve is not that efficient....

          Sometimes I can't help wondering how practical this technique is after first time learning this from Rob Harrington from an FXPHD course years ago as when you loo-dev away in a complex shading network with hand-painted textures needing to plug in to reflection and glossiness slot, how am I gonna keep the original curves intact in each R G B channel and do I need to?

          For pure metal I bet this workflow can match better to the real world then a out-of-box VrayMtl based on Simple Fresnel curve, but for metals that need all sort of dirt, chipping, clear coat, or what not, I am still learning how to implement this technique...

          cheers.
          Last edited by jasonhuang1115; 13-10-2014, 10:16 AM.
          always curious...

          Comment


          • #6
            Yes I agree I am still working through this as well. I agree that it seems quite functional for simple materials but maybe to much when you are building a more complex shading network. We're changing the ior value would seem to make more sense work flow wise.

            I have not tested this out in a actual project but would like to just to see if there is a real benefit. Also I think maybe it's a bit industry dependent if it's is product design this makes sense but for arch viz this may not be the most efficient way to work.

            Comment


            • #7
              Rob's course is one of the best I've ever seen and I'd love to see him work with this method when he isn't trying to explain things at the same time - I'd say he's pretty quick on it.

              In terms of using textures you're probably matching a real world object and your best bet is just matching to reference while keeping in mind some of the other things you know about metals. Like it might be good enough that if you've got dirt on a material, is it just a case of multiplying your texture over the reflection curve? If the dirt is so thick that it totally blocks out the metal underneath then is it better to just use a black and white blend map and layer a totally different material on top?

              The other thing to bear in mind is that the scan data here comes from only one very specific example of a metal - since not all metals are the same you're not necessarily going to get the same look as the metal you want just by using one of these curves - you'll still need to adjust some bits by hand afterwards, though the curves will give you some information about the subtleties in the reflection colours.

              If you're trying to match a very specific look, then your only bet is good reference. Even when I pull ref images randomly from the web and try to recreate the look, there's always a bit of a shift in the materials as they were shot in totally different lighting environments with different colour balances, so if I've got a shiny object it might be tinted to a different hue by the scene lights - likewise if it's an overcast day or a clear sun day it's going to make the highlights and reflections look quite different, so you could be making your material wrong in your 3d scene to try and recreate a look that was driven by very different lighting situations.

              The best thing I've seen for this stuff is Blizzard's very simple approach. What they do is get a shelf of the materials that they want to use in their trailers - different metal or plastic objects, balls wrapped in the cloth they want and so on, then they bring that shelf into a real world location which has lighting similar to what they're trying to recreate in each of their shots and shoot a hdri and images of their material shelf. Then they've got a hdri, materials they can aim for, and similar lighting to what they're trying to make in 3d. If we had a few really well calibrated hdris covering a few different lighting situations, at least you'd be able to try and lookdev your shaders in similar lighting to the reference images you have and perhaps be a tiny bit closer to realistic results. I saw a video from the makers of metal gear solid 5 where they had a small meeting room that they'd measured, photographed and hdri'd to be very accurate to real world light colour and brightness. Any time they were making a material, they'd bring in a real object into this room, photograph it as reference and then try and recreate it's shaders in their virtual conference room which led to really nice results.

              Comment


              • #8
                Good points John. Thanks! Yeah, it's like trying to solve a 3-variable (light, material, & lens) equation with 2 variables locked down (calibrated lighting env maps and standard CG camera/physical cam with fixed parameters). We are left to only tweak material settings to match real-world materials shot under the same lighting conditions. I wonder how hard big vfx/game studios are pushing this to yield consistent results for look-dev.
                always curious...

                Comment

                Working...
                X