Texture Sizes

Discussion and feedback on Construct 2

Post » Wed Jun 06, 2012 6:26 am

Does having power of 2 images benefit games in Construct 2?
B
32
S
9
G
3
Posts: 275
Reputation: 8,063

Post » Wed Jun 06, 2012 11:14 am

The only way this will benefit is it will prevent your tiled backgrounds from being slightly blurry.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Wed Jun 06, 2012 6:38 pm

ahhh ok cool thanks sqiddster.
B
32
S
9
G
3
Posts: 275
Reputation: 8,063

Post » Sat Jun 30, 2012 10:12 am

I am having an issue with all of my tiled backgrounds showing up blurry.

Here is a screenshot of the problem I'm getting https://dl.dropbox.com/u/30187917/issue.jpg

Everything looks good when I am in construct 2, and image editing software, but when I run the project in chrome, i.e., and firefox, my tiled bgs are very blurry!

I need to be using webgl and point sampling to get the pixelated look I am going for.

I am using r97 on a nvidia gpu with win 7 64bit.

My drivers are good, and I get the same result in all browsers.

Here is the capx showing the problem.

https://dl.dropbox.com/u/30187917/tiled_background_blurry.capx

The project shown above is a sprite next to a tiled bg. When I run the project, the sprite is crisp and point sampled but the tiled bg is blurry. Same texture, different object, different rendering results.

The texture is 48x24 (it was 48x20 when I found this thread, but changing it did not help.)

I tried scaling it to 48x48 just to see if that fixes the blurryness, but no luck.
Greg2012-06-30 10:16:58
B
9
Posts: 59
Reputation: 997

Post » Sat Jun 30, 2012 11:36 am

As @sqiddster said the only way to get tiled backgrounds to show perfectly in WebGL mode is to use a power-of-two sized texture, e.g. 32x32 or 64x64.

You should also make sure 'sampling' is set to 'point' in project properties to prevent sub-pixel positioning causing blurring.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Post » Sat Jun 30, 2012 8:20 pm

Chrome is really not consistent when displaying sprite,
i found that Firefox actually is more consistent (sprite/tiledbackground always looks sharp).

it could be a graphic driver....maybe ??


Out of curiosity i run a test on Chrome vs Firefox, and true enough:

- on my desktop, a Win XP machine with latest Nvidia driver,
* in Chrome Sprite looks blurry while TiledBackground looks sharp. (while the post earlier mention the opposite where tiled background looks blurry & sprite looks sharp)
* Firefox both looks sharp.

- on my laptop, Win 7 with ATI graphic (latest driver), both looks sharp (on Chrome & Firefox)


I'm not sure if this is ATI vs Nvidia thing, or it's Win XP vs Win 7, because i only have 2 machine to test

When the sprite blurry, it looks like this:

Chrome:


Firefox:



I slightly modified the sprite so the size is 64x64 just to see if it fix the problem (it's not):

CAPX:
https://dl.dropbox.com/u/39382262/BUG/BlurrySprite.capx


Web Test (Try it on Chrome & Firefox to see the different):
https://dl.dropbox.com/u/39382262/Blur2/index.html


Project Setting:
Potato2012-06-30 20:47:49
B
34
S
13
G
8
Posts: 134
Reputation: 8,118

Post » Sat Jun 30, 2012 10:31 pm

@Potato:
Looks fine to me both in Chrome and FF, I have an nvidia card and WinXP on this machine.
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Sun Jul 01, 2012 9:38 am

[QUOTE=Nimtrix] @Potato:
Looks fine to me both in Chrome and FF, I have an nvidia card and WinXP on this machine.[/QUOTE]

I know.. isn't that really weird,
on my laptop it also works fine both on Chrome & Firefox.

only on my desktop with Chrome it looks blurry (looks sharp with Firefox).
desktop spec: Win XP, GeForce GT 220 with latest Nvidia 301.42 WHQL driver


maybe @Ashley knows what happens in here,
not that i expect him to fix it, since this is probably one of that browser unpredictable behavior and we can't do anything about it
B
34
S
13
G
8
Posts: 134
Reputation: 8,118

Post » Sun Jul 01, 2012 10:49 am

It depends on your graphics card and drivers.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Sun Jul 01, 2012 11:58 am

Not sure what's happening. Does turning off WebGL affect it on machines where the sprite looks blurry?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,508

Next

Return to Construct 2 General

Who is online

Users browsing this forum: spy84 and 4 guests