Announcement

Collapse
No announcement yet.

Glass shows BG even when other objects are behind the glass

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

  • Glass shows BG even when other objects are behind the glass

    I don't know if it's a bug or something that I do wrong but I have a scene where the glass shows the BG color even when objects are behind the glass blocking any background.

    To see what I mean, please check the 2 screenshots below. The one where you see the chrome headlight reflector is where I've hidden the glass. The other one is with the glass visible. As you can see, when the glass is visible you can't see the chrome behind, just the bg color (which is white in this case).

    Click image for larger version

Name:	car no headlight glass.jpg
Views:	1
Size:	110.5 KB
ID:	883284 Click image for larger version

Name:	car and headlight glass.jpg
Views:	1
Size:	113.8 KB
ID:	883285

    Here is also a screenshot of the render setup:

    Click image for larger version

Name:	render setup.jpg
Views:	1
Size:	384.1 KB
ID:	883286
    Aleksandar Mitov
    www.renarvisuals.com
    office@renarvisuals.com

    3ds Max 2023.2.2 + Vray 7 Hotfix 1
    AMD Ryzen 9 9950X 16-core
    96GB DDR5
    GeForce RTX 3090 24GB + GPU Driver 566.14

  • #2
    Isn't that reflection on the glass?
    Guido.

    Comment


    • #3
      1) Does the headlight glass have thickness? Can you show the materials settings for the glass?
      2) Why do you override the refraction environment to white? What happens when you untick that?
      Kind Regards,
      Morne

      Comment


      • #4
        Originally posted by Morne View Post
        1) Does the headlight glass have thickness? Can you show the materials settings for the glass?
        2) Why do you override the refraction environment to white? What happens when you untick that?
        1) Yes, they do have thickness. Here's the material of the glass:

        Click image for larger version

Name:	headlight glass mat.jpg
Views:	1
Size:	129.4 KB
ID:	859448

        2) I override the refraction environment so that I can see white color behind the windows of the car to make it look like it's rendered in a studio. Otherwise, refractive parts show the HDRI image which is not what I want. When I disable the override, the headlights render as they should but then I don't get the effect that I want for the windows.
        Aleksandar Mitov
        www.renarvisuals.com
        office@renarvisuals.com

        3ds Max 2023.2.2 + Vray 7 Hotfix 1
        AMD Ryzen 9 9950X 16-core
        96GB DDR5
        GeForce RTX 3090 24GB + GPU Driver 566.14

        Comment


        • #5
          Hello, Alex_M

          It appears this is the expected behavior. The reflector behind the glass of the headlight will "see" through the glass only what the glass perceives.
          So, I suggest the following workaround:
          Create a Dome VRayLight and use for it the same map that is in your reflection environment. Set the light to be Invisible and set its Exclude list mode to Include and then add the glass geometry from the headlights to it. This way the dome will bee refracted only through that glass geometry which should work alright in this particular case. How about this?

          Regards,
          Margarita
          Margarita Stoeva | chaos.com
          Chaos QA (V-Ray for 3ds Max)

          Comment


          • #6
            Hm, one more thing... in fact, perhaps with this invisible light you could even just disable your reflection/refraction environment, clear the exclude list from the dome light (and set it back to exclude mode), and so get what you want in a simple way.
            Margarita Stoeva | chaos.com
            Chaos QA (V-Ray for 3ds Max)

            Comment


            • #7
              Thanks for the reply and workaround, Margarita. However, I don't understand why this is an expected behavior as you put it. In the real world, the chrome reflector, which is a solid nontransparent object, will be blocking whatever is behind it. So no BG color should be visible anywhere in the headlight area. I'm really perplexed as to why this happens.
              Aleksandar Mitov
              www.renarvisuals.com
              office@renarvisuals.com

              3ds Max 2023.2.2 + Vray 7 Hotfix 1
              AMD Ryzen 9 9950X 16-core
              96GB DDR5
              GeForce RTX 3090 24GB + GPU Driver 566.14

              Comment


              • #8
                I think it's because the glass refractions are calculated before the reflections of it on other geometry.
                Margarita Stoeva | chaos.com
                Chaos QA (V-Ray for 3ds Max)

                Comment


                • #9
                  Thanks for the reply but I'm still confused. What do reflections and refractions have to do with the fact that solid objects allow the background through them? I expect solid objects to block whatever is behind them, correct? That's how the real world works. If I put my hand before my eyes I don't see through it.
                  Aleksandar Mitov
                  www.renarvisuals.com
                  office@renarvisuals.com

                  3ds Max 2023.2.2 + Vray 7 Hotfix 1
                  AMD Ryzen 9 9950X 16-core
                  96GB DDR5
                  GeForce RTX 3090 24GB + GPU Driver 566.14

                  Comment


                  • #10
                    I apologize that I skipped the details. The gray you see in your headlights is not the background behind the car but the reflection of the refracted environment through the glass, isn't it?

                    Best regards,
                    Margarita
                    Last edited by Margarita.Stoeva; 06-01-2016, 06:48 AM.
                    Margarita Stoeva | chaos.com
                    Chaos QA (V-Ray for 3ds Max)

                    Comment


                    • #11
                      Originally posted by Margarita.Stoeva View Post
                      I apologize that I skipped the details. The gray you see in your headlights is not the background behind the car but the reflection of the refracted environment through the glass, isn't it?

                      Best regards,
                      Margarita
                      Do you mean the reflection of the environment? If that's what you mean, then no, the grey color is not coming from the reflection of the environment. I'm 100% sure it comes from the background. I've made a new example that I hope is more clear (please see below). I've made the background green so that it's more visible and I've added a chrome ball on the bonnet and a stripe of glass in front of it. As you can see, there's something strange happening with the glass. It shows the background where the chrome ball reflects only background. Where the ball reflects the car, no BG color is visible. Shouldn't the glass show the whole chrome ball behind it? I expect that the whole ball is visible behind the glass.

                      I forgot to mention that no object properties were changed on any objects (visible in reflections, visible in refraction etc..).

                      Click image for larger version

Name:	refraction problem.jpg
Views:	1
Size:	114.7 KB
ID:	859466
                      Last edited by Alex_M; 06-01-2016, 08:32 AM.
                      Aleksandar Mitov
                      www.renarvisuals.com
                      office@renarvisuals.com

                      3ds Max 2023.2.2 + Vray 7 Hotfix 1
                      AMD Ryzen 9 9950X 16-core
                      96GB DDR5
                      GeForce RTX 3090 24GB + GPU Driver 566.14

                      Comment


                      • #12
                        If you use the same color for background and refraction environment its a little confusing at first sight. Let's change one of the two colors and see what happens. See the attached images below.

                        Click image for larger version

Name:	step1.jpg
Views:	1
Size:	216.3 KB
ID:	859472

                        Click image for larger version

Name:	step2.jpg
Views:	1
Size:	216.5 KB
ID:	859473

                        Click image for larger version

Name:	step3.jpg
Views:	1
Size:	208.1 KB
ID:	859474

                        So, what happens is the glass is reflected green in the ball. Also, the environment that is reflected in the ball but seen trough the glass is overridden by the refraction environment which is a little unexpected, but it is by design. There is another setting that can control the reflection of the environment through refraction in this case. See the next image below.

                        Click image for larger version

Name:	step4.jpg
Views:	1
Size:	408.6 KB
ID:	859470

                        What I've done is simply place the reflection environment map in the Environment slot of the material for the ball.
                        And for the green color to disappear from the reflection of the box (the glass geometry), I assign a VRayOverrideMtl to the geometry that uses the glass material. I keep the glass material as base and use a copy of it as Reflection material (it controls its appearance in reflections) with that same map that we have for environment reflection in its Environment slot.

                        Click image for larger version

Name:	step5.jpg
Views:	1
Size:	469.9 KB
ID:	859471

                        This would be the setup with overrides. I'd use the dome light instead.

                        Cheers!
                        Margarita Stoeva | chaos.com
                        Chaos QA (V-Ray for 3ds Max)

                        Comment


                        • #13
                          Thanks a lot for the detailed example and explanation. I changed to using Dome light instead of the environment slots as you suggested. Now everything works as I expect.
                          Aleksandar Mitov
                          www.renarvisuals.com
                          office@renarvisuals.com

                          3ds Max 2023.2.2 + Vray 7 Hotfix 1
                          AMD Ryzen 9 9950X 16-core
                          96GB DDR5
                          GeForce RTX 3090 24GB + GPU Driver 566.14

                          Comment

                          Working...
                          X