Announcement

Collapse
No announcement yet.

Premultiplied Alpha

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

  • Premultiplied Alpha

    Premultiplied Alpha or not? I need to comp skies into some scenes, however, I always get severe halos, so I avoid doing it. What's best, Premultiplied Alpha or not?
    Bobby Parker
    www.bobby-parker.com
    e-mail: info@bobby-parker.com
    phone: 2188206812

    My current hardware setup:
    • Ryzen 9 5900x CPU
    • 128gb Vengeance RGB Pro RAM
    • NVIDIA GeForce RTX 4090
    • ​Windows 11 Pro

  • #2
    Have you tried the "remove white/black matte" in photoshop? Or Defringe? All found under "Layer/Matting".
    Check out my (rarely updated) blog @ http://macviz.blogspot.co.uk/

    www.robertslimbrick.com

    Cache nothing. Brute force everything.

    Comment


    • #3
      Yes, I tried everything, but the halo is awful. If I have a really light sky, it somewhat works.
      Originally posted by Macker View Post
      Have you tried the "remove white/black matte" in photoshop? Or Defringe? All found under "Layer/Matting".
      Bobby Parker
      www.bobby-parker.com
      e-mail: info@bobby-parker.com
      phone: 2188206812

      My current hardware setup:
      • Ryzen 9 5900x CPU
      • 128gb Vengeance RGB Pro RAM
      • NVIDIA GeForce RTX 4090
      • ​Windows 11 Pro

      Comment


      • #4
        I'm not entirely sure you'll get an enormous difference between straight and premultiplied alpha's?

        You could try selecting the sky (using the alpha) and simply expanding the selection by a pixel or two, and creating a new alpha from that selection, thus getting rid of the halo?
        Check out my (rarely updated) blog @ http://macviz.blogspot.co.uk/

        www.robertslimbrick.com

        Cache nothing. Brute force everything.

        Comment


        • #5
          If you use premultiplied be sure your background color is black. You may need to "Remove Black Matte" depending on what format you save as. This is applied to a layer with layer transparency (not a layer mask, but actual layer transparency).

          Note that any format that is not floating point will clip when compositing with certain transparent objects. The only proper way to avoid this is to comp in floating point space.

          Comment


          • #6
            If you want a clean comp then render against a black background. Save as .tga 32bits per pixel (this gives you your alpha) and set the 'Pre Multiplied' tick box to off.

            When you open it in PS you'll notice that the edges are very jagged, just cut the image out using the alpha and it'll be perfect with no halos, even with semi transparent objects.
            Garry Clarke
            Technical Illustrator
            www.garryclarke.com

            Comment


            • #7
              Originally posted by Garryclarke View Post
              If you want a clean comp then render against a black background. Save as .tga 32bits per pixel (this gives you your alpha) and set the 'Pre Multiplied' tick box to off. When you open it in PS you'll notice that the edges are very jagged, just cut the image out using the alpha and it'll be perfect with no halos, even with semi transparent objects.
              I'll try it, thanks.
              Bobby Parker
              www.bobby-parker.com
              e-mail: info@bobby-parker.com
              phone: 2188206812

              My current hardware setup:
              • Ryzen 9 5900x CPU
              • 128gb Vengeance RGB Pro RAM
              • NVIDIA GeForce RTX 4090
              • ​Windows 11 Pro

              Comment


              • #8
                Originally posted by Garryclarke View Post
                If you want a clean comp then render against a black background. Save as .tga 32bits per pixel (this gives you your alpha) and set the 'Pre Multiplied' tick box to off.

                When you open it in PS you'll notice that the edges are very jagged, just cut the image out using the alpha and it'll be perfect with no halos, even with semi transparent objects.
                It will not have halos, but it will indeed suffer from some clipping depending on the content. When you comp in integer space you get clipping because the unmultiply operation (which is done internally when compositing, or when you save a straight alpha image) results in values > 1.0 if the RGB values exceed the A value. This is harder to do in Vray due to energy conservation helping out, but it is still possible.

                Comment


                • #9
                  Yes, Joelaff's right.

                  I should have mentioned that the saved render will be 8 bits per channel. Not sure what setting you'll need for higher quality file formats.
                  Garry Clarke
                  Technical Illustrator
                  www.garryclarke.com

                  Comment


                  • #10
                    I render 32bit EXRs on black background and never had problems.
                    Software:
                    Windows 7 Ultimate x64 SP1
                    3ds Max 2016 SP4
                    V-Ray Adv 3.60.04


                    Hardware:
                    Intel Core i7-4930K @ 3.40 GHz
                    NVIDIA GeForce GTX 780 (4096MB RAM)
                    64GB RAM


                    DxDiag

                    Comment

                    Working...
                    X