Announcement

Collapse
No announcement yet.

Unlocked RGB Exponent.

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

  • #16
    Yep its a physical effect, features on the surface smaller than the wavelength of viable light. Cool, no? its destructive interference.

    -Michael

    www.morphographic.com
    Last edited by anchovy; 16-04-2013, 07:42 PM.

    Comment


    • #17
      That's not different glossiness though; just different color for rays reflecting in different directions... it can be done, but the V-Ray material needs to be modified a bit.

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

      Comment


      • #18
        Originally posted by vlado View Post
        That's not different glossiness though; just different color for rays reflecting in different directions... it can be done, but the V-Ray material needs to be modified a bit.

        Best regards,
        Vlado
        Is this something you are willing to entertain for R3?

        Thanks

        -Michael

        Comment


        • #19
          Originally posted by joconnell View Post
          I wonder was that an oxide / patina coating rather than a property of the metal?

          P.s. I agree with you - It might go away from some of the vray ethos of not allowing the breaking of physically correct properties but it's still very handy to have in the main ui from an artists perspective.
          I honestly feel it's a property of the metal but Vlado would have to confirm the physicality of the shader.
          However, thanks to his confirmation on the fact that glossiness doesn't vary based on wavelength I feel I've managed to successfully simplify my previous attempt and reproduce the material a little.(As best as possible with the ward brdf)
          you can note the blue tinting around the shadow areas and a similar RGB gradient near the highlights. (trying to figure out how to amplify this with a vray sampler info tex perhaps?)


          Last edited by grantwarwick; 16-04-2013, 04:38 PM.
          admin@masteringcgi.com.au

          ----------------------
          Mastering CGI
          CGSociety Folio
          CREAM Studios
          Mastering V-Ray Thread

          Comment


          • #20
            Way back in the day there was a phenomenological approach to this effect. It was a simple specular layer. In fact I took the renderman code and made a specular shader for Brazil. you might want to take a look at the paper as you could do the same thing with a composite map layer approach.

            http://www.cs.ubc.ca/~xgranier/2002/..._granier_x.pdf

            http://bhsunshine.com/shaders/interfere.html for something a bit less technical

            -Michael
            Last edited by anchovy; 16-04-2013, 05:03 PM.

            Comment


            • #21
              Yeah it's a tough one - what happens with metals is that they have a different reflectance curve for each wavelength of the spectrum which can cause some splitting of the colours - it's mainly visible as a shift in colour cast over the gradual change in angle of the surface so it'd be similar to using a different falloff map in red, green and blue and then recombining them to make the final map. Glossiness is a function of surface roughness rather than a wavelength thing so I can half see why you might get that visible effect but it seems too localized around the speculars on fairly flat areas for it to be angle / wavelength based. In the iron man example above it looks like it's split around the highlights which makes me suspect something else might be at work. I don't know all the terminology for this so I'm at a loss as to what to search for specifically but the most frequent place I see this effect is on vehicle parts that've been treated to prevent oxidization and it's the coating that's put on the metal that causes the coloured fringing due to it refracting wavelengths of light differently.

              Here's a really trashy example using different falloffs for red, green and blue as you get on metals and it's not really what you're going for. Your effect seems more like a car paint type spec effect with multiple layers of coating that filter light differently. Not arguing with you at all about the look of what you're going for btw or how to get it, just more so what's causing it.

              For all of the metals it's a tough one - We can get wavelength data for a lot of different types of metals but the bad thing is they come from scan data. This is really handy if you want that exact look of the sample of the metal that was scanned, but if you want something rougher, or more dirty or more oxidised or whatever then it's less useful - the scan data is exactly a replica of the reflectance of the bit of metal put into the scanner, so it's not very flexible. Hence we come to the artistic approach to it of getting something that looks right to us instead which is probably way more useful.

              Just as a quick example here's some fresnel curves tweaked to give a bit of chroma splitting but it won't give me the effect you're going for above, and you're totally right, the fastest way to get the look is independent controls over r,g and b glossiness - physically incorrect but again who cares since we don't totally care about how we arrive at the final pixels once we get the look we want.




              And a wee 2012 file for anyone curious - https://dl.dropboxusercontent.com/u/...eflections.max

              P.s. gorgeous work on your site - I'll be buying your support stuff for the materials, I'm always interested in approaches to calibration and measuring of materials in known environments to get more predictable results!

              Comment


              • #22
                Originally posted by anchovy View Post
                Way back in the day there was a phenomenological approach to this effect. It was a simple specular layer. In fact I took the renderman code and made a specular shader for Brazil. you might want to take a look at the paper as you could do the same thing with a composite map layer approach.

                http://www.cs.ubc.ca/~xgranier/2002/..._granier_x.pdf

                http://bhsunshine.com/shaders/interfere.html for something a bit less technical

                -Michael
                This is exactly the approach I've been taking with the layered RGB model, however I hadn't thought of simplifying the approach with bump maps!
                here is the result!
                admin@masteringcgi.com.au

                ----------------------
                Mastering CGI
                CGSociety Folio
                CREAM Studios
                Mastering V-Ray Thread

                Comment


                • #23
                  Originally posted by joconnell View Post
                  Yeah it's a tough one - what happens with metals is that they have a different reflectance curve for each wavelength of the spectrum which can cause some splitting of the colours - it's mainly visible as a shift in colour cast over the gradual change in angle of the surface so it'd be similar to using a different falloff map in red, green and blue and then recombining them to make the final map. Glossiness is a function of surface roughness rather than a wavelength thing so I can half see why you might get that visible effect but it seems too localized around the speculars on fairly flat areas for it to be angle / wavelength based. In the iron man example above it looks like it's split around the highlights which makes me suspect something else might be at work. I don't know all the terminology for this so I'm at a loss as to what to search for specifically but the most frequent place I see this effect is on vehicle parts that've been treated to prevent oxidization and it's the coating that's put on the metal that causes the coloured fringing due to it refracting wavelengths of light differently.


                  Here's a really trashy example using different falloffs for red, green and blue as you get on metals and it's not really what you're going for. Your effect seems more like a car paint type spec effect with multiple layers of coating that filter light differently. Not arguing with you at all about the look of what you're going for btw or how to get it, just more so what's causing it.

                  For all of the metals it's a tough one - We can get wavelength data for a lot of different types of metals but the bad thing is they come from scan data. This is really handy if you want that exact look of the sample of the metal that was scanned, but if you want something rougher, or more dirty or more oxidised or whatever then it's less useful - the scan data is exactly a replica of the reflectance of the bit of metal put into the scanner, so it's not very flexible. Hence we come to the artistic approach to it of getting something that looks right to us instead which is probably way more useful.

                  Just as a quick example here's some fresnel curves tweaked to give a bit of chroma splitting but it won't give me the effect you're going for above, and you're totally right, the fastest way to get the look is independent controls over r,g and b glossiness - physically incorrect but again who cares since we don't totally care about how we arrive at the final pixels once we get the look we want.

                  P.s. gorgeous work on your site - I'll be buying your support stuff for the materials, I'm always interested in approaches to calibration and measuring of materials in known environments to get more predictable results!


                  Great to see others with similar interests! I'm on the exact same page as you and would just like an artist friendly approach
                  admin@masteringcgi.com.au

                  ----------------------
                  Mastering CGI
                  CGSociety Folio
                  CREAM Studios
                  Mastering V-Ray Thread

                  Comment


                  • #24
                    I've got some code that will take the reflection scan data from a metal and convert it into a gradient ramp which you can then use in mapped mode with a perpendicular / parallel falloff driving it so we can get accurate reflections as per refractiveindex.info but again it's scan data from one specific very clean ideal sample of the metal and the end result may not look like what you want or imagined - I don't think there's all that much benefit in sticking it up when it's so limited but I'll do a run through of reflections some point very soon. Just as an aside the head of 3d commercials in framestore london was what led me to it - he did a course for fxphd called mya214 - it's a maya / mental ray course but it's the first thing I've seen that really goes through calibrating hdris with mac beths, sample shaders and so on - he also goes through the metal reflection process and all the hoops you've to jump through and whether it's ultimately worth it or not. Good course!

                    As I say very interested to learn about your approach - your results speak for themselves!

                    Comment


                    • #25
                      grantwarwick,

                      your tests,specially the metal look very interesting, would you mind sharing the metal example material?

                      Comment


                      • #26
                        Originally posted by joconnell View Post
                        I've got some code that will take the reflection scan data from a metal and convert it into a gradient ramp which you can then use in mapped mode with a perpendicular / parallel falloff driving it so we can get accurate reflections as per refractiveindex.info but again it's scan data from one specific very clean ideal sample of the metal and the end result may not look like what you want or imagined - I don't think there's all that much benefit in sticking it up when it's so limited but I'll do a run through of reflections some point very soon. Just as an aside the head of 3d commercials in framestore london was what led me to it - he did a course for fxphd called mya214 - it's a maya / mental ray course but it's the first thing I've seen that really goes through calibrating hdris with mac beths, sample shaders and so on - he also goes through the metal reflection process and all the hoops you've to jump through and whether it's ultimately worth it or not. Good course!

                        As I say very interested to learn about your approach - your results speak for themselves!
                        I'd love to see some example of what the curves look like once reconstructed, sounds amazing as it gives you the push in the right direction then you can alter to match further.

                        Originally posted by lllab View Post
                        grantwarwick,

                        your tests,specially the metal look very interesting, would you mind sharing the metal example material?
                        Not just yet sorry, I'm planning on releasing my production shader library as a bought package. I have a thread in the general forum showing what I'm up to.
                        admin@masteringcgi.com.au

                        ----------------------
                        Mastering CGI
                        CGSociety Folio
                        CREAM Studios
                        Mastering V-Ray Thread

                        Comment


                        • #27
                          Sure thing - I'll pop some across. One thing that's slightly annoying is that max doesn't have script access to creating the swatches on a gradient ramp. It can alter them if they exist, but not create them and so you need to have a starting gradient as a base to alter.

                          The general result of the curves is that you have a fairly reflective curve (above 50% generally) for the majority of the angles from 0 to 50 degrees, then they start to make a ramp up towards 100% at the very edges. Each metal has a colour cast though so it means that the red might be flat at 55%, green at 45% and blue at 60% for the 0 to 50 degree portion. It makes a difference at your edges but again depending on what the curvature of your object is it may or may not be worth the effort. The other things is that the setup is driven by a formula and outputs a gradient, and since each of the r,g,b curves get merged into a key for each degree value it's less elegant to edit afterwards. I'll look into other options, things like bercon gradient has maxscript access but it's not included with max or vray unfortunately - I'd love to find something that works out of the box.

                          Comment


                          • #28
                            Can you explain the difference on the refractiveindex.info site of the S-polarized, P-Polarized and Non Polarized reflectence curves?

                            I struggle to understand the math/science behind it however have a pretty good eye at reproducing the correct reflectance nesting fresnel layers together in a blend material.
                            The problem with my approach however is the shaders are more complex than they should be and if I knew what reflectance graph to copy I could essentially make the gradient myself.

                            Thanks for your help and insight!

                            Edit- So some googling reveals its just an average of the two curves and commonly approximated in computer graphics. Am I right in assuming these 3 curves have nothing to do with the RGB reflectance values?
                            Last edited by grantwarwick; 17-04-2013, 11:22 AM.
                            admin@masteringcgi.com.au

                            ----------------------
                            Mastering CGI
                            CGSociety Folio
                            CREAM Studios
                            Mastering V-Ray Thread

                            Comment


                            • #29
                              Yep - S polarized and P polarized are just two methods of measuring and we take the average of the two as what we consider the "visible" part of it that we want for our reflectivity percent. In some ways it's a dumb move by the site author as using red green and blue can be confusing.

                              All you do is go to that site and stick in the following values for your wavelengths: Red 0.650, Green 0.510 and Blue 0.475 into the wavelength type in at the top of the chart. Then scroll to the bottom where it shows the reflectance curves for for s, p and non polarized. This'll give you a visual diagram of how the reflectance of the metal is mapped from 0 to 90 degrees for each of the red, green and blue wavelengths - bit of a pain to do it separately but that's about it. It's a shame that the falloff map doesn't give you a type in position and value for each knot you put onto the curve as it'd make it really easy to get accurate results - as you say though you just have to trace that curve for red, green and blue, then combine them together to make your complete reflectance curve. You can use three of these in perpendicular / parallel mode with your curves (since the graphs are even from 0 to 90 - each value on the curve is a degree so it's mappable to perp / parallel) and then put them all into a composite map with all three in additive mode to add up to your "white light" reflectance value.

                              Comment


                              • #30
                                It all of a sudden starts to make amazing sense hahaha.

                                I'm wiling to put the effort int to reproduce the materials, just wanted to make sure it was done right.

                                Maybe my brain is exhausted but I want to believe that using this composite map method to create the reflectance curve will produce the same fringing we see in my test but I have a feeling it won't?
                                Basically my metal material seen on the previous page blends 3 different materials based on RGB each having a slightly different fresnel value so it's basically the same as what you are describing on a larger material level (Calculating 3 materials is slow as shit)

                                Heading into work at 5am to experiment time!
                                admin@masteringcgi.com.au

                                ----------------------
                                Mastering CGI
                                CGSociety Folio
                                CREAM Studios
                                Mastering V-Ray Thread

                                Comment

                                Working...
                                X