Home Unreal Engine

UDK assumes a textures alpha channel is for transparency.

polycounter lvl 13
Offline / Send Message
16bit polycounter lvl 13
I would like to use a textures alpha channel for something other than transparency. But when I import it as a 32 bit tga, it automatically uses what I have in the alpha channel, in this case an ambient occlusion render, as a transparency mask. Is there some sort of setting I need to click when I import a texture?

Replies

  • Eastlin
    Options
    Offline / Send Message
    I'm probably not much of a help but when you import a texture (at least i just tried with a .png) i get the options like alpha to opacity/emissive/specular etc however theres no ambient occlusion.

    I also worked a bit on trying to get ambient occlusion for textures in UDK however i have not been very sucessfull.

    However there is this guide you could follow to get ambient occlusion for your level at least "The tutorial"

    Not sure how much of help i can be but at least make sure you unchecked the alpha to opacity mask and it should be good.
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    None of them are checked when I import it. I have played around with them, I clicked Alpha to emissive, but in the texture preview it was still transparent.
  • EvilPixills
    Options
    Offline / Send Message
    EvilPixills polygon
    What's the compression set to for that texture? TC_Default? Could you possibly show us an example of the texture your using?

    As long as your using a 32 bit texture it's going to be transparent in the texture preview. You can toggle the Alpha channel on and off at the top of the window with the black and white circle. Have you tried making a material with that texture? That's where the magic happens.
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    For some reason, it's also discoloring my texture as well. My texture only has 2 colors, white and a blueish gray. But the alpha channel is adding in a bunch of red. Importing it without an alpha doesn't do it.

    Using it on a material. Hooking the alpha channel into transparency works as expected. Using it's RGB channels is discolored red as I stated above.

    alphaproblem.png

    You can actually see the red near where something is transparent.
  • Adam L. Gray
    Options
    Offline / Send Message
    Piew piew:

    2e58dco.jpg

    Default texture import settings, and material settings. Try using the default ones and see if it works.

    Still doesn't work? Then you got yourself a problim.

    If it works with default settings, but not with the custom import settings you specified... then read up on them! Should say something about em somewhere, or just leave em be for now :)

    Also, generally, I'd suggest keeping the AO in a seperate texture, and then decrease the size of it. As most of the time it really doesn't need to be as big as the diffuse. (At least I think that saves on performance, but if not, I wouldn't mind someone proving me wrong!)

    And wth is up with that captcha?!

    2d78r9e.jpg

    Cheers
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    But I have imported it with everything default. Maybe the problem is in photoshop?
  • chris89
    Options
    Offline / Send Message
    chris89 polycounter lvl 10
    You make the shader by putting together the materials, so in effect You decide what the alpha channel is used for (by dragging the white box next to a texture sample to the location you want).
    UDK does not expect it to be for transparency at all, it only shows it in the texture window for preview purposes and you can turn off the display of it.

    On your materials/shaders and meshes it will show how you want/made it.

    If you're using a material someone else made and are plugging the texture in there then it is set in that material and you'd have to either change it or make a new one.
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    Well it's doing the occlusion. But I still have no idea why it's reddening it.

    1.png
    2-1.png
  • Vailias
    Options
    Offline / Send Message
    Vailias polycounter lvl 18
    The reddenng is due to texture compression and your flat smooth color diffuse. The blue and green arent matching the red exactly so when you multiply the difference becomes exaggerated. If your diffuse map is more varried you won't see the shift.
  • 16bit
    Options
    Offline / Send Message
    16bit polycounter lvl 13
    So I added a whole bunch of random paint swipes and it fixed the reddening thing.
    So my plan is to keep diffuse and AO in 2 different textures. Since diffuse is nothing but simple colors, I can make it incredibly small.

    The AO, specular, and masks will be put into one of those consolidation textures.
Sign In or Register to comment.