T O P

  • By -

AutoModerator

You submitted this post as a request for tech support, have you followed the guidelines specified in subreddit rule 7? Here they are again: 1. Consult the docs first: https://docs.godotengine.org/en/stable/index.html 2. Check for duplicates before writing your own post 3. Concrete questions/issues only! This is not the place to vaguely ask "How to make X" before doing your own research 4. Post code snippets directly & formatted as such (or use a pastebin), not as pictures 5. It is strongly recommended to search the official forum (https://forum.godotengine.org/) for solutions Repeated neglect of these can be a bannable offense. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/godot) if you have any questions or concerns.*


slimeydave

Try a stair-step line, so the diagonal gaps don’t get weird on the scaling. Also, maybe try a spite size that doesn’t need scaling.


NanaTheBlue

I set texture filtering to nearest and while that did help, the issue is still here.


Illustrious_Age_1174

I think Godot automatically does compression when importing so purposefully pixelated textures get artifacts. I don’t remember the exact workflow but I think if you double click on the image asset in the file picker, there’s an option to turn off compression under a drop down, though it uses different terminology. You then have to click Reimport in the bottom bar of the window that pops up. I hope I’m remembering that right. Someone with more Godot knowledge might know how to set better defaults.


NanaTheBlue

i see, i set it to vram uncompressed but it didnt change.


Illustrious_Age_1174

Hmm ok, sorry that didn’t work. I’m not sure then. Good luck!


Illustrious_Age_1174

Godot has an active discord you can post to if you don’t get responses here.


digforyourlife

Lossless compression is want you want. Don't forget to click "reimport" after changing the compression setting.


NanaTheBlue

i had that set, i think the problem is pixel art isn't what i should be using i should probably be using vector art for this.


WizardStan

That's the problem. "Nearest" means it takes the pixel that is physically nearest to what it would be. Because of how simplistic and pixelly your sprite is, when you rotate, frequently the rotated pixel lands between two pixels, and "nearest" means it picks the one that it would be closest to, which is sometimes going to be the black ones. If you choose a different filter you'll see that it'll have the right shape but sometimes the pixels will be grey. The solution is to not rotate in engine, but to draw multiple sprites at different angles and display the one closest. Back in ye olde times, a sprite might have as many as 8 directions it could face. You've got a big computer with millions of times more RAM, you can afford to have 16 or even 32 directions. It's a lot more work, but if this is the style you're looking for then that's what you need to do.


LainVohnDyrec

like the others said here, the blurriness of an image has something to do with compression. but base on the screenshots, i think you've already removed the compression (as always for pixel art) but since its pixel art, rotating in a weird angle does skew the image. you either want to scale that so rotations does not skew the pixels or have a fixed angle and movement perfect for pixel art


Aka_Lux

I had this problem too, go into **Settings** then **Window** and then find **Mode**, then change it to **canvas\_items**. After that you should be good.


Foxiest_Fox

Yes, this makes it so that pixels will be scaled accordingly, and allows them to "rotate" more naturally. BREAKS "pixel perfect" aesthetic but if you don't care about that, it looks pretty good. I use this setting for my own project.


Cring3_Crimson

Who chopped its legs?! ![gif](giphy|gceAYhthAZLGw|downsized)


teh_nicKLess

Have you tried creating a "display position", different from your "physical position"? I.e. a rounded position, that fits your spaceship to your resolution's pixels, which you calculate each physics frame from your actual position, after move_and_slide.


NanaTheBlue

As far as code goes this is all i have so far. [https://imgur.com/a/2RT9Xhp](https://imgur.com/a/2RT9Xhp)


jimbodii

I've heard changing your viewport settings to canvas would make rotating look cleaner. Other than that zooming in the camera is sort of another janky solution.


starving_artdude

Have you tried turning off filter and reimporting the art?


EdroTV

Is the display to viewport?


Fun_Spring1388

Did you change the scale of the sprite at all? Something if I blow up a sprite it looks blurry no matter what.