Announcement

Collapse
No announcement yet.

Workaround for bump maps losing detail

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

  • Workaround for bump maps losing detail

    NOTE: This is a re-post of some info I discussed on the skype channel so it won't get lost. It's a little unorganized

    Currently, there is an issue with bumps losing detail. It looks like a loss of precision on small values or clipping issue, but I'm not sure. I've come up with a workaround/hack, which may be helpful to others.


    WORKAROUND:

    What I do is multiply the material bump amplitude by 10 or 100 (eg. if it was 1mm bump, I set to 10mm or 100mm). I then set my texture's "High" value to 10 or 100 times smaller (so 10% or 1%). This should make the bump height look the same as before, but the details won't get lost.

    If your bump is a procedural texture, you can add a constant layer above it in the shader tree, with value set to 10%, and blend mode = multiply


    EXAMPLE:

    This example was a test I posted in the skype chat, with v-ray noise plugged into a triplanar.

    LEFT image: On the left you can see the problem I'm talking about. The vray material has bump amplitude set to 1mm. There should be an even bump all over the surface, but instead some parts (eg. near the middle specular highlight), are losing lots of detail, so you get "bald spots"

    RIGHT image: On the right I'm using the workaround. Since it's a procedural, I added a constant layer, effect = bump, value = 10%, blend mode = multiply. Then I set the bump amplitude to 10mm. The bump looks a little strong in this image, but you can see its even everywhere. No bald spots

    Click image for larger version  Name:	vray_bump_bug_001.png Views:	1 Size:	430.6 KB ID:	958464


    RIGHT image: Here is another test using lower values in the texture. You can see the details don't get lost. There are no uneven bald spots anywhere

    Click image for larger version  Name:	vray_bump_bug_002.png Views:	1 Size:	330.9 KB ID:	958465
    Last edited by 1funk; 30-06-2017, 01:57 PM.
    Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

  • #2
    I really hope to see this problem fixed in the future. It's kind of a serious issue for a renderer.
    Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
    I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

    Comment


    • #3
      I'd also like to clarify, you can really use any method to make your texture values smaller (lower texture high value, multiply by a constant layer, color correct, maybe opacity etc)

      The trick is, use a high material bump amplitude, and lower your bump texture instead some other way, to control it's height.
      Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
      I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

      Comment


      • #4
        Thanks!
        Very helpful
        Muhammed Hamed
        V-Ray GPU product specialist


        chaos.com

        Comment


        • #5
          The bump mapping issue should be fixed in tomorrow's nightly build ( 2017.07.14 ).
          It happened mostly when objects are relatively small (less than around 20cm) or the render resolution is very large (4K and up)).
          This also fixes the same issue with displacement mapping since it uses the same bump mapping calculations to compute the normals of the displaced surface.
          The fix is for both the CPU and the GPU renderer.

          Thank you, John for posting the work around, it actually helped in figuring out the fix for the bug.

          Greetings,
          Vladimir Nedev
          Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

          Comment


          • #6
            Thanks Vladimir
            Win10 Pro 64 / AMD Ryzen 9 5950X / 128GB / RTX 3090 + 1080 Ti / MODO
            I am the resurrection, and the life: he that believeth in me, though he were dead, yet shall he live - Jesus Christ

            Comment


            • #7
              Originally posted by vladimir.nedev View Post
              The bump mapping issue should be fixed in tomorrow's nightly build ( 2017.07.14 ).
              It happened mostly when objects are relatively small (less than around 20cm) or the render resolution is very large (4K and up)).
              This also fixes the same issue with displacement mapping since it uses the same bump mapping calculations to compute the normals of the displaced surface.
              The fix is for both the CPU and the GPU renderer.

              Thank you, John for posting the work around, it actually helped in figuring out the fix for the bug.

              Greetings,
              Vladimir Nedev

              Maybe thats related to the issues I kept bothering you about. Where at 2k res on a earpad (relatively small) then going to 4k the bump lost pretty much all detail or vice versa.

              -Seth

              Comment


              • #8
                Originally posted by vandigital View Post

                Maybe thats related to the issues I kept bothering you about. Where at 2k res on a earpad (relatively small) then going to 4k the bump lost pretty much all detail or vice versa.

                -Seth

                I think we talked about several issues
                1. bump disappearing and you having to set the bump map opacity to 2% to fix it, this is the issue that is now fixed
                2. the apparent glossiness of the material changing as you change the resolution

                For 2. I have a scene from you, the Grant Warwick shader ball with a fine bump on it.
                I am not seeing any changes to how it renders at 2K or 4K after the fix.
                The bump is more detailed at 4K (which I think is expected), but if you compare the two images zoomed out, the glossiness of the material does look changed.

                Greetings,
                Vladimir Nedev
                Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                Comment


                • #9
                  I'm wondering if this bug might have returned in V-Ray 4, seems like the bumps are disappearing at small scale again?

                  Comment


                  • #10
                    Hey,

                    Thank you for the question, Can you share the scene file, screenshot?

                    Cheers,
                    Boyan Nalchadjiiski | QA Engineer @ Chaos |
                    E-mail: boyan.nalchadjiiski@chaos.com

                    Comment


                    • #11
                      Ok, I think I figured out what's happening. It's only a problem in the V-Ray 4 Preview render (I think!) and it happens when you shift-scroll to zoom in on a material that is far from the camera. The bump seems to render ok in the final render.

                      First image is a screengrab of V-Ray 4 Preview where the object is close to camera:

                      Click image for larger version

Name:	vray4_preview_close.jpg
Views:	820
Size:	122.8 KB
ID:	1040444


                      Second image is an object far from camera with V-Ray 4 Preview shift-scroll zoomed in on the material. Procedural micro bump has vanished:

                      Click image for larger version

Name:	vray4_preview_far_zoomed.jpg
Views:	803
Size:	64.1 KB
ID:	1040445

                      Third image is V-Ray 3.7 Preview where the object is close to camera:

                      Click image for larger version

Name:	vray3_7_preview_close.jpg
Views:	788
Size:	78.5 KB
ID:	1040446

                      Fourth image is an object far from camera with V-Ray 3.7 Preview shift-scroll zoomed in on the material. Procedural micro bump is still visible:

                      Click image for larger version

Name:	vray3_7_preview_far_zoomed.jpg
Views:	793
Size:	48.3 KB
ID:	1040447

                      I've also attached the test scenes.
                      Attached Files

                      Comment


                      • #12
                        Originally posted by YabbieSandwich View Post
                        I'm wondering if this bug might have returned in V-Ray 4, seems like the bumps are disappearing at small scale again?
                        I don't think we have resolved this issue in either 3.7 or 4.x.

                        Ok, I think I figured out what's happening. It's only a problem in the V-Ray 4 Preview render (I think!) and it happens when you shift-scroll to zoom in on a material that is far from the camera. The bump seems to render ok in the final render.
                        Yes, the enhanced region will do this. It should be the same in 3.7 and 4.12, you can see the bump starting to be less sharp in the 3.7 image as well.
                        So, if you zoomed in on a region with size 1x1 pixel, blowing it up to 400x400 pixels, the texture will be filtered as if it still has 1x1 pixel size.
                        So, it will get very blurry.
                        I will log an issue to try and improve it.

                        Greetings,
                        Vladimir Nedev
                        Vantage developer, e-mail: vladimir.nedev@chaos.com , for licensing problems please contact : chaos.com/help

                        Comment


                        • #13
                          Originally posted by vladimir.nedev View Post
                          So, if you zoomed in on a region with size 1x1 pixel, blowing it up to 400x400 pixels, the texture will be filtered as if it still has 1x1 pixel size.
                          So, it will get very blurry.
                          It's weird how it works, like there's a threshold below which the texture suddenly blurs out. For example, a bercon noise at 5mm size appears ok but as soon as you go smaller than 5mm it suddenly vanishes, there's no gradual blurring as it gets smaller (this is an arbitrary example, I guess it depends on texture locator size vs the size of the texture in the viewport, etc. as to what point it blurs out)

                          Comment


                          • #14
                            I've noticed now that this is not just happening in the Preview render but also in final renders...

                            Click image for larger version

Name:	microbump_problem_vray4_vs_vray3_7.jpg
Views:	689
Size:	251.7 KB
ID:	1042887

                            Comment

                            Working...
                            X