Announcement

Collapse
No announcement yet.

Complex fresnel using VRayOSLtex

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

  • #16
    If the colour swatches used float values instead of 0-255, can you not use the R values from the reflection calculator?
    David Weaver

    Senior "Belief Crafter"
    Realtime UK

    https://www.artstation.com/artist/weaver

    Comment


    • #17
      Ah, completely missed the first link, sorry. Yes, they remapped it.
      Rens Heeren
      Generalist
      WEBSITE - IMDB - LINKEDIN - OSL SHADERS

      Comment


      • #18
        So, Reflectivity and Edgetint aren't N and K values, they are calculated from it. Which allows for easy picking and storing of the values. The falloff to white is handled by the shader. Haven't found a calculator for the colour values online, but the conversion is done with equation 14 and 15 from the paper.
        Rens Heeren
        Generalist
        WEBSITE - IMDB - LINKEDIN - OSL SHADERS

        Comment


        • #19
          I have no idea what this is all about, then
          I thought that this osl texture should make the creation of realistic metals easier. So far I have always recreated the reflectance curves for each color component with the output curves from a falloff map. The results are great, but the process is tedious... I was expecting to just put the n and k values into the osl texture and there you go. Wishfull thinking
          https://www.behance.net/Oliver_Kossatz

          Comment


          • #20
            Well, you are welcome to contact the authors of the paper and explain this to them I was a bit puzzled myself what is the purpose of their work...

            In any case, it is not too difficult to modify the shader to take n and k values directly instead of random colors - will see if I can do that if I get a bit of time.

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

            Comment


            • #21
              That would be great Vlado! Sure would beat mapping the curves out by hand...
              Although it would be even better if the two methods would work side by side. Essentially you could enter the rgb n and k values to get a starting point for 'reflectivity' and 'edgetint' and then switch over to 'artist friendly' color slots to tweak the color if needed. So if the client says, make that gold more rosy or less yellow - it would be easy and intuitive to do while still having physically correct starting point for the particular metal.

              I hope that makes sense

              Originally posted by vlado View Post
              Well, you are welcome to contact the authors of the paper and explain this to them I was a bit puzzled myself what is the purpose of their work...
              In any case, it is not too difficult to modify the shader to take n and k values directly instead of random colors - will see if I can do that if I get a bit of time.
              Best regards,
              Vlado

              Comment


              • #22
                Otherwise I have an OSL shader with NK inputs ready that I could post later today.
                Rens Heeren
                Generalist
                WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                Comment


                • #23
                  Sure, that could be useful as well.
                  btw I'm willing to donate some cash to whoever creates a combo of the two (seriously)

                  Originally posted by Rens View Post
                  Otherwise I have an OSL shader with NK inputs ready that I could post later today.

                  Comment


                  • #24
                    Super cool. Man I really need to set aside some time for learning OSL!
                    Akin Bilgic | CGGallery.com
                    Modeler & Generalist TD

                    V-Ray Render Optimization
                    V-Ray DMC Calculator

                    Comment


                    • #25
                      Here is a shader that allows you to enter n and k values directly (for 0.65, 0.55 and 0.45 micrometers - you can get values directly from http://refractiveindex.info/)

                      Use as a reflection color map and make sure the Fresnel option in the VRayMtl material is disabled.

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

                      Comment


                      • #26
                        Originally posted by viscorbel View Post
                        That would be great Vlado! Sure would beat mapping the curves out by hand... Although it would be even better if the two methods would work side by side. Essentially you could enter the rgb n and k values to get a starting point for 'reflectivity' and 'edgetint' and then switch over to 'artist friendly' color slots to tweak the color if needed. So if the client says, make that gold more rosy or less yellow - it would be easy and intuitive to do while still having physically correct starting point for the particular metal.
                        Or else, just have a drop-down with values from the refractiveindex website (copper, gold etc) so that you don't have to type those each time... would be much simpler

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

                        Comment


                        • #27
                          Sure, that would be perfect
                          For now, I guess I'll just create a few preset maps for the most common metals manually and run them through a color correct node to slightly change the hue if needed for artistic purposes. I think that should work pretty well.

                          Thank you for the shader!


                          Originally posted by vlado View Post
                          Or else, just have a drop-down with values from the refractiveindex website (copper, gold etc) so that you don't have to type those each time... would be much simpler

                          Best regards,
                          Vlado

                          Comment


                          • #28
                            Originally posted by vlado View Post
                            Here is a shader that allows you to enter n and k values directly (for 0.65, 0.55 and 0.45 micrometers - you can get values directly from http://refractiveindex.info/)

                            Best regards,
                            Vlado

                            That's great Vlado!

                            you know I probably shouldn't have put n and k in there as those values need to be normalized to fit 0-255 (from refractiveindex.info) as was said. The idea is to make it easier to have a complex fresnel but be able to tweak those colours by eye.

                            just have a drop-down with values from the refractiveindex website (copper, gold etc) so that you don't have to type those each time...
                            so that's why in another post I was wondering about a dropdown list in OSL
                            even that thinFilm shader you wrote would be great to have some pre-sets for different materials.

                            Comment


                            • #29
                              The drop-down is actually pretty much done now and will be in the next SP.

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

                              Comment


                              • #30
                                Hmm.. where do you see the rgb values for N and K on the refactiveindex.info website ? I only see the N and K, but not the rgb values ?

                                Comment

                                Working...
                                X