Home Unreal Engine

Texture import is causing channel data to be mixed in a way I don't want.

Zablorg
polycounter lvl 6
Offline / Send Message
Zablorg polycounter lvl 6
Edit: Bumping up the contrast of the non-red channels significantly revealed the presence of the circles. I thought it might be an artifact of improper bucket tool use in Photoshop or something, but I'm confident the image I'm using has the appropriate contents in each channel.

So now the question becomes: is there some import or compression setting that is causing the channel data in my image to become altered? I note that when I change the image's compression settings in UE4 the channel data becomes markedly different, so I expect an answer is to be found there.

-----




I've got some masks packed into an image: the Red channel has some circles, and the Green and Blue channels are just some haphazard squares encompassing them.

I've got various logic operations going on in this material so far, but the important thing is that none of them have yet taken from the red channel, which is where the circles are. 

And yet upon applying a certain operation (in this case a frac node), it can be seen that the math has somehow picked up on the presence of circles, which as far as I can tell should be thoroughly impossible. It's also scrambled up the contents of the squares in a way I can't really account for, either. That might have to do with some incorrect UV logic I'm implementing or whatever, but the point is the node is pretty suspicious.



So, that's pretty bizarre. What's also weird is that the node immediately before it doesn't appear to exhibit this behavior. It's the frac node which seems to introduce this nonsense, and I have no idea why.

Does this kind of thing look familiar to anyone? Why on earth would this node know about these circles enough to somehow cause them to appear?

Replies

  • leleuxart
    Options
    Offline / Send Message
    leleuxart polycounter lvl 10
    It looks like it's getting the edges of your circles, but not the full shape, if I understand your texture correctly, right? In that case, it's likely cross-talk because of the compression format and the edges have bled over into other channels(due to drastic differences along the edge(black to white)). You might have to try a higher quality compression or split up the textures. I don't remember all the color options the engine supports right now, but DXT5 might be an option for you. Anything other than DXT1 will increase file size, but occasionally with the higher quality compression, you can downres it slightly and come out even again.

    If neither of those are an option, you can try changing the channels the masks are located in. If you still use DXT1, the green channel gets one extra bit. Perhaps switching the channels around will give you something without as obvious of an artifact.
  • Zablorg
    Options
    Offline / Send Message
    Zablorg polycounter lvl 6
    leleuxart said:
    It looks like it's getting the edges of your circles, but not the full shape, if I understand your texture correctly, right? In that case, it's likely cross-talk because of the compression format and the edges have bled over into other channels(due to drastic differences along the edge(black to white)). You might have to try a higher quality compression or split up the textures. I don't remember all the color options the engine supports right now, but DXT5 might be an option for you. Anything other than DXT1 will increase file size, but occasionally with the higher quality compression, you can downres it slightly and come out even again.

    If neither of those are an option, you can try changing the channels the masks are located in. If you still use DXT1, the green channel gets one extra bit. Perhaps switching the channels around will give you something without as obvious of an artifact.
    After a bit of searching I went with VectorDisplacementMap compression, no MipMaps, and set the filter setting to "nearest".

    It seems to have removed the circles entirely, but I'm still getting some crosstalk between the green and blue channel.
  • Obscura
    Options
    Offline / Send Message
    Obscura grand marshal polycounter
    Try "User interface 2d"... Thats entirely uncompressed.
  • Zablorg
    Options
    Offline / Send Message
    Zablorg polycounter lvl 6
    That seems to have done the trick! Thank you!
Sign In or Register to comment.