How do I export pixel art for a game engine like Unity or Godot?
For a game engine export at 100%, the real size. The engine scales it up on screen. 1000% is only for posting your work.
In Aseprite:
- One sprite: File > Export As, Resize 100%, PNG.
- Animation or a set of sprites: File > Export Sprite Sheet, Resize 100%, PNG.
- Tiles: keep them on one grid, the same as your tile size, like 16x16. A sheet of 128, 256 or 512 px works well.
In Unity:
- Select the image, Texture Type: Sprite (2D and UI).
- Filter Mode: Point (no filter).
- Compression: None.
- Pixels Per Unit: your tile size, like 16.
- Add a Pixel Perfect Camera to keep pixels square when the game moves.
In Godot 4:
- Project Settings > Rendering > Textures > Canvas Textures > Default Texture Filter: Nearest.
- Import as PNG, no lossy compression.
If your sprite looks blurry in the game, its almost always the filter. Set it to Point or Nearest.
In the course
- Lecture 7: Aseprite Colors and Settings
- Lecture 69: Introduction To Tiles, Tilesets, And Tilemaps
- Lecture 70: Let's Build a Pixel-Perfect Tilemap!