# What is this blur/antialiasing effect in the game engine?

What is this (unwanted) blur/antialiasing effect that I have in the game engine? The effect worsen with the distance from the camera. Also, it seems to increase in a discrete (not continuous) manner. It also affects my bumping maps. I tried to change the AA setting but it didn't work.

• It has to do with anisotropic filtering. See here: blender.stackexchange.com/a/62941/16835 – CGEffex Apr 28 '17 at 17:12
• I have read a bunch of theory about texture filtering (Nearest-neighbor, Bilinear, Trilinear, Anisotropic, etc), Mip maps, Rip Maps and so on. I feel like I do grasp these topics now. However I still have doubts about Anisotropic filtering, namely the way the trapezoidal footprint is calculated and applied. – Nicola Masotti Apr 29 '17 at 17:59
• This article by [Nvidia] (geforce.com/whats-new/guides/aa-af-guide#1) is what confuses me even more. It seems to relate the concept of Anisotropic filtering to MIP map 'scaling' (thus, RIP maps?). Other resources treat these as related, but still independent topics. In the end I was able to improve the visual quality of my model but I feel like I do not understand what is going on underneath the BGE surface. – Nicola Masotti Apr 29 '17 at 18:04

## 1 Answer

This is related to mipmap settings, you can change in user preferences > systems > mipmap

But this only work inside blender.

In game (standalone) you need a script.

from bge import render

render.setMipmapping(0)


related: Python API

• Thank you, render.setMipmapping() did actually change something. So did render.setAnisotropicFiltering(). To my understanding the, Mipmaps and Anisotropic Filtering settings under "Blender User Preferences" are ignored in the Game Engine. However I'm not sure about GPU Mipmap Generation and 16 Bit Float Textures. Also, the documentation says the return values for render.getMipmapping()should be RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR but there are actually exposed as numbers: 0, 1 and 2. – Nicola Masotti Apr 29 '17 at 13:49
• There are several other things I do not understand. Do RAS_MIPMAP_NONE, RAS_MIPMAP_NEAREST, RAS_MIPMAP_LINEAR refer to the way the mipmaps are generated (Nearest-neighbor interpolation, Linear mipmap filtering etc, as described in [wikipedia (en.wikipedia.org/wiki/Texture_filtering). Does this mean that BGE does not support Bilinear Filtering? How many MIP maps are generated when I turn this on? and when? – Nicola Masotti Apr 29 '17 at 14:02
• RAS_MIPMAP_NONE = 0, RAS_MIPMAP_NEAREST = 1, etc. And yes they refer the way the mipmaps are generated, but im not sure about bilinear. and don't really know how many mipmap are generated. – Strapicarus Apr 29 '17 at 16:29
• GPU Mipmap tells if you want generate the mipmap with GPU (active) or CPU (deactive), about 16 bit float textures i really don't have any idea. – Strapicarus Apr 29 '17 at 16:36
• i found this short references http://bgepython.tutorialsforblender3d.com/Render/setMipmapping – Strapicarus Apr 29 '17 at 17:56