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

Cannot set mipmaps/filter defaults on texture imports from gltf files #52948

Closed
elvisish opened this issue Sep 22, 2021 · 8 comments
Closed

Cannot set mipmaps/filter defaults on texture imports from gltf files #52948

elvisish opened this issue Sep 22, 2021 · 8 comments

Comments

@elvisish
Copy link

Godot version

3.3 stable

System information

Windows 7 64-bit

Issue description

I've set the texture imports in both Project Settings and the node import tab, but textures still come in with filter and mipmaps on:
image
image

A gltf file exported from blender always imports like this:
image

This happens with both built-in materials and unpacked files:
image
image

Steps to reproduce

Export a gltf in blender, watch as Godot does not import with the texture defaults it's been given.

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Sep 22, 2021

Duplicate of #45206.

@elvisish
Copy link
Author

Duplicate of #45206.

The other issue doesn't mention mipmaps?

@Calinou
Copy link
Member

Calinou commented Sep 22, 2021

The other issue doesn't mention mipmaps?

It's still the same underlying cause 🙂 I edited the other issue's title accordingly.

@elvisish
Copy link
Author

The other issue doesn't mention mipmaps?

It's still the same underlying cause 🙂 I edited the other issue's title accordingly.

Just for reference of anyone coming across this, is the present solution to use a) built-in materials or separate files and b) to manually change the mipmap and filter settings on each material?

@Calinou
Copy link
Member

Calinou commented Sep 23, 2021

Just for reference of anyone coming across this, is the present solution to use a) built-in materials or separate files and b) to manually change the mipmap and filter settings on each material?

You can use non-embedded textures and change the flags on the textures in the Import dock. If you still want to use embedded textures, you'll have to use a script on the MeshInstance to toggle filter/mipmaps on its textures at run-time.

@elvisish
Copy link
Author

Just for reference of anyone coming across this, is the present solution to use a) built-in materials or separate files and b) to manually change the mipmap and filter settings on each material?

You can use non-embedded textures and change the flags on the textures in the Import dock. If you still want to use embedded textures, you'll have to use a script on the MeshInstance to toggle filter/mipmaps on its textures at run-time.

Does non-embedable mean this?

And change flags manually on each one like this?

@Calinou
Copy link
Member

Calinou commented Sep 23, 2021

Does non-embedable mean this?

Yes, but make sure the individual texture files are separate as well (i.e. not embedded within the .material) file. Also, consider using the Files (.tres) option to use a more VCS-friendly text format instead of a binary format.

And change flags manually on each one like this?

Yes, but you need to do it from a script or your changes will be lost upon running the project or reimporting the glTF (depending on whether you've set materials to be kept on reimport).

@elvisish
Copy link
Author

Does non-embedable mean this?

Yes, but make sure the individual texture files are separate as well (i.e. not embedded within the .material) file. Also, consider using the Files (.tres) option to use a more VCS-friendly text format instead of a binary format.

And change flags manually on each one like this?

Yes, but you need to do it from a script or your changes will be lost upon running the project or reimporting the glTF (depending on whether you've set materials to be kept on reimport).

In my experience:

  • glTF cannot be made into insrtanced scene easily, so useless if I want to add a script or collider.
  • glb + seperate materials take up glb size * 2 due to the materials having the images embedded in them
  • glb + tres takes up 10x space as tres is awful for storing texture images
  • all the above are useless at following the project import settings (filter, mipmaps) and just totally ignore that part, leaving you to manually fix each and every texture import setting
  • gltf + serperate material or tres takes up about 1/4 as much space (tres slightly less) as glb built-in and respects import settings but no isntanced scenes (and the folder looks terrible with 20 files instead of 1)

So far, I've found no good solution for importing an object, having it respect my texture import settings and being able to turn it into an instanced scene to add scripts or colliders or whatever to.

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

No branches or pull requests

2 participants