• Isadora
  • Get it
  • Forum
  • Help
  • ADD-ONS
  • Newsletter
  • Impressum
  • Dsgvo
  • Impressum
Forum
    • Categories
    • Recent
    • Popular
    • Tags
    • Register
    • Login

    How to determine GPU with Alpha-Channel?

    How To... ?
    4
    11
    2.4k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DusXD
      DusX Tech Staff
      last edited by

      I can't think of any prebuilt actors that can offer you this feature.

      The only thought I have, is that a GLSL shader could be used to strip away the RGB video values, and leave only the Alpha.
      Then the 'calc brightness' actor could be used to determine if there are alpha values, and how much.
      I haven't seen a shader that does this, although I would think this would be a rather simple shader.

      Troikatronix Technical Support

      • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
      • Isadora Add-ons: https://troikatronix.com/add-ons/
      • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

      Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

      1 Reply Last reply Reply Quote 0
      • MikhailM
        Mikhail
        last edited by

        Thanks, DusX !

        As I've understand, you suggest to use Shader to calculate Alpha-brightness? Good idea!
        I'll try this and post here if it will be successful.
        Do you mean Isadora doesnt have any build-in actors to isolate alpha-channel? 

        Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

        1 Reply Last reply Reply Quote 0
        • DusXD
          DusX Tech Staff
          last edited by

          @Mikhail

          Exactly. There are no built-in actors to isolate alpha (correct me please if I am wrong).
          A Shader may be a good option for adding this feature.
          Since shaders are expected to output video, simply output the alpha as a black and white video, then use the 'calc brightness' actor to give you a numerical reading.
          Please let me know if you succeed...

          Troikatronix Technical Support

          • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
          • Isadora Add-ons: https://troikatronix.com/add-ons/
          • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

          Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

          1 Reply Last reply Reply Quote 0
          • markM
            mark
            last edited by

            Dear @Mikhail + All,

            Good idea Ryan. Here's the shader code to strip out RGB and give you only alpha. Then you could use the CalcBrightness actor after the GLSL Shader actor. If the brightness ever goes below 100, then there is alpha.
            Best Wishes,
            Mark

            uniform float time;

            uniform vec2 mouse;

            uniform vec2 resolution;

            uniform sampler2D tex0;

            void main(void) {

            vec4 c0 = texture2D(tex0, gl_TexCoord[0].xy);

            gl_FragColor = vec4(1.0, c0.a, c0.a, c0.a);

            }

            Media Artist & Creator of Isadora
            Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

            1 Reply Last reply Reply Quote 0
            • jhoepffnerJ
              jhoepffner
              last edited by

              @ mark @Mikhail

              If a you want a B&W representation of alpha layer (not red and white), the code is this one (c0.a also in red layer)

              uniform float time;

              uniform vec2 mouse;

              uniform vec2 resolution;

              uniform sampler2D tex0;

              void main(void) {

              vec4 c0 = texture2D(tex0, gl_TexCoord[0].xy);

              gl_FragColor = vec4(c0.a, c0.a, c0.a, c0.a);

              }

              Best wishes,

              Jacques

              Jacques Hoepffner http://hoepffner.info
              GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
              MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
              MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
              MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

              1 Reply Last reply Reply Quote 0
              • DusXD
                DusX Tech Staff
                last edited by

                @mark @jhoepffner

                Thanks!! I can make use of this as well.  🙂

                Does this warrant a KB article?

                Troikatronix Technical Support

                • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                • Isadora Add-ons: https://troikatronix.com/add-ons/
                • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

                Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                1 Reply Last reply Reply Quote 0
                • markM
                  mark
                  last edited by

                  @jhoepffner - Mine made black and white? It was just not transparent. Yes? (Slightly confused by your addition and the mention of red.)

                  Media Artist & Creator of Isadora
                  Macintosh SE-30, 32 Mb RAM, MacOS 7.6, Dual Floppy Drives

                  1 Reply Last reply Reply Quote 0
                  • jhoepffnerJ
                    jhoepffner
                    last edited by

                    @mark

                    When I use yours on film with alpha mask, the mask is in red (not in black).
                    Because you wright "gl_FragColor = vec4(1.0, c0.a, c0.a, c0.a);" with 1.0 in red value
                    The value of the alpha mask is not important now, because you dont use it anymore so you can write "gl_FragColor = vec4(c0.a, c0.a, c0.a, c0.a);" or "gl_FragColor = vec4(c0.a, c0.a, c0.a, 0.0);"
                    I join a patch with the result with your proposition and my correction
                    All the best,
                    Jacques

                    1fbc29-markproposition.jpg 8f9419-jacquesproposition.jpg b38e88-testalpha02.izz

                    Jacques Hoepffner http://hoepffner.info
                    GigaByte 550b / Ryzen 7 3800X / Ram 64 Go / RTX 3090 24 Go / SSD 2 To / raid0 32 To
                    MBP 13' i5 2.6 Ghz 16 Go / Intel Iris / macOs 10.11.6 / izzy 2.6.1 + 3.0.3b2
                    MBP 15' i7 2.6 Ghz 16 Go / GTX 650M 1Go/ MacOs10.13.3 / Izzy 2.6.1
                    MSI GS65 i7 3.6 Ghz 32 Go / GTX 1070 8 Go / Windows 10 / Izzy 3.0.3b2

                    1 Reply Last reply Reply Quote 0
                    • DusXD
                      DusX Tech Staff
                      last edited by

                      I just got to testing this method today.. and its perfect!

                      Troikatronix Technical Support

                      • New Support Ticket Link: https://support.troikatronix.com/support/tickets/new
                      • Isadora Add-ons: https://troikatronix.com/add-ons/
                      • My Add-ons: https://troikatronix.com/add-ons/?u=dusx

                      Running: Win 11 64bit, i7, M.2 PCIe SSD's, 32gb DDR4, nVidia GTX 4070 | located in Ontario Canada.

                      1 Reply Last reply Reply Quote 0
                      • MikhailM
                        Mikhail
                        last edited by

                        To : [DusX](http://troikatronix.com/troikatronixforum/profile/149/DusX) , [jhoepffner](http://troikatronix.com/troikatronixforum/profile/15/jhoepffner) , [mark](http://troikatronix.com/troikatronixforum/profile/2/mark) , Wow! Thanks Guys! You're cool!
                        A lot of thanks! I try to use this shader also in my patch.

                        Win7, i7(SkyWell), 16GB RAM, SSD, nvidia GTX 1070, Isadora 2.5

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post