Download

Pixel perfect drawing to render target?

So I thought I’d quickly create a simple actor to help me combine separate textures into different channels of a single texture (i.e. texture packing). All this actor does is allows me to select four textures and it then creates a render target and draws each texture to a different channel using a material set up for this. The problem is that the new output texture doesn’t look exactly the same as the source textures. There always appears to be a little bit of noise in the output texture in each channel and I can’t figure out where this noise is coming from.

I’ve ensured the render target and output texture are both using the same size dimensions as the source textures. I’ve tried various format settings for the render target and none of them make a difference. I currently have it set to RTF RGBA8 SRGB. I’ve tried using a canvas render target instead, but get the same result.

The material is set up as Unlit with AlphaComposite. It then just grabs the appropriate channel of each texture, appends them together and sends them to the Emissive Color output pin. The Alpha texture channel is sent to the Opacity output pin.

Anyone have any ideas on what might be causing the noise? Perhaps I’m going about this the wrong way? If so, how should I be channel packing, without exporting and doing it manually in photoshop or something?

Do you have a screenshot of that noise, or a before and after image? The little i know about drawing pixel perfect render targets, is that you should go into your render target and check in the “Level of Details” segment, that your:

  • “Mip Gen Settings” are set to “NoMipmaps” and
  • “Texture Group” is set to “2D Pixels (unfiltered)”
  • also “Clamp” Adress X and Y

Example settings:

I’ve tried fiddling with all of those settings as well, but no good. So far, this is the best I’ve been able to achieve (which is pretty bad).

example

This is an example (snip from larger power of two texture), looking at just the red channel. The render target has introduced a slight bit of noise. However, the output texture introduces a lot of noise.

Yeah, thats something o.O No clue, whats going on there, different compressions, that boost the values during conversion?

I ttook your picture, cut out the source part, to see, how noisy it is in this state. After some boosting the colors, it doesn´t look less noisy than your output result, just seems, that the colors are closer together, so that you cannot see the real noise.