Issues:
Mip-mapping is a pretty good method to avoid ugly moire effects on textures and allows faster texture handling.
On the other hand automatic Mip-mapping does not always create the best solution.
Unfortunately the BGE supports automatic mip-mapping only. It belongs to all objects or none.
Use cases:
high contrast textures like shapes, fonts
GUIs.
2D-style games
Cartoonish games etc.
My suggestion:
A) allow to enable/disable mip-mapping at object level
B) allow to use custom mip-maps beside automatic mip-mapping
Benefits:
A)
Allows sharp and high contrast textures on selected objects
B)
Better control over the texture appearance by the game designer.
Drawbacks:
A)
I can’t see any drawbacks
B)
more complexity on setup
Workaround:
The only workaround I know is to scale up the texture with an image processor (without filtering).
Remarks:
I have no idea how complex such an implementation would be. I just know that OpenGL supports that.
A)
The GUI needs a flag to disable Mip-Mapping on Object
The Python API needs an attribute to read and write this flag on the fly
B)
The GUI needs some options to set mip-maps maybe with texture panel?
I’m guessing that Wendigo is using the Candy build (I thought mokazon added image sampling)…? Anyway, I’m not sure of the need to have it exposed to Python, as it’s not often that you would want to change the interpolation of an image in-game. However, I am all for this, since it’d mean no more need to use the “No Mipmaps” command in Blender and the BlenderPlayer (for my 2D / pixelly games).
The Mip-Map setting in Texture seems to be a good switch. As I said it did not work for me (2.65.0 r53189) and I manually had to switch off interpolation to see the sharp texture in texture preview (still blured in 3D Window). Maybe something else needs to be chekced/unchecked?
In blender itself I can only see the scene without Mipmapping when I disable MM in the user preferences (though this only works for all or none).
But on export as runtime the result is as shown in the screenshot.
I just unchecked “Mipmap” under “Image Sampling” that was all.
I am having the same trouble as Monster with the mip-mapping options in “image sampling”. What graphics cards are you guys rocking? I have an AMD HD 7750, so ATI vs nVidia could be the problem.
Ok everyone.
Did everyone here including (@Monster) not realize that @Wendigo’s per-object mipmapping script worked (???)
It even works in Vanilla (Legacy) BGE (!)
@Murilo_Hilas You can edit per-object mipmaps without python but it is not user-friendly. -_-
I doubt many people know that this works for the game engine. (sometimes?? weird)
Outliner > data-blocks > the texture you want to remove mipmaps > uncheck mipmaps/interpolation. It works.
The logic won’t work properly until the Shading to Multitexture or GLSL (Blend file was made in a non-official BGE version thus corrupting the blend file)
Logic-Bricks are needed to work with the script as shown in the blend file.
Here, I whittled down the script and attached it to one of the cubes so it removed mipmaps. It should work for whatever object it is attached to in GLSL mode. mipmap_bge1.blend (488.0 KB)
I was gonna say thank you as well for the code above. I’ve been looking for a method for disabling mipmaps on video textures for ages and the one you posted seemed to do the trick for me.