Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blurry images when sprite (image) is not in a pixel perfect position #222

Open
mokalux opened this issue Aug 16, 2024 · 3 comments
Open
Assignees
Labels
bug Something isn't working skia
Milestone

Comments

@mokalux
Copy link

mokalux commented Aug 16, 2024

Hello there, thank you for working on friction!

I have an issue when animating a sprite (animated sprite). When I set an animation to go from point A to point B, the animated sprite is not always on pixel perfect position (it can be positioned in a sub pixel position) then the image is blurry.

This happens only on non pixel perfect position. The exported animation is blurry on non pixel perfect position ( image2 sequence, QuickTime, mp4, metroska, ...).

When the animated sprite is on a pixel perfect position the image is clear as should be.

Possible fix would be to position the sprite (animated sprite) in the animation on pixel perfect only positions?

Hope you can reproduce the issue, else I can post some images.

Thank you ;-)

@rodlie rodlie self-assigned this Aug 17, 2024
@rodlie rodlie added this to the 1.0.0 milestone Aug 17, 2024
@rodlie
Copy link
Member

rodlie commented Aug 17, 2024

Thanks for the report, I will look into this when I get the time.

A super simple example project file would be great if possible, no rush.

@mokalux
Copy link
Author

mokalux commented Aug 17, 2024

Here is a sample project.

You can see the tent in two positions, one in a pixel perfect position (clear), the other one not (blurry).

If you move the second tent to be in a pixel perfect position then it becomes clear (please use 100% quality).

The same goes for the animation position.

Thank you for looking into this for v1.0, much appreciated!
scene01.zip

PS: assets are cc0

@rodlie rodlie added bug Something isn't working skia labels Oct 18, 2024
@rodlie
Copy link
Member

rodlie commented Oct 18, 2024

Sorry for the late reply. I'm able to replicate, but the export (PNG) is pixel perfect here.

in GIMP i have the original on first layer, second is a render with only the tent, the third is a render of everything. They are all identical.

friction-issue-222-2024-10-18_19.04.15.mp4

This is on Linux, I have not tested on Windows.

But regardless of the export this is a bug, but it seems to be in a third-party library (skia), or our usage of it. Will try to figure out where the problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working skia
Projects
None yet
Development

No branches or pull requests

2 participants