Announcement

Collapse
No announcement yet.

A Quantized-Diffusion Model for Rendering SKIN and Translucent Materials

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

  • #61
    Thank you Vlado, the fix looks like a pretty huge improvement. Going to check it out right now in the nightly.

    Comment


    • #62
      will we see the fix in the 2.4 update.?

      Comment


      • #63
        I just checked it out and it does seem to be a very nice improvement. However I noticed one very odd thing - turning legacy mode off seems to turn the fix off - the opposite of what I would expect. I checked it a bunch of times to make sure I'm not going crazy. Using the latest nightly with Max 2012.

        Click image for larger version

Name:	sss_legacy_comparison.jpg
Views:	1
Size:	99.0 KB
ID:	846674

        Comment


        • #64
          Originally posted by vlado View Post
          So the pesky greenish tint bug is fixed now; one of the formulas for calculating the volume properties out of the sss color was wrong - it is also wrong in the original bssrdf paper that I followed

          Best regards,
          Vlado
          Vlado-

          Thanks for sticking with me on this one. I am so glad you tracked down what the bug was. And yeah it always seems that there are typos in the published papers. WOW, I cant tell you how stoked I am.

          Will the patch make its way back to 1.5? We are still using it here at the office.

          Thanks again!

          -Michael

          p.s. Heres a case of the same thing http://photorealizer.blogspot.com/20...flectance.html

          Comment


          • #65
            Originally posted by adamlewis View Post
            I just checked it out and it does seem to be a very nice improvement. However I noticed one very odd thing - turning legacy mode off seems to turn the fix off - the opposite of what I would expect. I checked it a bunch of times to make sure I'm not going crazy. Using the latest nightly with Max 2012.
            The odd thing is that the "legacy" mode is still how the shader used to behave before Other than that, you will need a two-layered shader to avoid this effect (f.e. vrayblendmtl with two sss2 materials in it). With a single shader, it is not possible to avoid it - as more red light reaches down into the object, there is less red towards the surface, so small details appear cyan-ish. (If you think about it, a very small flake of skin is not really pink, but whitish).

            Here is a render with a VRayBlendMtl with two sss2 materials in it: the base material is dark red with larger scatter radius; the first coat material is another sss2 material with pink sss and scatter color.
            Click image for larger version

Name:	sss_layered.jpg
Views:	1
Size:	79.9 KB
ID:	846676

            In any case, with the legacy method, the extinction of the light inside the volume followed slightly different curves for red/green/blue components, and this lead to an apparent shift in color hue - so the orange juice above ended up being greenish. My change only forces the three color curves to attenuate in the same way, which preserves the color hue of the light as it propagates through the volume.

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

            Comment


            • #66
              Originally posted by vlado View Post
              (snip)...it is not possible to avoid it - as more red light reaches down into the object, there is less red towards the surface, so small details appear cyan-ish. (If you think about it, a very small flake of skin is not really pink, but whitish).
              Sorry to jump in here, but I am not sure I agree with this sentiment (unless I completely misunderstood\misread).

              There is no reason for less red light to bounce back or through, if more of it penetrates the medium. Quite the opposite I'd say. You can test this if you want in a murky puddle of water, or your own flesh with a coloured light source.
              If the medium it self has the ability to absorb the red wavelength, then you would not get cyan scattering as intense as we seem to get. We expect something similar, just a tad less red.

              However, when it comes to skin\flesh, it doesn't absorb red as in these examples, it actually absorbs the other wavelengths more, thus producing a beige-to-red tinted scatter (depending on the depth), and the deeper it has been scattered, the redder it gets.

              What we expect then, is for the controls on the materials to reflect our expectations, as humans, not robots, thus we expect the colour we set in a swatch to be the colour we get as a result, more or less.
              The inner workings of the shader can still be mathematically correct, but that is for programmers and computers, not your run of the mill illustrator.

              We just need a better interface, where the colour is defined as the result\goal, and the shader does the required maths to work out the "wavelengths" and such.
              Signing out,
              Christian

              Comment


              • #67
                Originally posted by vlado View Post
                The odd thing is that the "legacy" mode is still how the shader used to behave before Other than that, you will need a two-layered shader to avoid this effect (f.e. vrayblendmtl with two sss2 materials in it). With a single shader, it is not possible to avoid it - as more red light reaches down into the object, there is less red towards the surface, so small details appear cyan-ish. (If you think about it, a very small flake of skin is not really pink, but whitish).

                Here is a render with a VRayBlendMtl with two sss2 materials in it: the base material is dark red with larger scatter radius; the first coat material is another sss2 material with pink sss and scatter color.
                [ATTACH=CONFIG]12609[/ATTACH]

                In any case, with the legacy method, the extinction of the light inside the volume followed slightly different curves for red/green/blue components, and this lead to an apparent shift in color hue - so the orange juice above ended up being greenish. My change only forces the three color curves to attenuate in the same way, which preserves the color hue of the light as it propagates through the volume.

                Best regards,
                Vlado
                That's very interesting, because as you can see in my picture the fix actually exacerbates the green tinting issue on the small scale. But the logic of what you are saying makes perfect sense, so I take your word that the shader is behaving as it should.

                I had no idea it was possible to layer sss2 materials in the way you describe, mostly because I just assumed the vrayblendmtl could only blend surface changes as opposed to changes within a volume. If that's the case then that it would certainly add a lot of control and presumably allow us to achieve very realistic skin and other heterogeneous materials. Are there any limitations to this approach?

                With that thought in mind, I was curious what a homogenous scattering material would look like in real life, and I found a very interesting example in the form of a silicone mask - as you can see in the picture I attached it exhibits the exact same green tinting you see in the sss2 shader, so the shader does seem to be behaving in a physically accurate way.

                Click image for larger version

Name:	face_surgeon.jpg
Views:	1
Size:	24.4 KB
ID:	846677

                Comment


                • #68
                  Your homogeneous example does not exhibit this behaviour. You can open it in Photoshop and sample the colours. They look "cold" to the eye, but that is because of the contrasting redness elsewhere. All the colours I sampled had more red in them than green or blue. The areas where the material is producing highlights (not just the inner sharpest parts, but also the areas around it), are also affected by the fact that the light source is "cold", slightly blue-ish (as seen on the background). Try Adjusting the white balance first by getting the paper more neutral.

                  Just wanted to point out that this does not support the logic.
                  Last edited by trixian; 14-01-2013, 01:14 PM.
                  Signing out,
                  Christian

                  Comment


                  • #69
                    Originally posted by trixian View Post
                    You can test this if you want in a murky puddle of water, or your own flesh with a coloured light source.
                    I have However, to see the effects that we discuss here, you'd need to look at distances a few parts of the millimeter away from the light source. With the scattering coefficients that there sphere above was rendered with, it would have to be about 2 mm wide, and just one of the displaced bumps would probably be like 0.2 mm. It would be very hard to observe changes in material appearance with a naked eye at this scale

                    If the medium it self has the ability to absorb the red wavelength, then you would not get cyan scattering as intense as we seem to get.
                    Of course, but that would change the overall look. If the red was absorbed, then it won't penetrate too far into the material (but this is what you wanted in the first place... so it's a contradiction).

                    However, when it comes to skin\flesh, it doesn't absorb red as in these examples, it actually absorbs the other wavelengths more, thus producing a beige-to-red tinted scatter (depending on the depth), and the deeper it has been scattered, the redder it gets.
                    It also scatters some wavelengths; the ratio of the scattered light to the absorbed light gives the material its look. However this relationship is not intuitive and is highly non-linear.

                    We just need a better interface, where the colour is defined as the result\goal, and the shader does the required maths to work out the "wavelengths" and such.
                    It is what I said before - you don't need a physical shader. You need a shader that you can understand, control and more or less looks like what you need. I'm pretty much convinced that a physical shader with these properties does not exist, simply because the maths poses limits on what is possible (at least, not an isotropic sss shader; a layered model could be more successful, but perhaps even harder to control). If I give you a way to control the color of the small details and make them pink for example, this would change the other parts of the material and make its overall appearance different.

                    The two-layer approach is much more artist-friendly and probably the best we can hope for now. Plus, skin is not really homogenous, so trying to mimic it using a single sss material is not a very good approximation to begin with.

                    Best regards,
                    Vlado
                    Last edited by vlado; 14-01-2013, 01:44 PM.
                    I only act like I know everything, Rogers.

                    Comment


                    • #70
                      Originally posted by trixian View Post
                      Your homogeneous example does not exhibit this behaviour. You can open it in photoshop and sample the colours. They look "cold" to the eye, but that is because of the contrasting redness elsewhere. All the colours I sampled had more red in them. The areas where the material is producing highlights (not just the inner sharpest parts, but also the areas around it), are also affected by the fact that the light source is "cold", slightly blue-ish (as seen on the background).
                      It is simply a matter of scale. Make the model small enough (which is essentially what you are doing when you increase the sss scatter radius in the V-Ray material - if the sphere was real-world size at this amount of scattering, it would have to be a couple of mm wide), and you'll get similar results - the material will gradually become more and more discolored and quite different from what it looks like at larger scales.

                      Best regards,
                      Vlado
                      Last edited by vlado; 14-01-2013, 01:33 PM.
                      I only act like I know everything, Rogers.

                      Comment


                      • #71
                        Originally posted by trixian View Post
                        Your homogeneous example does not exhibit this behaviour. You can open it in Photoshop and sample the colours. They look "cold" to the eye, but that is because of the contrasting redness elsewhere. All the colours I sampled had more red in them than green or blue. The areas where the material is producing highlights (not just the inner sharpest parts, but also the areas around it), are also affected by the fact that the light source is "cold", slightly blue-ish (as seen on the background). Try Adjusting the white balance first by getting the paper more neutral.

                        Just wanted to point out that this does not support the logic.
                        I think you are mistaken - just color sampling areas looking for green doesn't accurately capture the effect that is occurring, because it's not so much that a green color is being produced, but that there is a shift towards green. If you sample the image I provided earlier with the SSS2 shading you will be hard pressed to find an actual green color as well - most of the green is just a perceptual result of the shift. Granted, there is some actual green along the edges, but it's a different object with different lighting etc. I think if you looked hard enough you could find an example in real life of a homogenous scattering material producing an actual green color (as opposed to merely a shift) from a red absorbing scattering volume.

                        Comment


                        • #72
                          Originally posted by adamlewis View Post
                          I had no idea it was possible to layer sss2 materials in the way you describe, mostly because I just assumed the vrayblendmtl could only blend surface changes as opposed to changes within a volume. If that's the case then that it would certainly add a lot of control and presumably allow us to achieve very realistic skin and other heterogeneous materials. Are there any limitations to this approach?
                          There are no limitations; in addition if you give the two sub-materials the same "prepass ID" they will be able to share the same illumination map, so the calculations will be shared to an extent.

                          The setup is a bit cumbersome though; what I'm thinking is that we can probably build this into the sss2 shader itself, so that you get two sss layers to play with.

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

                          Comment


                          • #73
                            As for the putty clay image, how is it a shift towards green as opposed that actually being the "surface colour", and the rest is actually shifted towards red instead?
                            I still think the glossy highlights from the light are skewing your perception of it as well as the images white balance.
                            Signing out,
                            Christian

                            Comment


                            • #74
                              If combining them (2 sss2 shaders) under the hood is possible, and as you explain, let them "share" the calculation, then this would be great. But you'll need to rearrange the ui to reflect the new approach I guess.
                              Signing out,
                              Christian

                              Comment


                              • #75
                                Excellent!
                                MDI Digital
                                moonjam

                                Comment

                                Working...
                                X