Resized sprite displays faulty in exported project

0 favourites
  • 5 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • Link to .capx file (required!):

    Relates to the following forum thread:

    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)

  • Sounds like this issue doesn't it ?

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

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sounds like this issue doesn't it ?

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

    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.

  • 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).

  • Oh, that's very informative actually. Good to know, thx Ashley. Looking forward to the next build then. <img src="smileys/smiley1.gif" border="0" align="middle" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)