tilled background glitch when scrolling

New releases and general discussions.

Post » Tue Jan 27, 2009 7:32 pm

[quote="Ashley":3uw0i67l]This is actually happening because the textures are power-of-two, I think. It means they tile seamlessly inside the object, but it seems the edges glitch (because they're trying to tile the opposite side of the texture). I shall contemplate a solution![/quote:3uw0i67l]

Would moving the texture coordinates inwards by half a texel fix the problem?
B
2
S
1
G
5
Posts: 59
Reputation: 1,518

Post » Tue Jan 27, 2009 9:33 pm

[quote="Ashley":178snaxr]This is actually happening because the textures are power-of-two, I think. It means they tile seamlessly inside the object, but it seems the edges glitch (because they're trying to tile the opposite side of the texture). I shall contemplate a solution![/quote:178snaxr]
I shall contemplate what the heck you're talking about. :P
B
3
S
2
G
4
Posts: 271
Reputation: 2,017

Post » Tue Jan 27, 2009 11:48 pm

But it only happens when the tile is trying to render at a sub-pixel position. For instance, on Point sampling, or if you tell Construct to manually round the scrolling to the nearest pixel, it works. Weird.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Wed Jan 28, 2009 1:00 am

[quote="stainsor":89riual4][quote="Ashley":89riual4]This is actually happening because the textures are power-of-two, I think. It means they tile seamlessly inside the object, but it seems the edges glitch (because they're trying to tile the opposite side of the texture). I shall contemplate a solution![/quote:89riual4]
I shall contemplate what the heck you're talking about. :P[/quote:89riual4]

Oh, now I get it. :D

[quote="deadeye":89riual4]But it only happens when the tile is trying to render at a sub-pixel position. For instance, on Point sampling, or if you tell Construct to manually round the scrolling to the nearest pixel, it works. Weird.[/quote:89riual4]

The colors of the problem columns seem to be averages of the brown and white they are supposed to be. So maybe it's trying to jam two columns of pixels into one column. Or more appropriately it's trying to put say six tenths of one column and four tenths of another column of the tile into one column on the screen.
B
3
S
2
G
4
Posts: 271
Reputation: 2,017

Post » Sat Jan 31, 2009 10:57 pm

its because of the antialiasing created when you zoom in, the same thing happens when you make objects which should fit perfectly rotate as whole, it creates an atilaiased seam. changing it to point is the way to go.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Feb 01, 2009 12:29 am

[quote="QuaziGNRLnose":3t3v1zzn]its because of the antialiasing created when you zoom in[/quote:3t3v1zzn]

There's no zoom in this .cap, though...
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Feb 01, 2009 4:31 am

Its quite simple. Tiled backgrounds render in a special way such that the uv co-ordinates wrap instead of clamp. So when a tiled background is rendered at a decimal place co-ordinate, the texture interpolation is grabbing colours from the right. You notice this something in low quality 3d games when people accidentally setup the wrapping incorrectly and you get trees that have a semitransparent line above them etc.

This isn't necessarily a bug in some situations. If you have a tiled background that is a seamless texture, you expect the texture in calculated the interpolated pixels, to account for the pixels that are wrapped on the other side of the image.

Ultimately when it comes down to it though...why are you using a tiled background for these tiles which you dont actually want to tile at all? The tiled background object is really for images that you want to repeat over and over again.
B
4
S
2
G
5
Posts: 641
Reputation: 3,011

Post » Sun Feb 01, 2009 4:44 am

[quote="David":29k6jd36]why are you using a tiled background for these tiles which you dont actually want to tile at all?[/quote:29k6jd36]

Well, because sometimes you want to have an still image with no animation and doesn't need any special hotspots or image points or other features that a sprite has.

I mean, should we be using sprites in this case?
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Feb 01, 2009 5:02 am

[quote:1fwdqh3u]I mean, should we be using sprites in this case?[/quote:1fwdqh3u]

Same thing happens when you use multiple bgtiles, that are actually tilled.
Example: Lets say you want to make a border with one tileable image on top, one on bottom, one on the left, and one one the right. Your still going to get the one pixel difference where the corners meet.
Image Image
B
161
S
48
G
90
Posts: 7,347
Reputation: 66,749

Post » Sun Feb 01, 2009 10:57 pm

[quote="deadeye":2qbxip3p][quote="David":2qbxip3p]why are you using a tiled background for these tiles which you dont actually want to tile at all?[/quote:2qbxip3p]

Well, because sometimes you want to have an still image with no animation and doesn't need any special hotspots or image points or other features that a sprite has.

I mean, should we be using sprites in this case?[/quote:2qbxip3p]

i agree - from my simple calculations sprite is much heavier than tilled bg becous have more options.
My professional Royalty Free Music at Scirra Assets Store
--------------------------------
Specs: i5 2500, 16gb of ram, gtx 770, win 7, Focusrite Scarlett 8i6, Mackie mr8mk2, Alesis 320, browsing the net on chrome.
B
71
S
19
G
19
Posts: 1,919
Reputation: 16,910

PreviousNext

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 3 guests