Announcement

Collapse
No announcement yet.

Thin film OSL shader

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

  • Thin film OSL shader

    Hello,

    Someone asked for a thin film shader and I wrote one in OSL based on some code I found here:
    http://www.gamedev.net/page/resource...graphics-r2962

    Attached is the shader and some sample scene.

    Click image for larger version

Name:	thinfilm.png
Views:	1
Size:	433.5 KB
ID:	881287

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

  • #2
    Thanks Vlado! I'm sure this will come in handy someday
    Cheers,
    Oliver

    https://www.artstation.com/mokiki

    Comment


    • #3
      What can we use it for?
      CGI - Freelancer - Available for work

      www.dariuszmakowski.com - come and look

      Comment


      • #4
        I hate to use this as a reference, but here are some examples:
        http://blog.maxwellrender.com/tips/p...-of-materials/

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

        Comment


        • #5
          Hehehe thank you :- )
          CGI - Freelancer - Available for work

          www.dariuszmakowski.com - come and look

          Comment


          • #6
            Hehe thank'S Vlado good stuff again

            Comment


            • #7
              How would I use it? VRayBlendMtl? Just on top with <100% Opacity?

              Edit: Nevermind, missed that there is a link with an example scene.
              Last edited by Art48; 06-02-2015, 02:05 AM.
              Software:
              Windows 7 Ultimate x64 SP1
              3ds Max 2016 SP4
              V-Ray Adv 3.60.04


              Hardware:
              Intel Core i7-4930K @ 3.40 GHz
              NVIDIA GeForce GTX 780 (4096MB RAM)
              64GB RAM


              DxDiag

              Comment


              • #8
                Originally posted by Art48 View Post
                How would I use it? VRayBlendMtl? Just on top with <100% Opacity?
                In my example, I just put it as the reflection color in a VRayMtl material with Fresnel off. Using it as blend mask is also possible, though it could get a bit complicated if you want to do bump mapping just for that layer.

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

                Comment


                • #9
                  Very useful little shader Thanks Vlado!

                  Comment


                  • #10
                    Niiiiiicee!

                    Stan
                    3LP Team

                    Comment


                    • #11
                      Could this be incorporated into the standard VRay Material (maybe under an "advanced" tab)? It's a superb addition.

                      Also, I assume that to keep realistic you would use realistic wavelengths - 380 to 750 nm?
                      Last edited by Macker; 10-02-2015, 05:32 AM.
                      Check out my (rarely updated) blog @ http://macviz.blogspot.co.uk/

                      www.robertslimbrick.com

                      Cache nothing. Brute force everything.

                      Comment


                      • #12
                        It could be added to the VRayMtl for sure, but I've been accused that the UI is incredibly cluttered already. Will think about it anyways.

                        For the wavelengths yes, they need to be more or less realistic.

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

                        Comment


                        • #13
                          Cluttered UI in the VRayMaterial? Oh, come on, I mean maybe there is much stuff to do but this is professional software. People shouldn't be afraid when they see some buttons... Jeez...

                          I'd rather see a cluttered UI than holding back useful features. You shoul dpropably tidy up the UI in 3.2 or even 4.0 with a total overhaul, if required. But until then I see no point in holding back stuff because of cluttering...
                          Software:
                          Windows 7 Ultimate x64 SP1
                          3ds Max 2016 SP4
                          V-Ray Adv 3.60.04


                          Hardware:
                          Intel Core i7-4930K @ 3.40 GHz
                          NVIDIA GeForce GTX 780 (4096MB RAM)
                          64GB RAM


                          DxDiag

                          Comment


                          • #14
                            Originally posted by vlado View Post
                            It could be added to the VRayMtl for sure, but I've been accused that the UI is incredibly cluttered already. Will think about it anyways.

                            For the wavelengths yes, they need to be more or less realistic.

                            Best regards,
                            Vlado
                            I think the best way to tackle this is the same approach you took with the settings. Have all the basics on show by default, but have an advanced check box that displays additional settings that let "power users" tweak what they need to. I appreciate VRay is used by everyone from absolute amateurs through to VFX pro's and that catering to everybody's needs is very difficult but it seems a bit backwards to withhold updated elements of the software to cater for the few that it might scare.
                            Check out my (rarely updated) blog @ http://macviz.blogspot.co.uk/

                            www.robertslimbrick.com

                            Cache nothing. Brute force everything.

                            Comment


                            • #15
                              Originally posted by Macker View Post
                              I think the best way to tackle this is the same approach you took with the settings. Have all the basics on show by default, but have an advanced check box that displays additional settings that let "power users" tweak what they need to. I appreciate VRay is used by everyone from absolute amateurs through to VFX pro's and that catering to everybody's needs is very difficult but it seems a bit backwards to withhold updated elements of the software to cater for the few that it might scare.
                              Well I'm not withholding it, there's still a way to get what you want obviously Like I said, will think about it. You are right that if we hide some of the existing params in an advanced view, there will be space for new stuff.

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

                              Comment

                              Working...
                              X