Announcement

Collapse
No announcement yet.

Subpixel Mapping...Maps to which value?

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

  • Subpixel Mapping...Maps to which value?

    Hi everyone,

    quick question: To which value does Subpixel Mapping clamp the intensity of primary rays? What dictates this value?
    Also, does the "Clamp Output" with its "Clamp value" have any connection to subpixel mapping? Say for instance, the Clamp level is set to 2.0. Does that cause Subpixel mapping to clamp primary rays to 2.0?

    Thanks a lot!

  • #2
    Hey Capture,

    I found this information over on CGtalk.com a while back

    "http://forums.cgsociety.org/showthread.php?t=770399"

    In all cases, V-Ray calculates everything in floating point. However, setting the "subpixel mapping" option to on alters the way V-Ray calculates the image samples. When this option is on, any clamping (and color mapping in general) is done before the final pixel values are calculated. Otherwise, it is done after the final pixels are computed.

    To demonstrate how this can affect the final image, imagine that you have 2 sub-samples in one pixel, one has a value of 0.5, and the other - 3.5 (for example, because of a HDR image). Further on, imagine you have the "clamp output" option enabled in the V-Ray Color mapping rollout (this is as an example, the effect will be similar if you don't clamp the colors, but use a color mapping mode that does so implicitly, e.g. the "Exponential" color mapping mode).

    1) If "sub-pixel mapping" is off, your result will be the average of the two colors, or (0.5+3.5)/2=2.0, then clamping is applied to give you the final pixel value of 1.0 (pure white).

    2) If "sub-pixel mapping" is on, first the sub-pixel values will be clamped, and then they will be averaged together. So your final result will be (0.5+1.0)/2=0.75 (light grey)

    So as you see this option really has the potential to alter the final image brightness.When working with HDR values, it is typically best to keep it off, so as to get a correct result.

    [Sorry for all the numbers, I don't know how to explain this otherwise.]

    Best regards,
    Vlado
    Followed up by this...

    ah ok thanks,

    when i render in 32 Bit Floating Point and i want later the exposure in Combustion. My Question, when "sub-pixel mapping" is on, have i am the hole 32Bit Range from the Rendering in Combustion or not?

    mfg
    hot chip
    Yes, you still have all the range available (unless you specifically also enabled the "Clamp output" option).

    Best regards,
    Vlado
    I don't think Clamping has any relation to sub-pixel mapping, I could be wrong, but found the above thread useful
    Ashton Woolley
    Senior CGI Generalist

    ASHTONWOOLLEY.COM

    Comment


    • #3
      Ashton, thanks for your reply. I know this posting by vlado over at CGTalk. However, in his little sample calculation with subpixel mapping ON, he clamped intensities of primary rays to 1. I am now unsure if subpixel mapping always clamps to 1.0 and if so, why?

      Comment


      • #4
        no it does not clamp. it merely -potentially- changes the brightness values of the final pixel. his example showed how using sub pixel mapping, with a clamp specifically, leads to a different end result. however any type of colour mapping applied can give a different result when used with subpixel mapping. the subpixel mapping doesnt apply any colour mapping in and of itself, merely changes the behaviour of the colour mapping you use.

        Comment


        • #5
          Based on the article Demistyfing DMC

          "Difference between using subpixel mapping and not using it is that with subpixel on, every eye sample that render takes, when sampling pixel, will be tonemapped first and then averaged with next samples if VRay is oversampling that pixel. When subpixel is off all the samples will be taken and averaged first and then when you get final pixel color VRay will apply tonemaping. This process is shown in next image."
          My understanding of this is - nothing is actually clamped at all - You still have the full range all that is taking place is an averaging of pixels based on sampling - The difference being that with Sub Pixel mapping ON - Tone-mapping will occur, and then your pixels will be averaged producing less of a highlight. ( Less time to work out the intensity value ) Opposed to figuring out and averaging a pixel to find out its brightness, and then applying a tonemap. ( Which why you sometimes get artifacts as they are quite blown out)

          Clamping then on top of that simply tells the image as a whole / every individual pixel to not read a OVER the VALUE set.

          I think this is correct if anyone can share information it would great.
          Ashton Woolley
          Senior CGI Generalist

          ASHTONWOOLLEY.COM

          Comment


          • #6
            Thank you all! I think I got it now. Would be great if vlado could verify your statements.

            So if I were to set my Color Mapping settings "Linear Multiply", "Dark multiplier" and "Bright multiplier" to 1.0 and Gamma to 2.2, enabling Subpixel Mapping wouldn't make any difference as compared to disabling it, because no color mapping is taking place?

            Comment


            • #7
              Originally posted by CAPTURE_MM View Post
              Thank you all! I think I got it now. Would be great if vlado could verify your statements.

              So if I were to set my Color Mapping settings "Linear Multiply", "Dark multiplier" and "Bright multiplier" to 1.0 and Gamma to 2.2, enabling Subpixel Mapping wouldn't make any difference as compared to disabling it, because no color mapping is taking place?
              There is definitely a difference with it on or off regardless of what your colour mapping settings are, I don't exactly know how it tone maps before it samples, but I don't think it is based on any setting in color mapping.

              I do know that with it on, whilst it reduces the brightness of your highlights the render times are cut as the sampling is reduced. With it off it spends time sampling bright pixels to the full range and gives you brighter and truer highlights - with higher render times.

              Best thing to do is get a scene and test it out and check the value of pixels!

              On or off still gives you 32 bit range - But I think with it Off it will give you even more range as it has spent more time sampling.

              How it actually works on the back end, I have no idea. Maybe Valdo can explain.
              Ashton Woolley
              Senior CGI Generalist

              ASHTONWOOLLEY.COM

              Comment


              • #8
                You got it right Ashton in all of your statements. The Sub-pixel mapping option simply force V-Ray to apply any clamping and color mapping on a sub-pixel level meaning on the samples inside the pixel, instead of the pixel color. Which reduces the brightens in some cases (as Valdo explained) and it might reduce render time as well since there are less highlights.
                Zdravko Keremidchiev | chaos.com
                Chaos Support Representative | contact us

                Comment


                • #9
                  Originally posted by Zdravko.Keremidchiev View Post
                  You got it right Ashton in all of your statements. The Sub-pixel mapping option simply force V-Ray to apply any clamping and color mapping on a sub-pixel level meaning on the samples inside the pixel, instead of the pixel color. Which reduces the brightens in some cases (as Valdo explained) and it might reduce render time as well since there are less highlights.
                  So just to clarify:

                  With sub-pixel sampling ON each sample is clamped (and color mapped) and THEN combined, correct? (if clamping is on)

                  With sub-pixel sampling OFF the samples are combined and then clamped (if clamping is on)

                  ?? Is that right??

                  Sub-pixel sampling produces less realistic results (especially light bleeding around edges), but it can save your butt if you have flickering sharp,pinpoint reflections/specular highlights.

                  Max Ray Intensity always clamps the subpixels and can also help with the flickering reflections.

                  Comment


                  • #10
                    Yes, that is correct.
                    Note that Max ray intensity will only clamp the secondary rays like GI, reflection and refraction, not the final image samples.
                    Max ray intensity - this option allows the user to suppress the contribution of very bright rays, which may typically cause excessive noise (fireflies) in the rendered image. Its effect is similar to the Subpixel mapping + Clamp output options of the Color mapping section, but the Max ray intensity is applied to all secondary (GI/reflection/refraction) rays, as opposed to the final image samples. This allows fireflies to be effectively suppressed but without losing too much HDR information in the final image. Similar to the Subpixel mapping option, the Max ray intensity introduces bias in the rendered image, as it may turn out to be darker than the actual correct result.
                    Zdravko Keremidchiev | chaos.com
                    Chaos Support Representative | contact us

                    Comment


                    • #11
                      Originally posted by Zdravko.Keremidchiev View Post
                      You got it right Ashton in all of your statements. The Sub-pixel mapping option simply force V-Ray to apply any clamping and color mapping on a sub-pixel level meaning on the samples inside the pixel, instead of the pixel color. Which reduces the brightens in some cases (as Valdo explained) and it might reduce render time as well since there are less highlights.
                      Ok, so Subpixel Mapping does indeed clamp values if I understood you correctly. Now is the question what dictates this clamp value? The "Clamp Output" with its "Clamp Value"?

                      What confuses me is that even with my aforementioned Color mapping settings ("Linear Multiply" etc., i.e. NO Color Mapping, just linear pixel values), an image rendered with subpixel Mapping ON and OFF looks different. So if it's not the Color Mapper which dictates the clamp/mapped value, what is it?

                      Comment


                      • #12
                        Sorry to ask again, but can someone say with certainty what dicatates the value that Subpixel Mapping clamps/maps primary rays to? The Color Mapping Operator (Reinhard, Exponential etc.)? The Clamp Output value?

                        Thanks!

                        Comment


                        • #13
                          Originally posted by CAPTURE_MM View Post
                          Sorry to ask again, but can someone say with certainty what dicatates the value that Subpixel Mapping clamps/maps primary rays to? The Color Mapping Operator (Reinhard, Exponential etc.)? The Clamp Output value?

                          Thanks!
                          Please Valdo correct me if I am wrong.

                          I think you have a miss understanding of what "Linear multiply" is actually doing, so it's confusing you.



                          "Linear multiply" Is indeed a tone map. - If you think about the Curves in Photoshop - This is what Color Mapping in Vray does. Its just that when the color mapping in V-ray is set to "Linear multiply" there is no change to the curve, so it doesn't change the final images colors, but it still apples a Linear Curve Colour Space to the image, that gives you the best results when composting so that you can put your own color mapping AKA LUT such as "SRGB" "REC709" Or essentially Tweaking that Curve.

                          When Vray applies "Linear multiply" it does what it is saying what is says in the manual.


                          V-Ray 1.5Linear multiply - this mode will simply multiply the final image colors based on their brightness are. Color components that are too bright (above 1.0 or 255) will be clipped. This can result in burnt out spots near bright light sources."


                          Which changed to as values can now be in 32 bit exr which no longer adhere to 1.0 - 255 but from -infinite to +infinite

                          V-Ray 3 Linear multiply - this mode will simply multiply the final image colors based on their brightness without applying any changes.


                          So it is still applying a color map, One that "will simply multiply the final image colors based on their brightness""

                          With out a color map the Raw Render wouldn't be in a color space and we couldn't see it (Could be wrong), "Linear Multiply" Whilst still is a color map, is applied but with a linear curve from 0 - 255 Or -infinite +infinite but in a straight line from both values (Linear) and is giving you the best interpretation of an untouched or as people say "Un-tone mapped image" Yet it is still applying a linear curve so we can see it in a color space, it is just a "Linear Color Space"

                          So essentially what Sub-Pixel Mapping is doing is this:

                          When ON - It is applying "Linear Multiply" a linear color space, and then doing all the computing and averaging of pixels. ( Why the pixels are not as bright as they have been multiplied and then averaged )

                          When OFF - V-ray is doing its thing with rays and samples with no graphical representation and it will average pixels based of what is it doing and THEN it will apply "Linear Multiply" essentially brightening those pixels in a Linear colour space we can see. ( Why the pixels are brighter as they have been calculated to the highest possible value then averaged and then multiplied with "Linear Multiply" )

                          From what I read, this is my interpretation of what is happening, once again I could be 100% wrong and if so please correct me or remove this post as I don't want to give miss leading information.
                          Last edited by AshtonWoolley; 17-03-2015, 03:29 AM.
                          Ashton Woolley
                          Senior CGI Generalist

                          ASHTONWOOLLEY.COM

                          Comment


                          • #14
                            Thanks Ashton for your long response. I guess I already understood what Linear Multiply does. It just takes the raw rendered pixel values and leaves them unchanged (because it's applying a linear curve).

                            I also understand that Subpixel Mapping maps individual samples and not pixel values. But I still don't understand to which value these individual samples are mapped.

                            As an example: We have our Color Mapping set to:

                            "Linear Multiply"
                            "Dark multiplier" and "Bright Multiplier" 1.0
                            "Gamma" 2.2
                            "Subpixel Mapping" ON.

                            Vray then shoots rays into the scene. Now let's assume in a pixel one sample ray returns a value of 3.0 and another sample ray a value of 5.0. Before combining and averaging takes place, Subpixel Mapping kicks in and maps the sample rays. To which value will 3.0 and 5.0 be mapped/clamped and why?

                            I hope this makes it clearer Thanks for all input!

                            Comment


                            • #15
                              Originally posted by CAPTURE_MM View Post
                              Thanks Ashton for your long response. I guess I already understood what Linear Multiply does. It just takes the raw rendered pixel values and leaves them unchanged (because it's applying a linear curve).

                              I also understand that Subpixel Mapping maps individual samples and not pixel values. But I still don't understand to which value these individual samples are mapped.

                              As an example: We have our Color Mapping set to:

                              "Linear Multiply"
                              "Dark multiplier" and "Bright Multiplier" 1.0
                              "Gamma" 2.2
                              "Subpixel Mapping" ON.

                              Vray then shoots rays into the scene. Now let's assume in a pixel one sample ray returns a value of 3.0 and another sample ray a value of 5.0. Before combining and averaging takes place, Subpixel Mapping kicks in and maps the sample rays. To which value will 3.0 and 5.0 be mapped/clamped and why?

                              I hope this makes it clearer Thanks for all input!
                              Please Refer, and read this: http://interstation3d.com/tutorials/...yfing_dmc.html
                              This can't make it any clear, note what is highlighted in RED.~

                              Ashton Woolley
                              Senior CGI Generalist

                              ASHTONWOOLLEY.COM

                              Comment

                              Working...
                              X