Resized sprite displays faulty in exported project

Bugs will be moved here once resolved.

Post » Tue May 28, 2013 8:29 pm

Link to .capx file (required!):
https://dl.dropboxusercontent.com/u/2306601/ikot/bugSprite.capx

Relates to the following forum thread:
https://www.scirra.com/forum/issue-with-sprite-on-export_topic68532.html

Steps to reproduce:
1. Create a sprite in a blank project, resize it slightly to make it smaller.
2. Add animations to it, so that there are enough frames for C2 to put it into one single image.
3. Try to preview the project, export the project and run it.


Observed result:
The resized sprite appears all blurry and pixellated in the exported project, as opposed to the preview which still looks fine.

In the example capx the sprite has 3 animations. If you delete one of them, C2 will put the frames of the sprite in separate images again and it displays fine again.


Expected result:
The sprite should look the same in both preview and exported project.


Browsers affected:
Chrome: yes
Firefox: yes
Internet Explorer: not tested

Operating system & service pack:
Win7 64bit SP1

Construct 2 version:
r132 (also happens in the previous stable release)    
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061

Post » Tue May 28, 2013 10:44 pm

Sounds like this issue doesn't it ?

Try to have a play with the point/linear values of the "sampling" project property ?
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
294
S
117
G
96
Posts: 7,312
Reputation: 71,092

Post » Wed May 29, 2013 5:03 am

[QUOTE=Kyatric] Sounds like this issue doesn't it ?

Try to have a play with the point/linear values of the "sampling" project property ?[/QUOTE]

Actually no, that's not the same issue. The sprite does mess up in the actual exported project (while it doesn't on preview), I don't have any concerns how it looks in the editor either.

It should work and display the resized sprite properly, but it doesn't when there is a certain amount of frames and Construct puts it into one single image file on export. Remove some animations/frames, so that there will be just 3 or less (I think)and C2 uses a few images instead of a single one for the sprite on export, and it displays correctly again.
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061

Post » Wed May 29, 2013 5:40 pm

It is indeed showing blurrier than it ought to.

It turns out it's to do with mipmap levels. The WebGL renderer only generates mipmaps (which can be used for better quality downscaling) for power-of-two textures. In preview most images aren't POT, but spritesheeting on export makes everything POT and therefore everything gets mipmaps. We used the wrong downscaling mipmap mode and it made it appear slightly blurry. This is corrected in the next build. However, it still looks slightly different, because downscaling with a mipmap is more accurate than downscaling without a mipmap. In short, in preview mode it's actually slightly aliased because downscaling without a mipmap means it skips some pixels, giving it an artificially sharp look; on export it will look smoother because it's taking in to account all pixels. If you want to avoid this you should make sure you draw your source images closer to the size they're displayed at (notice the object is scaled down in the layout view).
Scirra Founder
B
400
S
236
G
89
Posts: 24,546
Reputation: 195,471

Post » Wed May 29, 2013 6:43 pm

Oh, that's very informative actually. Good to know, thx Ashley. Looking forward to the next build then.
B
23
S
6
G
11
Posts: 1,045
Reputation: 8,061


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests