Announcement

Collapse
No announcement yet.

Determining correct falloff

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

  • #31
    Not a huge difference, but definitely noticeable.

    I think for Gloss it's not that essential, since it's pretty much eyeballed anyway. There's no measured curves to reproduce.

    Originally posted by dubcat View Post
    [ATTACH=CONFIG]23883[/ATTACH]
    Using the falloff from the toycar in episode 04.

    Is this OSL only for reflection or should we use it on the Gloss Falloff as well ?

    Comment


    • #32
      So in short, if I understood everything correctly. The falloff map was incorrect all these years?

      I did a test but I must have done something wrong or I'm not understanding this completely.

      1. 255 reflection, FRESNEL, GGX (2m57s)
      Click image for larger version

Name:	255.jpg
Views:	1
Size:	397.7 KB
ID:	855894

      2. VrayOSLTex, FRESNEL, GGX (3m21s)
      Click image for larger version

Name:	VrayOSL.jpg
Views:	1
Size:	388.5 KB
ID:	855895

      3. Falloffmap with Fresnel, GGX (3m06s)
      Click image for larger version

Name:	Falloff.jpg
Views:	1
Size:	394.9 KB
ID:	855896

      I probably did something wrong as the OSl has a lot less reflection, or was that the point?

      Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	80.0 KB
ID:	855897

      Also why is the VrayOSLTex shown as incompatible if I want to plug it in anything?
      A.

      ---------------------
      www.digitaltwins.be

      Comment


      • #33
        I think you are mixing together some things that shouldn't be mixed together.
        This non-linear falloff is an issue if you are not using the Fresnel option in vray material and relying on the falloff curve to replicate it.
        Plugging the fixed osl directly into reflection slot without an output map in between to create the fresnel-like curve doesn't make sense.

        ...
        On a related note - setting the falloff to Fresnel mode and inputting an ior value also results as a somewhat different result than using the same fresnel ior value with vraymaterial. In some advanced material layering workflows where fresnel falloff is used as blend mask, this gives incorrect results and should probably be replaced by linearized falloff + manually drawn fresnel curve in output.


        Originally posted by Vizioen View Post
        So in short, if I understood everything correctly. The falloff map was incorrect all these years?

        I did a test but I must have done something wrong or I'm not understanding this completely.

        1. 255 reflection, FRESNEL, GGX (2m57s)
        [ATTACH=CONFIG]23884[/ATTACH]

        2. VrayOSLTex, FRESNEL, GGX (3m21s)
        [ATTACH=CONFIG]23885[/ATTACH]

        3. Falloffmap with Fresnel, GGX (3m06s)
        [ATTACH=CONFIG]23886[/ATTACH]

        I probably did something wrong as the OSl has a lot less reflection, or was that the point?

        [ATTACH=CONFIG]23887[/ATTACH]

        Also why is the VrayOSLTex shown as incompatible if I want to plug it in anything?

        Comment


        • #34
          Originally posted by viscorbel View Post
          On a related note - setting the falloff to Fresnel mode and inputting an ior value also results as a somewhat different result than using the same fresnel ior value with vraymaterial. In some advanced material layering workflows where fresnel falloff is used as blend mask, this gives incorrect results and should probably be replaced by linearized falloff + manually drawn fresnel curve in output.
          I haven't tested this yet, but is the difference noticeable?
          Rens Heeren
          Generalist
          WEBSITE - IMDB - LINKEDIN - OSL SHADERS

          Comment


          • #35
            Sorry guys, but https://www.youtube.com/watch?v=IRsPheErBj8
            Check out my (rarely updated) blog @ http://macviz.blogspot.co.uk/

            www.robertslimbrick.com

            Cache nothing. Brute force everything.

            Comment


            • #36
              Hm yeah, it is slightly towards 0 degrees:

              Click image for larger version

Name:	fresneldiff.JPG
Views:	1
Size:	30.4 KB
ID:	855899

              Left VrayBlend with Falloff as mask, VRayMtl for both, one diffuse, one reflective.
              Right VRayMtl with Refl.
              All at IOR 1,6.

              I doubt that's because of the cos/linear issue though, maybe some energy preservation difference, or a slightly different equation.
              Rens Heeren
              Generalist
              WEBSITE - IMDB - LINKEDIN - OSL SHADERS

              Comment


              • #37
                I've been using this kind of setup for almost 10 years and never compared the two! The Falloff map creates a Fresnel curve that's too dark (3.2% vs 5.3%).
                Last edited by Rens; 21-04-2015, 09:02 AM.
                Rens Heeren
                Generalist
                WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                Comment


                • #38
                  Originally posted by Rens View Post
                  I doubt that's because of the cos/linear issue though, maybe some energy preservation difference, or a slightly different equation.
                  The equation is different. The Falloff map uses some approximation.

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

                  Comment


                  • #39
                    Schlick? But that's good to know!
                    Rens Heeren
                    Generalist
                    WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                    Comment


                    • #40
                      No, it's not the Schlick approximation actually. It says that the formula for the Falloff map is from "Principles of Digital Image Synthesis, Vol 2". The one in V-Ray is from the total raytracing compendium. I'm not sure why the two come out different and which is more correct.

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

                      Comment


                      • #41
                        V-Ray's is correct, luckily. : )
                        ((1.6-1)/(1.6+1)) squared
                        Rens Heeren
                        Generalist
                        WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                        Comment


                        • #42
                          Hi All.

                          I´m making some test using the OSL shader and i want to share my thoughts. I will include lots of pictures because my English is bad and i will explain myself better using images. Sorry about that.

                          In order to test different methods y create a simple scene using 90 planes, each one rotated 1º. I´m using pure 1.0 light in the scene, no GI in order to sample just the reflections.


                          Using this test scene i render various tests:

                          Normal "linear" falloff from MAX.


                          I save the RAW image into a 32bpc EXR and sample the values in nuke using sampler:
                          As you can see, 3D Studio MAX falloff is not linear.


                          Using the OSL from Wobi i corrected it and the result is this.
                          Adding Color Correct to correct the gamma didn´t work property.


                          Now some tests using the Complex Fresnel OSL
                          I will use gold for this example. I´m using the same values Vlado use in the complex Fresnel OSL inside http://refractiveindex.info/ (R0.65, G0.55, B0.45), just to be consistent whit the OSL.


                          In Nuke the result is almost identical to the graphic from the web:



                          This experiments are interesting, but let´s be honest, how many times do you use the exact values from refractiveindex, without change it?. I never use it, i ALWAYS must adjust the values by eye, so whats the point of trying to match this values we will never use?. If we MUST adjust the values, i don´t like to have very complex method that it´s difficult to adjust like 3 RGB curves o the Complex frenel OSL were you can´t "see" the result and you must work by instinct.

                          I just prefer to use a Color for base reflectivity an max reflectivity an a custom curve to change were and wen reflectivity goes from MIN no MAX. Yo don´t even need perfect values for this.
                          It will look something like this:


                          And the result sampled in Nuke looks almos identical to the Complex Fresnel OSL:


                          The main difference is the easy to use and setup of this approach, and it´s more "artistic" friendly because you are working whit colors instead of numbers or non-calibrated curves. The only particular case were i prefer to use other method is wen i want HUE change along the angles.

                          PD: Will be great to have a true linear fallof control, because now, using the OSL if you want to mix textures, you need to use the falloff just as a mask and have 2 or 3 extra nodes.
                          My Spanish tutorial channel: https://www.youtube.com/adanmq
                          Instagram: https://www.instagram.com/3dcollective/

                          Comment


                          • #43
                            Originally posted by theedge View Post
                            As mentioned earlier it turns out that you can just as well use an Output map so don't worry about that OSL shader.
                            Do you mean put a Falloff map in the Output map then attached the Output map to the Vraymtl reflection slot?
                            Best regards,
                            Jackie Teh
                            --

                            3ds max design 2023, V-Ray 6, Update 2.1 [6.20.06 build 00000]
                            AMD Threadripper 1950X @3.40 GHz | 64GB RAM | Nvidia RTX 3070 ti
                            Website: https://www.sporadicstudio.com
                            Email: info@sporadicstudio.com
                            YouTube: https://www.youtube.com/c/SporadicStudio

                            Comment


                            • #44
                              Originally posted by adanmq View Post
                              I just prefer to use a Color for base reflectivity an max reflectivity an a custom curve to change were and wen reflectivity goes from MIN no MAX. Yo don´t even need perfect values for this.
                              Yes, I have a script somewhere that creates an RGB gradient bitmap from NK values. I might have posted it here or in the science of CG thread over on cgtalk, I'll post it or a link to it tonight, it helps to make it more visual like you said. Also quicker to render!
                              Rens Heeren
                              Generalist
                              WEBSITE - IMDB - LINKEDIN - OSL SHADERS

                              Comment


                              • #45
                                Originally posted by Rens View Post
                                Yes, I have a script somewhere that creates an RGB gradient bitmap from NK values. I might have posted it here or in the science of CG thread over on cgtalk, I'll post it or a link to it tonight, it helps to make it more visual like you said. Also quicker to render!
                                Hi Rens, i go to the cgtalk post but cannot find the script you have mention here?
                                Best regards,
                                Jackie Teh
                                --

                                3ds max design 2023, V-Ray 6, Update 2.1 [6.20.06 build 00000]
                                AMD Threadripper 1950X @3.40 GHz | 64GB RAM | Nvidia RTX 3070 ti
                                Website: https://www.sporadicstudio.com
                                Email: info@sporadicstudio.com
                                YouTube: https://www.youtube.com/c/SporadicStudio

                                Comment

                                Working...
                                X