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

Video VRAM texture import setting not reimporting properly #10221

Closed
Zireael07 opened this issue Aug 10, 2017 · 15 comments
Closed

Video VRAM texture import setting not reimporting properly #10221

Zireael07 opened this issue Aug 10, 2017 · 15 comments
Assignees
Milestone

Comments

@Zireael07
Copy link
Contributor

Zireael07 commented Aug 10, 2017

Operating system or device - Godot version:
Win 7 x64
Godot 3.0 alpha 1

Issue description:
Pictures are worth more than a thousand words.

godot_v3 0-alpha1_win64_2017-08-10_11-20-19

The only practical difference between the left and right road is the size. Both roads are made of a sequence of quads using the same material. See how one road shows the middle markings (at this zoom level) and the other doesn't. If I zoomed in more, the other one would start showing too.

(The ground is a single quad too, but the bug isn't noticeable on it probably due to its size)

godot_v3 0-alpha1_win64_2017-08-10_11-19-27

Same scene, now angled. See how all the middle markings disappear giving way to a uniform black?

A gfycat because you can see how the angle affects the markings (both middle and side) disappearing.
https://gfycat.com/gifs/detail/YellowOldGalapagosdove

The final angles are extremely close to the angle my in-game camera uses.

The issue is present both in editor and in game.

Steps to reproduce:

slap a texture with some detail on a mostly uniform background on a quad, zoom and angle camera

Link to minimal example project:
If a minimal example is really needed, I believe I could whip one up today or tomorrow.

@Zylann
Copy link
Contributor

Zylann commented Aug 10, 2017

mipmap issue?

@Zireael07
Copy link
Contributor Author

Checking/unchecking mipmaps on texture used in material doesn't change a thing, it was the first thing I tried.

@Zireael07 Zireael07 changed the title Rendering glitches in 3.0 alpha 1 Mipmap related rendering glitches in 3.0 alpha 1 Aug 10, 2017
@Zireael07
Copy link
Contributor Author

I looked at #7164 and in my case, the mipmaps setting doesn't change a thing for video vram mode, but it does for uncompressed (I can import uncompressed with mipmaps on, untick, reimport and see the change, while untick+ reimport fails to do anything observable in video vram mode)

So it is either a rendering problem or a mipmap not getting cleared/setting reset problem.

@Zireael07 Zireael07 changed the title Mipmap related rendering glitches in 3.0 alpha 1 Video VRAM texture import setting not reimporting properly Nov 4, 2017
@Zireael07
Copy link
Contributor Author

Bump.

Still an issue as of alpha 2.

@NathanWarden
Copy link
Contributor

Watching your animated Gif it looks more like a shading bug that I've seen a few times. You may want to try putting a much lighter texture on that (solid white?) and see if it turns black at those angles.

@Zireael07
Copy link
Contributor Author

Zireael07 commented Nov 7, 2017

If I untick mipmaps and switch to uncompressed, the issue is gone. So it's definitely related to mipmaps.
As I said above, unticking mipmaps in video vram does nothing at all.

(It's possible there's two bugs at play here, one related to mipmaps unticking not doing anything and the other may be what you say, I will check with a white texture and report)

EDIT: Two textures are in the zip: https://www.dropbox.com/s/wken5p4n4w9ocrw/textures.zip?dl=0

@NathanWarden
Copy link
Contributor

@Zireael07 Thanks for the road texture. It did make it easy to reproduce. Ticking "Anisotropic" filtering on in the import settings seems to get rid of most of it. However, I don't think this is a bug and is intended functionality as this is one of the ways that mip maps work. Here are two screenshots from Unity using the same setup and it has a very similar problem when Anisotropic filtering is turned off.

Aniso Off (Unity)
aniso_off

Aniso On (Unity)
aniso_on

Here's an excerpt from the Computer Graphics section for Anisotropic filtering on Wikipedia:
"Anisotropic filtering (AF) is a method of enhancing the image quality of textures on surfaces that are far away and steeply angled with respect to the point of view."

Hope that helps :)

@Zireael07
Copy link
Contributor Author

Zireael07 commented Nov 8, 2017

I know what mipmaps are. The problem is, if I untick mipmaps and click reimport, that means there should be no mipmapping anymore and the texture should be crispy (as is the case if I do it in uncompressed mode). If I do it in video vram mode, nothing happens (it's still blurry).

@akien-mga akien-mga added this to the 3.1 milestone Jan 15, 2018
@akien-mga
Copy link
Member

Is this still reproducible in Godot 3.0 RC1?

@bojidar-bg
Copy link
Contributor

Possible duplicate of #16079?

@Zireael07
Copy link
Contributor Author

Zireael07 commented Jun 19, 2018

The other way round, my issue is half a year older ;) (but yes they are two reports of the same problem)

@reduz
Copy link
Member

reduz commented Sep 5, 2018

This may have been fixed recently with the fix to mipmap generation, can you test again?

@Zireael07
Copy link
Contributor Author

Zireael07 commented Sep 6, 2018

Nope, not fixed as of alpha 1.

(The gif shows: mipmaps on, reimport, mipmaps off, reimport, still looks blurry.)

2018-09-06_15-41-18

@akien-mga
Copy link
Member

Quoting @reduz from #16079 (comment):

Yeah, GLES2/WebGL does not support compression without mipmaps. I can make the option disappear when VRAM is selected I guess?

@Zireael07
Copy link
Contributor Author

Please make the option disappear, problem will be solved ;)

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

Successfully merging a pull request may close this issue.

6 participants