Announcement

Collapse
No announcement yet.

PNG with Alpha: How do you get them to work?

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

    PNG with Alpha: How do you get them to work?

    This is a totally basic question that has me banging my head against the wall.
    I am not a noob when it comes to image channels and all...which is probably the source of the issue.
    I have a bunch of wonderfully small png files that I want to use as material mattes. They are RGBA png files that import fine in Nuke and have all the data I need. After Effects and Photoshop are a little weird with Alphas but I can at least see the data is there. I was hoping to be able to use the straight data for mattes. But I can't for the life of me get them to import with useable data in Unreal Engine 4. I have attached an example file that works great in Nuke and can be viewed in After Effects by switching display mode to RGB Straight. So the data is there...just cant access it in Unreal.
    Any thoughts would be greatly appreciated.
    Thanks so much for your time.
    ~Ben
    Click image for larger version

Name:	mattebase.png
Views:	1
Size:	6.4 KB
ID:	1136349
    Just to clarify, this image looks weird, but the data is there, just want to know if there is a way to get Unreal to use it.
    In After Effects you can view the data by switching to RGB Straight display and in Nuke it just works out of the box.
    Last edited by animatedfox; 07-02-2014, 09:18 AM.

    #2
    you'll need an actual alpha channel for it to work in UE4. And there doesn't seem to be any straight forward method in photoshop for converting this hidden "transparency" into an alpha, that I know of. Unless someone else here knows, you're gonna have to search the web for a solution. I believe their is a photoshop plugin out there somewhere called SuperPNG(or something like that) that can do this, but i don't know.

    Comment


      #3
      I just imported your texture into UE4, made a quick material, set the material to blend-masked and plugged the alpha channel of your texture into the opacity mask node and it worked fine(1/4 was visible and 3/4 invisible) so the data is there, I also opened your texture in gimp and the alpha was fine there too. I did notice the alpha didn't show when I opened the texture in UE4 although I have had textures do that as well, usually I find I set the texture settings wrong.

      Comment


        #4
        I think you need to switch on the alpha channel in the Texture viewer in UE4. At the top left corner of the viewport is a small dropdown menu. I think the alpha channel is not selected by default.

        Of course the alpha channel is also there if you don't select it in the viewer so smokey13's approach would work either way.
        Last edited by Praseodyl; 07-02-2014, 10:46 AM.

        Comment


          #5
          Thanks so much for the replies.
          The Alpha is coming in fine, its the RGB channels that are not useable.
          I can't get them accessible in my materials. Even something as simple as using the Red channel for the Base color or as a mult for a constant...no worky for me.
          FYI the image I posted has Red Green and Blue corners as well as the Alpha corner.
          Can anyone get that data usably into a material?
          You are the best!

          Comment


            #6
            I didn't even realize there was color in the image till you said something. I can see all the data as RGBA in 3DsMax, but not in Photoshop. How where you able to see the all the color data in PS?

            Comment


              #7
              Well I ended up converting my source files to psd files and got the size down to close to what they were as png.
              The RGBA channels all work so I am good. Would be nice to know how to use the straight data out of those png's.
              Data...gotta love it.
              Thanks again.
              ~Ben

              Comment


                #8
                Well i figured out how to extract the alpha from transparency in photoshop by creating a "Layer Mask > From Transparency" and then create the alpha channel from that. But Photoshop wont save the channel when saving the file as a PNG.
                Here's the link I found that give a bit of info on doing this.
                http://helpx.adobe.com/experience-ma...-channels.html

                Comment


                  #9
                  If you want to stick to using PNG's then you either have to have the 'Alpha' part as visible transparency in Photoshop or use this plugin http://www.fnordware.com/superpng/

                  You can of course just use PSD's which makes things a little easier

                  Comment


                    #10
                    Those are really great tips guys.
                    Thanks so much...Alpha...its a finicky thing.
                    After all that fussing to find a way to do a 4-way blend it seems that the Alpha really isn't needed.
                    Using the example from the Unreal Docs using only 3 Lerps I can technically make a 4 way switch with only RGB.
                    But again, thanks all for the help!

                    Comment

                    Working...
                    X