How to fix the texture when import gltf files from Blockbench

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

I’m importing a model from Blockbench. The model has been exported using Blockbench’s gltf export function.

At first, the texture looks blurred in the editor, but by editing the Material → Albedi → Texture → Flags, and clear the Filter flag, the texture looks ok in the editor. (I’m after the pixel art look).

However, once I run the program, the texture is back to its blurred state:

From what I understand, it should be possible to get the texture to use a nearest neighbour strategy instead of blurring. However, I cannot seem to figure out how to do it.

:bust_in_silhouette: Reply From: klaas

select the texture, click on import (the second tab at the scene tree) deselect filter under flags and click reimport.

That option is not available to me when I import the gltf file. Do you mean that I should import the texture separately?

e8johan | 2021-08-03 18:01

So the texture is embedet into the gltf file?

Does the filter flag gets reseted when you reopen your project?

klaas | 2021-08-03 20:08

Good find - yes the flag gets reset every time I re-open the project. Do I have to somehow separate the texture from the model?

e8johan | 2021-08-04 11:07

I dont know how you import your gltf. Most of the time godot warns you about unsaved properties when opening or closing certain files.

Maybe you have to import the file and right click it and select “enable editable children” to save those properties.

… or with a "custom"material and texture this should be working.

klaas | 2021-08-04 11:19

Given your pointers, I went to the material, made it unique and saved it. Then I selected each and every mesh in the model and reapplied the material. This way I could make the filtered = false setting stick.

Now, the question is - how can I make this convenient :slight_smile:

e8johan | 2021-08-04 12:21

Have a look here …
Importing 3D scenes — Godot Engine (stable) documentation in English

Till the end there is a section about import and materials.

klaas | 2021-08-04 12:35