How to import pixel art in Godot 4?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MadTinkerer

I’ve been trying to get the hang of the nightly Godot 4 builds with some success. I managed to completely port over a small project from 3.4 and have it work exactly the same in 4. But the new import tab is perplexing me. I want to import 2D textures as crisp pixel art just like you can in previous Godot versions, but I can’t find the options in the import tab.

Needing to restart the editor to change presets doesn’t help, but at least the editor restarts in a couple seconds.

:bust_in_silhouette: Reply From: Bird202

I don’t believe you have to import again just go into the Texture drop-down in the Inspector and change it from “Inherit” to any one that says “Nearest”.

It should be in" Canvas Item > Texture > Filter". Set it to Nearest. Also, you can set it to “Nearest” on the parent node and leave the children nodes as “Inherit” and they will use the crisp pixel look.

In inspector look in Canvas Item → Texture → Filter

Hope this helps.

Yes, that’s exactly what I was looking for! Thanks!

MadTinkerer | 2021-12-10 03:32

Hi, I wanna change a material texture to nearest not a Node2D inherited node, and it doesn’t have those properties you mentioned

JayJay99 | 2022-03-16 12:34

If you are referring to a material that you assign like “StandardMaterial3D” then go into the material “resource” and look for the “Sampling” tab. It will be the tab sitting under the “UV 2” tab. The “Filter” option should be Sampling’s tab if you expand its parameters, and it defaults to “Linear Mipmap”. You can change that to “Nearest” or “Nearest Mipmap”, etc…

Take care, and good luck!

Bird202 | 2022-03-16 13:13

:bust_in_silhouette: Reply From: rockgg

go to Project Settings > General > Rendering > Textures. set the default texture filter to nearest.

:bust_in_silhouette: Reply From: Zodman

#Godot 4.0.1 instructions

  1. Turn on Advanced project settings
  2. Navigate to Rendering | Textures
  3. Turn on Lossless Compression | Force PNG
  4. Set Canvas Textures | Default Texture Filter to Nearest

Instructions on Gist