plunksville

Hello groovy people! 8)
I'm having a problem with gaps appearing between images after export.
I have a circular glow that, in the interest of optimisation, I have taken a quarter piece of it to duplicate and rotate to re-create the circular shape. I have positioned the quarters perfectly in the Spine Editor, making sure the images are butted right up against each other.
However, after testing the exported JSON and packed images there is a noticeable line between the arranged quarter pieces.
I've done some research and believe it's got something to do with Linear Filtering & how it smooths the images slightly.

I was wondering if it's possible to still export with Linear Filtering but retain the sharp edge making this kind of optimisation technique useful?
Many thanks, Steve :think:

Screenshot 2022-05-12 at 16.03.35.png

Screenshot 2022-05-12 at 16.07.45.png
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
2D Animator for Games
Avatar
plunksville
  • Postovi: 5

Nate

If your texture atlas has padding between the regions, it means you have a line of blank pixels next to your region's pixels. When filtering is performed, it will average with these neighboring pixels. You can use the Duplicate padding texture packer setting so the region's pixels are copied into the padding to reduce this effect. That may solve your problem!
Avatar
Nate

Nate
  • Postovi: 11855

gunspike

I enabled dupliacate padding replication and printed the result.

Version 3.8.99

Rather, it looks a little better if the padding duplication check is unchecked.

Can you tell me why?
Nemaš dopuštenje za pregledavanje privit(a)ka dodan(og)ih postu.
gunspike
  • Postovi: 132

Nate

I can't say. It could be the line doesn't come from filtering that samples the neighboring blank pixel. If you draw your images 1:1 image pixels to screen pixels and you make sure your images are not positioned at partial pixels, then there shouldn't be any filtering artifacts.
Avatar
Nate

Nate
  • Postovi: 11855

gunspike

Nate I'm sorry.
I use a translator, so my sentences may sound a bit aggressive. But that's not what I intended. :'(

Anyway :D

If the above problem occurs, is there an accurate guide to solve it?

I've tried various tests, but the image is sampled without accurately removing the margins.

I don't quite understand Nate's answer.
gunspike
  • Postovi: 132

Nate

Don't worry, I assume you are not typing angrily. :)

This problem is common and can happen without Spine, any time you are drawing two images side by side. For example, many games use a tile map for backgrounds and need to avoid seams between the tiles. Googling that problem may help you find solutions, possibly specific to your game toolkit.

Generally solutions are one of:
1) Draw your images without filtering. This means your images are not scaled or rotated, so the image pixels correspond to screen pixels. Also make sure their position is not off by a partial pixel.
2) Copy edge pixels into the padding between regions in your texture atlas (the Duplicate padding setting). For this to work, your images should have pixels right up to their edge. It won't be effective if your images have blank pixels at the edge. If you are using our Photoshop script, the [trim:false] tag can be used so a layer does not get whitespace padding around the edge.
Avatar
Nate

Nate
  • Postovi: 11855


Natrag na Editor