Game Development Community

Disabling MipMapping

by Torbjorn Leksell · in Torque Game Engine Advanced · 12/03/2006 (1:53 pm) · 8 replies

Hello,

Is it possible to turn of mipmapping in TGEA? It is causing a lot of problems for me and I can not see any use of it for the kind of application I am making. I made a change that I think disabled the mipmapping which actually fixed all the problems that the mipmapping was causing. The problem is that it introduced a new problem that makes everything that is a few Torque units away from the player/camera look grainy which looks terrible.

Here is how it looks with mipmapping.
www.narcissisticstudios.com/screens/img02.JPG
Here is how it looks without mipmapping.
www.narcissisticstudios.com/screens/img01.JPG
Here is how I disabled the mipmapping.
GFXTextureObject *GFXD3DTextureManager::_createTexture( U32 height, 
                                                        U32 width,
                                                        U32 depth,
                                                        GFXFormat format, 
                                                        GFXTextureProfile *profile, 
                                                        U32 numMipLevels,
                                                        bool forceMips)
{
   GFXD3DTextureObject *retTex = new GFXD3DTextureObject( GFX, profile );

   numMipLevels = 1;     <<<--- New line (MipMapping)
   forceMips = false;    <<<--- New line (MipMapping)

   innerCreateTexture(retTex, height, width, depth, format, profile, numMipLevels, forceMips);

   return retTex;
}

I would be very grateful if there were anyone that would like to help me with this.

#1
12/03/2006 (4:53 pm)
I don't quite understand the problem (maybe if you explain what you find wrong about the first image?), you disabled mipmapping and it looks horrible? well, yep. That's what disabling mipmapping will do... There's a reason for it being there in the first place.
#2
12/04/2006 (3:08 am)
The point with mipmapping is to eliminate jaggy edges that results from resizing the texture at range, which is why it looks crap when you disable it. I would suggest that you look into anistropic texture filtering.
#3
12/04/2006 (4:30 am)
@Magnus: Our main problem has been that mipmapping is causing yellowish outlines on things like interiors, foliage and decals which look really bad. The problem can often be avoided by tweaking the assets but that can take a lot of time and will not always work. The images I posted were only to show the grain effect that was caused by my hack.

I thought mipmapping was only used to increase the performance but after some extra research it seems that I missed the cosmetic side of the technique.

@Stefan: I can find information about anisotropic texture filtering and such for TGE but I have not been able to find anything for TGEA as it is based on DX. I have no skills in 3D programming and if you or someone else could give me some directions where to start it would be great. Would anisotropic texture filtering remove the artifacts or would it just make the problems less noticeable?
#4
12/04/2006 (5:10 am)
Quote:
Our main problem has been that mipmapping is causing yellowish outlines on things like interiors, foliage and decals which look really bad. The problem can often be avoided by tweaking the assets but that can take a lot of time and will not always work. The images I posted were only to show the grain effect that was caused by my hack.

This is not normal. What sizes of textures are you using?

Quote:
I can find information about anisotropic texture filtering and such for TGE but I have not been able to find anything for TGEA as it is based on DX. I have no skills in 3D programming and if you or someone else could give me some directions where to start it would be great. Would anisotropic texture filtering remove the artifacts or would it just make the problems less noticeable?

It is possible via D3D too, though I am not sure it has been supported by TGEA yet.
#5
12/04/2006 (5:46 am)
@Stefan: We are mainly using 256x256 textures for our foliage and 512x512 for our interiors. The foliage problem is manly due to translucency and requires a lot of work for it to look good when mipmapping kicks in. The problems we are having with interiors are that we are using a large amount of uniquely textured tiles put together in 3D world studio. When they are rendered in TGEA it causes yellowish lines to show between the tiles and the lines get thicker and more noticeable the further away they are viewed.

Image of the tiled ground with error.
www.narcissisticstudios.com/screens/img03.JPG
#6
12/04/2006 (6:24 am)
I have no idea what that is, and I have yet to see something like it. Perhaps someone else has.
#7
12/04/2006 (7:11 am)
I dont know if this is the same problem but I had a problem like this back in half-life using hammer. Bigger textures wouldn't align correctly in hammer. I actually made a tutorial on it.
articles.thewavelength.net/312/

If it is the same problem, you need to make oversized textures then apply to an oversized tile, then resize the tile.
#8
06/14/2010 (1:32 pm)
What file exactly did you modify to disable mip mapping? I'm actually looking to do this in TGE.