ReMipDLX: A high-quality MIP generator /////////////////// // Description: // ///////////////// ReMipDLX is a utility program which reads Quake 1 style, 256 color MIP, WAD, or BSP files and rebuilds all the MIPs contained within. (A MIP is four images of the same texture bitmip at four sizes 1:1, 2:1, 4:1, and 8:1). ReMipDLX is designed using image-processing techniques to produce the highest quality sub-MIPs for improved visuals during gameplay. ////////////////////// // Implementation: // //////////////////// Skip to the next section if you don't care about the internal technical details. First the full-size MIP image is read and converted to 24 bit color. I then run a weighted off-center (improves contrast) average to produce a new sub-MIP pixel. While doing the averaging I also run a min/max filter and feed the results of all three into a white-noise dithering algorithm. Next, the sub-MIP is run through a sharpen filter and the result is clamped to prevent over-sharpening. Finally, if the pixel is gray, it is converted to one of the pure grays in the palette. If it was a colored pixel, it is run through a get-nearest-color function to down convert it into a 256 color image. The sub_MIP is then written out into the original file (in place). ////////////////// // How To Use: // //////////////// This program runs at the DOS prompt. Type ReMip mylevel.bsp to process a bsp file (a Quake map); then just run it in Quake as usual. Type: ReMip -help to read all about the program its parameters, version number etc. Here is a list of parameters it currently supports: -help, -? Display help on using ReMipDLX -verbose Display all sorts of extra info while the program runs. -numfullbrights The number of full-bright colors at the end of the palette. Any MIP, WAD, or BSP file which uses the standard Quake palette (color set) has 32 fullbright colors. 32 is the default. filename This must be the LAST parameter. Currently MIP, WAD, and BSP files are processed. WAD is the default file type. /////////////// // Caution: // ///////////// This is a beta version. Use it at your own risk. I have done my best to remove all known bugs, but I may have missed something. I am not responsible for any problems you encounter while using this program. Always keep a backup copy of any file you process with ReMipDLX. Remember this is a FREE program; I'm just being nice and sharing it with you! ///////////////////////////////// // Copyright and Distribution // /////////////////////////////// Copyright 1997, Neal White III I hereby grant you the rights to share this program with your friends and to GIVE away as many FREE copies of the program as you want. *********************************************************** *** I YOU PLAN TO COLLECT ANY KIND OF CHARGE OR FEE YOU *** *** MUST GET MY PERMISSION IN WRITING FIRST! *** *********************************************************** WAVER: If you provide free access to this program on your web site (like www.cdrom.com), you may distribute this program on a compilation disk with no need for written permission, as long as the other stuff on the CD or disk is also available free on the web site as well. Authors of games, level editors, and utilities may contact me for the source code. I will provide the source code on a case by case basis, just ask (I'm quite reasonable). ////////////////// // Written by: // //////////////// Neal White III nwhite@softblox.com