Linear Sampling Bleeds

All closed bug reports are moved here.

Post » Fri Mar 31, 2017 4:19 pm

I have sprites that are perfectly cut from side to side to remove redundant transparency areas on them. But it seems with Sampling set to Linear through the project settings, I get bleeding of other sprite images that are neighbours on the spritesheet which can be viewed through right-clicking Project Folder > Tools > View spritesheets. I found this annoying as I have to resolve to Point Sampling and get the rigid not-so-smooth renders to remove the "bleeding" edges. Is there a setting in which I could avoid this kind of visual issue perhaps?

Steps to Reproduce
Create a FEW sprites that get's some of it's parts on it's edges. Meaning a well cropped sprite image with minimal transparency spaces.

Observed Result
Some neighbouring sprites shown on the spritesheet viewer get's bleed over or have a little peaking on each respective sprites and can be viewed clearly even on the editor and also during preview. This only happens if the Sampling is Linear.

Expected Result
Should be perfectly isolated for each individual sprite in their respective bounding box selected from the spritesheet internally while on Linear Sampling.
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Fri Mar 31, 2017 4:45 pm

The usual fix is a one pixel transparent border.
Image ImageImage
B
171
S
50
G
179
Posts: 8,382
Reputation: 113,458

Post » Fri Mar 31, 2017 5:28 pm

Please provide a project so we can investigate.

C3 uses a similar spritesheeting strategy to C2, which involves automatically adding a 1px transparent border around every image specifically to prevent bleed.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Sun Apr 02, 2017 12:26 pm

@Ashley

I tried to recreate by using basic shapes on these sprites but I can't seem to have these sprites on the same spreadsheet. I can't post my project file with all the sprites due to NDA issues. If I could get the sprites to be on the same spreadsheet I could submit a recreation of the bug.
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Sun Apr 02, 2017 2:13 pm

Does selecting "high quality" downscaling mode in Project Properties fix it?
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Sun Apr 02, 2017 2:41 pm

@Ashley

Apparently, setting LOW downscaling mode fixed the issue but bleeds still persist on HIGH. To add more description to this bug, it actually flickers the bleeds in certain zoom even on editor or in preview, and the majority of the zoom scale has the bleed even on default scale of 1 in preview or 100% zoom on editor. This project was imported from C2.
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Mon Apr 03, 2017 2:30 pm

Okay, this doesn't make any sense at all. Realistically this can't be investigated unless you can reproduce it in a project you are willing to share.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382

Post » Mon Apr 03, 2017 3:16 pm

Ashley wrote:Okay, this doesn't make any sense at all. Realistically this can't be investigated unless you can reproduce it in a project you are willing to share.


Alright I manage to remove tonnes of stuff to be under the free version limit so I could add a zoom when scrolling up and down with the mouse just for viewing the bleeds in different "zoom" scales.

https://www.dropbox.com/s/3495t4ilb8d54 ... g.c3p?dl=0
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Mon Apr 03, 2017 3:24 pm

@Ashley

Here is also an image apart from the project file I posted above.

Image
B
40
S
9
G
5
Posts: 177
Reputation: 6,805

Post » Mon Apr 03, 2017 3:33 pm

It's working correctly: C3 is adding a 1px border around the sprites as intended. However you're using quite a significant amount of downscaling: the main ship is about 4.5x downscaled. Using high levels of downscaling is sensitive to mipmap bleed (a different thing to linear sampling bleed). This could also happen in C2, but probably didn't purely by luck (it arranged the spritesheet differently). This is what high quality downscaling mode is for: it almost completely guarantees there won't be mipmap bleed, except in the most extreme circumstances, and I can confirm using that mode does fix it.

So really it's all working as intended, so closing as won't fix. I would generally recommend not using such high levels of downscaling. If you upscale a lot at runtime and it looks OK there, so this only affects the editor, you can probably ignore it; otherwise just use high quality downscaling mode.
Scirra Founder
B
399
S
236
G
89
Posts: 24,525
Reputation: 195,382


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests