Disable Mipmapping With OpenGL?

Hey. I was wondering if it’s possible to disable mip-mapping through OpenGL function calls (with the BGL module)? I tried a quick set to glTexParameteri, but that didn’t influence the textures. Is it possible?

EDIT: While you could do it in Blender with the “No Mipmapping” option and in a standalone executable with a command line option, it would be easier all around if it’s possible with OpenGL. Customization would also be a nice feature.

I’ve tried it before, also without much luck.
Only thing that works for me is a “mosaic” GLSL shader, but thats really silly to to disable mipmapping in GLSL for a texture that is originally without mipmapping.
In Textures menu, under “Image Sampling” there is “MIP Map” checkbox, but it is non functional in BGE, so maybe if I wrap my head around how this works, I could add it as a feature in Candy branch.

I have one question on minimap .

by disabling the minimap is possible which the graphic card make more effort ? (so major heat > C°)
ask because when I tried to disable it
I had overheating problems (but it could also just a coincidence, radiators was dirty …)

@martinsh - That would be absolutely fan-TASTIC if you could get it to work. I would seriously appreciate it. :smiley:

@MarcoIT - I don’t think that it makes much more work for your graphics card to disable mipmaps, but I don’t really know.

ok thanks :wink:

SolarLune - I actually started working on this yesterday. I have added a button to game options in the material for enabling it per-material. (You cant do it per texture unfortunately, as it seems all textures are merged together, and then mipmapped) I’ll also so if I can get a python command for it or something. This will be in the Candy branch of course :wink:

That would be absolutely AWESOME. Thanks a lot! Even if you can’t do the Python command, it’s extremely useful to have the capability hard-coded into the BGE, rather than the workaround that has been the only option up until now. Do you think you could add different filtering methods, too, or would that be too hard / not useful enough (I just know that there are different settings, not which particular ones are useful)?

P.S. When are you planning to build another version of the engine for Windows (32-bit or 64-bit, I don’t care)? :smiley:

SolarLune - hmm what sort of filtering methods do you mean?

Well, there’s OpenGL filtering modes that can be applied to textures - Nearest, Linear, etc., right? Would it be worth implementing those?

not sure, I’ll just keep it as is for now. When i’m done i’ll commit to the branch and you can try building it yourself if you like. I’d upload a new build, but my internet is going really slow right now…

What I have noticed lately on my not-so-powerful computer, disabling mipmaps indeed slow things down quite a bit. I have not really looked into this, but I am pretty sure they are meant to optimize stuff like LOD, so GPU does not have to draw full-sized texture in the distance.

edit: also I am not sure if texture filtering is the same as mipmapping… i dont think so. Mipmapping should just resize texture. I think you could still leave mipmapping, but disable texture filtering at all.

@martinsh: So using .DDS can speed up things?, i open a .DDS with gimp it open 10 Layer image, Layer 1 named Texture (1:1 scale), other 9 Layers named “MipMap” (progressive reduced scale), but its file size its like +10X than a JPG or PNG, so i dont understand, if its a lightweight or not in-game.

[SELF-REPLY] :stuck_out_tongue:
I investigated DDS, and i am fully migrating to DDS, because:

  • Game Engine and CPU do NOT process this format, its used directly by the Video Card.
  • Uses up to 10 times less video memory (textures are stored directly into video memory).
  • Good quality compression. Its ZIP compressed. Uses CUDA Hardware acceleration if present.
  • Loads and Render 25% faster than JPG or PNG, support Alpha, and can be Seamless Tiled.
  • File Size can be 10 times bigger than JPG or PNG (at equal quality).

Runs into Gimp to start converting…

Only problem is that while Blender/BGE support DDS textures, they don’t make use of the DXT compression. DDS textures get uncompressed and sent to the GPU as raw pixels (like any other format). Cucumber has proper DDS/DXT support.

They say that DDS dont get handled to much by any game engine, they managed directly trough the video driver/hardware…

And reading more i find that JPG are not designed for 3D, since they are not meant to be viewed from arbitrary angles, just 1 angle, front.

[EDIT] i find this:
…mipmap and normal map generation, format conversion and compression.
GPU-accelerated compressor that uses CUDA and is one order of magnitude faster.

http://code.google.com/p/nvidia-texture-tools/

Okay,now I got it.
I was using DDS and I saw many threads complaining about DDS, and I had no idea why.
Now I know,and too bad blender only loads them.
But good to know Cucumber branch already fixed this!