Skip to main content
gamedev.net
🔒 Locked

mip map creation

Started by wxb1 Dec 27, 2004 at 10:18 AM 4 replies 1.6k views
Original Post
wxb1
wxb1
I'm using dx7 and I'm creating my mip map chains via box filtering for the mip maps... each mip map is quite blurry and quite ugly in game... I've played with the settings lodbias, maxmip level and etc... but I think it's the mip map data itself... it just not pretty... I looked around for better creation method of mipmaps... I found a "kaiser" method but not code or algorithmn (i'm being a little lazy)... Can anybody make a suggestion? what method does dx9's automatic mip map creation process use? How does it look?
Muhammad Haggag
Muhammad Haggag
If by "automatic mipmap generation" you mean what D3DXCreateTextureFromFileEx does, it uses box filtering by default.

Namethatnobodyelsetook
Namethatnobodyelsetook
The mipmap filtering D3DX uses isn't great, as it's meant to run at a decent speed on an end machine. Find some offline mip generation utility (I think nVidia and ATI both have one, though nVidia's might be part of a Photoshop plugin for saving DDS) that can create mipmaps and save DDS files. DDS files are often used for compressed DXTn formats, but can actually contain any D3D format surface, and can include mip maps. If you use such a DDS mip generation utility, not only will your graphics be higher quality, your game will load slightly quicker too.
wxb1
wxb1
I thought about making the mipmaps offline but as you can tell the engine I'm using is older since it's based on dx7 and uses box filtering to generate the mipmaps at run-time... I was hoping to find a nice algorithmn on the internet that I can put into the code I have... generating them at run-time fits better into the flow of how the code currently works... Thanks for your suggestions... you've pretty much confirmed what I already thought... :)
S1CA
S1CA
As always, this is one of those performance versus quality things, any method that's quick enough on a low end machine isn't likely to give the quality you want, and something that takes a minute per mip level is likely to make your load time prohibitively long. So I too reckon that offline mip map generation is the best plan if quality matters this much to you!

If the reason for not wanting to compute offline is to do with distribution size (e.g. keep the download size low), then have you considered computing offline at installation time or when the application is first run?


The following two articles and accompanying code by Jonathan Blow from his Inner Product column in Game Developer Magazine should be of interest to you

http://number-none.com/product/Mipmapping,%20Part%201/index.html

http://number-none.com/product/Mipmapping,%20Part%202/index.html


And some more recent discussion from the GD-Algorithms mailing list, such as this one by Jonathan discussing correct mip-mapping of the alpha channel:

http://sourceforge.net/mailarchive/message.php?msg_id=9640454
Simon O'Connor | Technical Director (Newcastle) Lockwood Publishing | LinkedIn | Personal site
wxb1
wxb1
Thanks for your response... I got both these inner product pages bookmarked already! I read that article before posting but I wanted to get so ideas from you experts! I'll check the GD link you posted as well...

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.