Announcement

Collapse
No announcement yet.

Why is refraction alpha still broken???

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

  • Why is refraction alpha still broken???

    Years ago I pointed out that if you set refraction to Color+Alpha, it doesn't work properly. Alpha should work like the real world, it should work like it does in Photoshop, it should work like it does in all other composting programs. ALPHA IS ADDITIVE. If you have a tree in front of glass, the tree area would be white and the glass area would be black. And if you have a tree behind glass, it should work exactly the same way, the areas that are tree would be white and the glass area would be black. Yet V-ray does not do this. If you set your glass to Color+Alpha so you can composite behind it, it ignores anything behind it and renders it all black. This is absurd. PLEASE FIX, ITS BEEN YEARS.
    I'm doing a lot of window renders at current job and it's crazy that I can't get an alpha from anything behind glass. Even parts of the window frame that are behind glass don't show in Alpha. This is absurd.

  • #2
    https://forums.chaosgroup.com/forum/...432#post770432
    Alpha of a glass pane in front of an opaque object:
    Click image for larger version

Name:	alpha.png
Views:	499
Size:	5.1 KB
ID:	1103320
    MM of the same scene, with alpha set to affect all channels (sphere yellow, as its green plusses with the red of the glass):

    Click image for larger version

Name:	mm.png
Views:	487
Size:	5.3 KB
ID:	1103321
    Last edited by ^Lele^; 19-02-2021, 12:02 PM.
    Lele
    Trouble Stirrer in RnD @ Chaos
    ----------------------
    emanuele.lecchi@chaos.com

    Disclaimer:
    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

    Comment


    • #3
      Amazing. But glass has reflection. Turn on reflection and set reflection to All Channels so you can capture the reflection, just like you would in the real world. What happens to the alpha then?

      Comment


      • #4
        That is why you should use multimattes.
        Or better still, multimattes and custom passes so to extract precisely the masks you need.
        Or delve into LPEs, and be even more precise.

        This isn't opacity, for refraction an alpha is not a given.
        For size, Arnold returns pure white for refractive shaders. They can however affect AoVs, and they too have an equivalent to multimattes.
        Corona works identically to us, if with different UI and options' looks.

        Truly though, multimattes are the accepted way to go, since time immemorial.
        At least, i can't recall a movie or advert i worked on since 2008 which didn't have at least ten of those MM REs.
        Today, they'd probably have dozens of LPEs to pick the scene apart. And, likely, the multimattes would still be there.

        edit: as a side effect to multimattes, as soon as update 1 comes out (not long now.), you'll be able to mask and comp directly inside the VFB. You'll also be able to use cryptomatte, which is great for primary visibility, but multimattes will still be the best way to extract an antialiased mask through refraction.

        edit #2: To help with flexibility and ease of creation of passes, update 1 will also have a conditional override material, able to keep, f.e. only refraction across the scene.
        Last edited by ^Lele^; 19-02-2021, 05:47 PM.
        Lele
        Trouble Stirrer in RnD @ Chaos
        ----------------------
        emanuele.lecchi@chaos.com

        Disclaimer:
        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

        Comment


        • #5
          Non-glossy refraction should give an alpha. You should be able to comp a glass window without additional passes.

          Comment


          • #6
            Sadly, it would seem that raytracers these days cannot do that, because of various reasons.
            They all have tricks, but none does what you wish for.
            Unless, of course, you can point me to one which does, and i'd be glad to have been proven wrong.
            Lele
            Trouble Stirrer in RnD @ Chaos
            ----------------------
            emanuele.lecchi@chaos.com

            Disclaimer:
            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

            Comment


            • #7
              It works for opacity correct? So calculate the alpha as if it was opacity. Calculate the rest as refraction. FIXED. It's not that complex, where there's a will there's a way. The problem isn't "raytracers". Human ingenuity isn't limited by raytracers.
              And I don't think any of your matte hacks work. The glass would block any matte for an object behind it.
              So if you want to comp something behind glass you have to re-render without the glass and add that alpha to the one with glass. Having to do two renders to get a simple alpha is lame.

              Comment


              • #8
                Originally posted by catpower View Post
                And I don't think any of your matte hacks work. The glass would block any matte for an object behind it.
                So if you want to comp something behind glass you have to re-render without the glass and add that alpha to the one with glass. Having to do two renders to get a simple alpha is lame.
                You should set up a test scene and try this. The multimatte method does work, it's how I've done things for years.
                rather than an alpha, you can wrap the scene in a giant sphere that doesn't cast shadows/affect GI and link it to the camera position, set a multimatte on that.

                Comment


                • #9
                  Originally posted by catpower View Post
                  And I don't think any of your matte hacks work. The glass would block any matte for an object behind it.
                  So if you want to comp something behind glass you have to re-render without the glass and add that alpha to the one with glass. Having to do two renders to get a simple alpha is lame.
                  You clearly have no idea of what you are talking about. The workflow suggested by Lele works just fine, we used that technique for a few years now.

                  https://www.behance.net/Oliver_Kossatz

                  Comment


                  • #10
                    Did a couple quick tests with Multimatte, couldn't get it to work. Glass blocks it.

                    Comment


                    • #11
                      Originally posted by catpower View Post
                      Did a couple quick tests with Multimatte, couldn't get it to work. Glass blocks it.
                      You need to set the affect channels option in the refraction section of the glass shader to "all channels". It is working 100%.
                      https://www.behance.net/Oliver_Kossatz

                      Comment

                      Working...
                      X