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

Texture Interpolation "Closest" not exported #389

Open
H4kor opened this issue Dec 25, 2020 · 3 comments
Open

Texture Interpolation "Closest" not exported #389

H4kor opened this issue Dec 25, 2020 · 3 comments
Labels

Comments

@H4kor
Copy link

H4kor commented Dec 25, 2020

OS:
Linux

Godot version:
v3.2.3

Blender version:
2.91

Issue description:

When setting the interpolation of a texture to "Closest" this setting is not reflected in the exported scene, resulting in a blurry texture in Godot.

Minimal reproduction project:

image

  1. Create a Shader using a Image Texture (see image)
  2. Set the Interpolation to "Closest"
  3. Export to Godot
  4. Open scene in Godot: textures are blurred/do not use closest interpolation
@Calinou Calinou added the bug label Dec 25, 2020
@rcorre
Copy link
Contributor

rcorre commented Jan 6, 2021

@H4kor can you provide an example? I frequently use "closest" interpolation for low-poly texturing (e.g. https://rcorre.itch.io/modular-mech), and it seems to work fine.

You might need to change your texture import settings in godot. Make sure your texture imports with lossless compression, no mipmaps, and no filtering (I actually don't know what "filtering" does, as there's no docstring, but I've just found experimentally that I should have it turned off for low poly art):

1609943832

I'm not sure the exporter can/should do this, as is isn't necessarily responsible for exporting the png (it does automatically, but only if the texture doesn't already exist). Also, multiple materials might use the same texture, but with different interpolation settings.

@H4kor
Copy link
Author

H4kor commented Jan 6, 2021

Yes, changing the import settings and reimporting the texture fixes it. Might not be a bug but an enhancement as this can be confusing to new users at having the interpolation being exported too would be more convenient.

Here is an empty Project with just one import. Mipmaps are generated by default:
Texture.zip

@rcorre
Copy link
Contributor

rcorre commented Jan 6, 2021

Mipmaps are generated by default

I think that's the behavior of Godot, not the exporter. I don't think the exporter generates .import files at all. Though I suppose we could start.

I was thinking this was infeasible, since interpolation (e.g. closest/linear) is per-material, but import settings (e.g. filter/mipmaps/compression) are per-texture. You could have materials with different interpolation using the same texture. But I suppose that's pretty rare, and won't look good anyways, so maybe we should just assume you'd never want that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants