Page 1 of 1

mip map distance

Posted: Tue Sep 20, 2005 4:05 pm
by Pr3t3nd3r
cand anyone give me some sugestions how i cand cange the distance at what the mip maps are generated and used ?

Posted: Fri Sep 23, 2005 11:24 am
by Pr3t3nd3r
OK OK. please. not all in the same time.

The answer (basically this seems to be the universal answer i get ...) is it is impossible.
Mip map are used when they are need'it and that' id you can't change that.

The problem is that mip maps gets blurred. And very small texture 32/32 and lower are so blurred that them are containing much useful information...

An way to get better textures (non blurred) will be an bether algorithm for:

copy32BitMipMap
copy16BitMipMap ...

Posted: Fri Sep 23, 2005 11:37 am
by Spintz
After a quick 2 second search through DirectX 9 Help File

http://msdn.microsoft.com/library/defau ... exture.asp

Notice the 3rd parameter, specifying the # of mip map levels for this texture.

Quick search through Irrlicht code for CreateTexture in DX9 code revealed -

Code: Select all

	hr = Device->CreateTexture(
		TextureSize.Width,
		TextureSize.Height,
		1, // mip map level count, we don't want mipmaps here
		D3DUSAGE_RENDERTARGET,
		d3DFormat,
		D3DPOOL_DEFAULT,
		&Texture,
		NULL);
and

Code: Select all

	hr = Device->CreateTexture(optSize.Width, optSize.Height,
		mipmaps ? 0 : 1, // number of mipmaplevels (0 = automatic all)
		usage, // usage
		format, D3DPOOL_MANAGED , &Texture, NULL);
and

Code: Select all

		hr = Device->CreateTexture(optSize.Width, optSize.Height,
			(flags & ETCF_CREATE_MIP_MAPS) ? 0 : 1, // number of mipmaplevels (0 = automatic all)
			0, D3DFMT_A1R5G5B5, D3DPOOL_MANAGED, &Texture, NULL);
Seems this is used, because of some bug when linking in DX8

D3DXFilterTexture

The engine would need some modifications, but it's more than possible.

Posted: Fri Sep 23, 2005 2:41 pm
by Pr3t3nd3r_guest
Is used 1 because it use
copy32BitMipMap
copy16BitMipMap

I don't know if using the automatic generated textures generated by direct x will get better quality ... (i think they use the same algorithm ...)

... a possibility to manually add all mip maps will be cool too ...

Posted: Fri Sep 23, 2005 2:45 pm
by Pr3t3nd3r_guest
an other think i love to test if is possble is to disable textures from 32/32 and lower resolution (and to use for them 64/64) ...

Posted: Sat Sep 24, 2005 9:12 am
by puh
Tip: try to comment the line #define _IRR_COMPILE_WITH_DIRECTX_8_ in file IrrCompileConfig.h and recompile Irrlicht. You will notice that mip-map levels will have much more quality... But DirectX8 will be disabled...