Announcement

Collapse
No announcement yet.

Window transparency in png

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

  • Window transparency in png

    Hello there!

    I'm having trouble with rendering PNG images of interior scenes. Whenever there's a window glass material, vray saves the background through the window instead of transparency.
    In older Vray versions this was never an issue...

    Thing is, I have to be able to put in a background in Photoshop. The reflections on the window should still be visible in the png, like they used to be before. So when you add a background in photoshop it really looks like it's behind a window.

    I have recreated the issue with a simple model. I'm using the Vray Window Glass neutral vismat.(I tried others, same problem) The glass has a thickness (otherwise the outside or the reflections get distorted). I've tried the renders with glass as a simple plane as well, but that creates the same issue in saving the background through the window material.

    In my testmodel you can see I have simple opening, on the left side there's glass, on the right side it's just open. The open space renders transparant, the glass space doesnt...

    Can anyone help me out?

    Many thanks!
    Sincere greetings,
    Sigrid

  • #2
    Hi Sigrid!

    You have to change the Affect Channels parameter from the Reflection and the Refraction sections of your Glass material. By default they're set to Color Only. The two other modes - Color + Alpha and All channels will provide different material behavior and you'll achieve what you want. Switch to Advanced Settings to find them in the Material Editor.

    Keep in mind that there are different work scenarios, so all option types are meaningful. It depends on what you want to create.

    Let the light in!


    Best regards,
    Tsvetomira
    Last edited by tsvetomira.girginova; 02-06-2020, 01:48 AM.
    Tsvetomira Girginova | chaos.com
    3D Support (AEC,HOU,C4D) Team Lead | contact us

    Comment


    • #3
      Hi!

      Thanks for the quick response!
      It partly solved the issue... But now another one is appearing...

      All things that are behind the window disappear in the PNG-file. In the Frame Buffer I can see them, but in the saved image they're gone.

      I recreated the situation in a very simple model again (my project is an appartment with a deck etc, so I want the plants and the deck decorations to be visible through the window, but the areas where there's sky should be transparent).
      In my simple model I now have window glass material in the big opening, tempered glass on the small rectangle (representing a glass panel inside) and a part where there's a wall visible outside.
      The yellowy floor is outside, but as you can see, it disappears on the final image, along with the wall.

      I have tried the different settings for saving alpha, I used "include alpha". Using seperate alpha maps is not really workable in my project.

      Many thanks!

      Sincere greetings,

      Sigrid

      Comment


      • #4
        Hi sigrid,

        The background information in the final image has not disappeared - it's still there.
        The actual issue is in the image viewer that you're using.
        Both Photoshop and the default image viewer in Windows show transparency instead of an alpha channel by default.

        In Photoshop you can do the following to get the result you're after:
        - Open the PNG
        - Go to 'Layers/Layer Mask/...' and click on 'From Transparency'
        - This will make the layer opaque and there will be a mask attached to it
        - Disable the mask to see the background

        Click image for larger version  Name:	layerMask01.JPG Views:	23 Size:	46.0 KB ID:	1073082

        As an alternative - you can save out tiff images.
        Photoshop will ask how you want the alpha to be loaded when you Open the file.

        Hope that helps,
        Konstantin
        Last edited by konstantin_chaos; 03-06-2020, 07:17 AM.

        Comment


        • #5
          I'd also recommend you render against a black background if you intend to swap the background in post.
          This will avoid issues with aliasing and background premultiplication.
          Note that replacing the background behind a transparent object will never work perfectly - the refraction distortion will be lost.

          Comment


          • #6
            Hello Konstantin!

            Thanks, the photoshop trick worked!

            After trial-and-error on the previous tip by Tsvetomira I was able to make a glass setting that allows the items behind the window to be visible yet the sky to be transparent.

            Normally I don't use this workflow but in this case the client wants me to implement the exact views they have from the appartment but we're unable to take a panoramic picture to put in vray as a background.

            Many thanks for your great help!!!

            Comment


            • #7
              Hi! I'm working with V-ray 6 in Sketchup 2022 and I have the same issue of the non-existing background rendering in my .png file, but there's no longer an 'affect channel' option under material properties for reflection and refraction. Does anyone know how to fix this in the new version of Vray?

              Comment


              • #8
                Dear irene_gomez ​, hello.

                If you switch to Advanced Settings of the chosen material, are you able to see it?
                See the example here:
                Click image for larger version

Name:	image.png
Views:	1327
Size:	116.7 KB
ID:	1165199
                It is hidden when Basic Settings are shown.
                Maybe this is the reason for not seeing it.

                Waiting for your confirmation.

                Best regards,
                TS​
                Tsvetomira Girginova | chaos.com
                3D Support (AEC,HOU,C4D) Team Lead | contact us

                Comment


                • #9
                  Hi tsvetomira.girginova that did it! Thanks so much!​

                  Comment


                  • #10
                    You are welcome!
                    Contact us again if needed.
                    Tsvetomira Girginova | chaos.com
                    3D Support (AEC,HOU,C4D) Team Lead | contact us

                    Comment

                    Working...
                    X