API - AnisotropicFiltering vs. Graphics - Antialiasing

Is the Python method, bge.render.setAnisotropicFiltering(), relatively the same as the game setting anti-aliasing? If not, what’s the difference.

AF can be set AA can’t

but if you use upbge you need to look in to their documentation, i believe they added the option for AA.

What does bge.render.setAnisotropicFiltering() even do then if it isn’t anti-aliasing?
Note: I already know what anti-aliasing is.

look at my launcher’s movie, you can see what it does there.
basically it sharpens the image at distance

Another question: is there any way for bge.render.setMipmapping() to be set individually per-scene?

Game scene → bge.render.setAnisotropicFiltering(2) (for average texturing).
HUD scene → bge.render.setAnisotropicFiltering(0) (for pixel perfect icons).

i don’t believe so, thought its engine based and not scene based.
but you can try to run 2 scripts 1 each scene and see if that works

I have already tried using two different scripts, numerously.
They don’t work as expected because my HUD’s init code always overrides my game’s init code.

Also; sorry if I’m nagging, but I just remembered I also have a second question.

what second question?

How to get this working.

I do not see a question, i see an answer. (that also answers your #2 question)

well i guess…not, if it isn’t working then it won’t work.
can tell you to use libload but that will have the same effect i guess, due to it’s an engine setting not a scene setting.

The current setup isn’t working for me at this time.

So you want better text?

as text object?
set the .resolution higher with python for example:

var = text['blabla']
var.resolution = 5

if you want bitmap text, look it up there are at least 3 methods(in resource section) to use a texture as text.

No, my text’s resolution isn’t a problem, at least because my text are displayed using the BLF module. The issue are blurry icons.

If I do bge.render.setMipmapping(0), I get good looking HUD icons, but ugly looking textures in my game scene, and vice-versa if I do bge.render.setMipmapping(2).


How do you make icons? plane with a texture?
what are your hud camera settings? same as the level scene?
for hud do you use ortho view camera?

i personally never encountered this problem, bit strange

I make my icons by texturing a primitive plane object.

My HUD camera is set to perspective type: ortho, with its distance value set to 16.


Countless times with other games, I’ve noticed their icons aren’t blurry at all to me. Currently I’m working on BGL texturing as an alternative, hopefully that’ll fix my current issue.

As I mentioned above, when I do bge.render.setMipmapping(0), it makes my HUD icons look OK. But then my game textures are now set to the same type of mipmapping my HUD has… and vice-versa if I switch the types.

You could change the resolution of the text in property panel:
Properties>Font>Shape>Resolution>Render U to your desired level,
eg; Render U: 5

BGE uses the preview resolution when the Render resolution is at 0.

Hi, I assume you’re Chaosfuchs? Since creating this thread I’ve found that UPBGE 0.2x offers LOD Bias per-texture, something that BGE never had. This solves my issue. Likewise, UPBGE 0.3+ has per-texture mipmapping via the image texture nodes.

Side note, text resolution was never the issue, as I mentioned above in this thread, it was texture mipmaps. BGE doesn’t support Blender text resolution. Only via API with KX_FontObject.resolution. Honestly, it’s not a very good function, as it only solves bluryness caused by camera distance, not actual text poly count. But again, the BGL module can be a good alternative anyhow surrounding that issue.