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

Force mipmap even if textures are the wrong size #3087

Merged
merged 2 commits into from Jul 24, 2016

Conversation

mezz
Copy link
Contributor

@mezz mezz commented Jul 13, 2016

This is another way to solve the issue stated in #3082
Basically, some modded textures are reducing the mipmap level of everything, making the game look terrible. I want to keep the mipmap level at the player's setting instead of letting these weird-size textures lower it.
mipmap level 0 (crop)
mip0

mipmap level 4 (crop)
mip4

Difference from the last PR:

  • Forces all textures to be mipmapped, instead of causing missing textures. This means the odd-sized textures may have mipmap artifacts, but at least they are not missing.
  • No config option (you can just turn off mipmapping and it will look like it did before)

Here are some examples of the artifacts introduced on strange textures:

16x16 no artifacts, works normally

15x15 definitely seeing some artifacts, but at least it's not a missing texture

4x4 looks fine

From very far away, the 15x15 texture has texture bleeding. In this example it is bleeding with a red texture which is the worst case scenario.

@LexManos
Copy link
Member

LexManos commented Jul 13, 2016

A little bleeding very far away is not an issue, and having the artifacts only on oddly sized texture is fine.
There are some tricks that can be done to the stitcher to make this look better however, as long as we have a major warning to the log/user about WHICH mods are causing this issue we can have them report to the correct one.
And doing it this way doesnt have the side effect of "poof your textures don't work anymore!"
Also, as a 'solution' for players while they wait for the modders to fix their stuff is to just turn down the mipmap level in the config screen.

Plus, from your previous PR it sounds like the 'odd' texutres are not terrain texture. And we'd never see this in actual world.

@mezz
Copy link
Contributor Author

mezz commented Jul 14, 2016

I agree, I think this is an improvement over the last PR. The only problem is that people will not fix their textures, but the PR makes it less of an issue really.

Here are the warnings from this PR (the Forestry warnings are textures I broke on purpose for testing):

[16:55:58] [Client thread/WARN]: Texture forestry:textures/items/biomefinder.png with size 15x15 will have visual artifacts at mip level 4, it can only support level 0. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:58] [Client thread/WARN]: Texture forestry:textures/blocks/wood/planks.papaya.png with size 17x17 will have visual artifacts at mip level 4, it can only support level 0. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:58] [Client thread/WARN]: Texture forestry:textures/blocks/wood/planks.poplar.png with size 24x24 will have visual artifacts at mip level 4, it can only support level 3. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:59] [Client thread/WARN]: Texture forestry:textures/blocks/wood/planks.cherry.png with size 15x15 will have visual artifacts at mip level 4, it can only support level 0. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:59] [Client thread/WARN]: Texture totemic:textures/blocks/tipi.png with size 40x40 will have visual artifacts at mip level 4, it can only support level 3. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:59] [Client thread/WARN]: Texture simplycaterpillar:textures/block/pieces/wood_piece.png with size 11x11 will have visual artifacts at mip level 4, it can only support level 0. Please report to the mod author that the texture should be some multiple of 16x16.
[16:55:59] [Client thread/WARN]: Texture forestry:textures/blocks/wood/planks.pine.png with size 4x4 will have visual artifacts at mip level 4, it can only support level 2. Please report to the mod author that the texture should be some multiple of 16x16.

Added Lex's TextureDump code as a new Forge debug mod.
The texture atlas looks fine, all the large strange-size textures are up by themselves with space around them (the lime green box and the wood texture above it), and the ones smaller than 16x are packed into a 16x spot (see smaller forestry wood textures near the middle, below the hives and door textures).

texture_atlas_dump_textures_mipmap_0

texture_atlas_dump_textures_mipmap_1
texture_atlas_dump_textures_mipmap_2
texture_atlas_dump_textures_mipmap_3
texture_atlas_dump_textures_mipmap_4

@Actuarius Actuarius added the Feature This request implements a new feature. label Jul 14, 2016
@Actuarius
Copy link

@mezz added labels [Feature]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This request implements a new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants