Tutorial [WinMip2] Using WinMip2 Overview

Lengthier learning guides you can learn more in-depth processes to improve or setup NR2003 or related tool/programs
Introduction:

WinMip2 is the primary texture conversion tool for NR2003. Whether you are adding/changing textures on a track, editing UI menu elements, or making a mod all textures must pass through WinMip2 to be converted to thier proper file type compatible with NR2003. It is recommended you use WinMip2 2.16.8, you can find out what version you are using by opening Winmip2 and going to the 'about section to verify:

1655312354627.png

Note: WinMip 2 needs theses additional files installed in your Windows/System directory to run correctly: Msvbvm50.dll of 29.04.1999 or later, MScomctl.ocx of 11.05.2000 or later. Most likely these are already installed in your system. If you get the missing files error, just look in the program folder and you'll see a folder called "Windows" copy that and drop it into your "C" drive . Inside that folder you'll also find a folder named "System 32" inside that will be the two files that are most commonly missing. I copy those two files and paste them into the WinMip2 folder loose, that usually fixes any issues.



Using WinMip2 Specifically for NR2003:

While WinmIp2 can be used for several different racing games this overview focuses on NR2003 only. NR2003 stores the graphics as "mip" or "stp", depending on the usage. All NR2003 files contain their own color palette, they are interchangeable between tracks. The data part of some of the files is DCL-compressed. WinMip 2 doesn't create DCL-compressed data parts, so the files may be a bit longer. There is no disadvantage by this when running the sim.

To Set WinMip2 make sure the NR2003 icon on the top menu bar is selected, this will put the program in NR203 'mode':

1655312544745.png


Texture requirements for NR2003:

The width and height of the images must be a power of 2, minimum 16 pixels. (16, 32, 64, 128 etc.) For the positioning of the texture within a polygon is done relatively to these values it is important to follow this convention strictly. But this makes it possible to replace mips with bigger ones. Also a 4-bit mip can be replaced by the corresponding 16-bit one. Type(0) co. to Type(3), 1 to 4 and 2 to 5.

When creating mip-files you must set the number of subimages (WinMip defaults to the maximum number of subimages. Do not change until you have specific reasons.), the file-type and the mapping.


File types:

There are 2 primary file types WinMip2 exports that NR2003 uses:

Mip: These files are primarily used for 3do model textures on tracks/mods. The width and height of the images must be a power of 2. (1, 2, 4, 16, 32, 64, 128 etc.) For the positioning of the texture within a polygon is done relatively to these values it is important to follow this convention strictly. But this makes it possible to replace mips with bigger ones. The original mip may have a size of 256x256 pixels. You may replace it by one with 512x256 or 512x512, etc. pixels to gain a sharper texture on high-end video cards.

STP: These files used for the graphical layout screens of NR2003. They are mips but without subimages and so there is no limitation in width or height. The mip part of the stp may be any of type(3 to 7) (Not the texture compressed types 10 and 11!). When doing replacement stps, they should have the same size as the ones included in the sim. Stp-files are identical for N4, NR2002 and NR2003 and can be exchanged between them without conversion.


Converting a file to NR2003 breakdown:

When you open a BMP or TGA file in Winmip there are several settings to choose when converting to a mip or stp, some are set by defult too the recommended settings. Others you may need to manually change depending on how your texture in-game is going to be used.

The right pane next to a texture will show these settings:

When texture is selected as a mip:

1655312661120.png

When texture is selected as a stp:

1655312700312.png

Both file types have the 'type' option, mips have all the other options. See a breakdown below for these settings and what they do.


Files type levels:

Type(3):
16-bit (65536 colors composed of 32 reds, 32 blues and 64 greens), all opaque. As import, WinMip asks for a 24-bit bmp.

Type(4): 15-bit (32768 colors, 32ea R,G,B) with (one) invisible color(s). As import, WinMip asks for a 24-bit bmp. The invisible color is set by pressing "shift" and click on the color in the picture with the mouse.

Type(5): 12-bit (4096 colors, 16ea R,G,B) with 16 levels of transparency. When converting a Type(5)-mip to bitmap, WinMip creates 2 bmps of the same size: One containing the picture, the other one the alpha map (trancperency map). The alpha map has the same filename as the picture plus a "_ti" at its end. As import, WinMip asks for a 24-bit bmp and the alpha map as well.

Type(6): 24-bit (16.7 M colors composed of 255 reds, 255 blues and 255 greens), all opaque. As import, WinMip asks for a 24-bit bmp.

Type(7): 32-bit (16.7 M colors, 255ea R,G,B) with 255 levels of transparency. When converting a Type(7)-mip to bitmap, WinMip creates 2 bmps of the same size: One containing the picture, the other one the alpha map (trancperency map). The alpha map has the same filename as the picture plus a "_ti" at its end. As import, WinMip asks for a 24-bit bmp and the alpha map as well.

Type(10): 24-bit, using texture compression. The texture compression reduces the video RAM needed for a texture to a quarter. So it is possible to use bigger, which will mean sharper, textures, compared to N4. However, texture compression is not lossfree. (You may know a jpeg compressed image is much smaller in filesize than a bmp, but it doesn´t look as good anymore). Usually a 512x512 texture compressed image looks better than a 256x256 not compressed image. They both need the same space in video ram. As import, WinMip asks for a 24-bit bmp. You can also set an invisible color. This is done by pressing the "shift"-key and clicking with the mouse on this color in the image. When opening a compressed mip, WinMip shows the invisible color as magenta (pink).

Type(11): 24-bit, using texture compression, with a 4-bit alpha map. When converting a Type(11)-mip to bitmap, WinMip creates 2 bmps of the same size: One containing the picture, the other one the alpha map (transparency map). The alpha map has the same filename as the picture plus a "_ti" at its end. When exporting as tga, the alpha map is included in the tga. (32-bit tga). As import, WinMip asks for a 24-bit bmp and the alpha map as well. NR2003 uses nearly everywhere the compressed texture-types 10 and 11. But naturally, you are free to use the types 3 to 7 instead. WinMip2 also accepts 24-bit tga files instead of bmps as input for the NR2003 mip/srb creation. When using tgas, WinMip doesn't read separate alpha maps. Just include these into the tga. Please refer to the manual of your graphic program on how to do this.


Subimages:

When seeing a texture from a further distance it must not be so exact and detailed as when standing right in front of it. For this reason mips contain besides the big image several smaller images going down to 1x1 pixels to speed-up the video output. WinMip 2 proposes a default value which is used by all original NR2002/3-mips. Do not change it! For NR2002/3 does not display the textures with the OpenGL rasterizer when the subimage number is not set correctly, Winmip2 lets you only choose now between no and all subimages. When creating mip-files you must set the number of subimages (WinMip defaults to the maximum number of subimages. Do not change until you have specific reasons.), the mip-type and the mapping.

The subimages are calculated by a pixel being the average color of a square of the big picture. Please consider: the RGB values of the invisible colors are included into this calculation (unlike N2!). When you choose black as invisible color this may result in a dark outline (comic look) in the subimages. The best choice is an average color between the texture and the background. This does not refer to the compressed type(10)-mips where there are no colors stored for invisible pixels.


Mapping type:

I lack for a better expression. It describes how a texture is tiled within a polygon. Values are from 0 to 3. Value 0: The texture is tiled like a mosaic into the polygon. Value 1: Several copies of the texture are aligned vertically. Value 2: Several copies of the texture are aligned horizontally. Value 3: The texture is stretched to fill the complete polygon. The values must match with the settings in the 3do. When you are unsure, which mapping flag to set, take a look at the original mip.

Breakdown of the map tiling options:
0 = Tiled on all sides
1 = Horizontal only
2 = Vertical only
3 = Stretched, no tile


Priority Level:

NR2003 mips can hold a priority value which determines how much miplevels are kept when forced to drop levels compared to other mips. One great example is the window texture on a car mod is set higher so the z-depth renders correctl and the window texture always appears in fron of the textures showing behind it. If the priority was not set higher you would see strange issues with the texture of the widnow appearing behind the interior textures. Priority also means the longer you will see this texture sharper than a texture with a lower priority. You can set the priority between 1 and 40. (In the mip it is stored as 0.1 to 4.0) Usually car textures have a priority of 8, the dashes have the highest priority of 40. For tracks, the textures in the trackmat folder have a priority of 3 or 4, while those of the trackside objects are set to 1. Feel free to do your own experiments.


Using The NR2003 Papytools Makemip and Makestp with WinMip2:

In the package of the track creation tool "Sandbox" you´ll find also tools to create stp and mip files for NR2003. These tools work with a command line in a DOS box and are not easy to handle. WinMip2 will work as a surface for them.

Setting up WinmIp2 to work with Papytools: Copy "makemip.exe", "makestp.exe" and "rts.dll" into your Winmip folder. Select or deselect the usage of these tools for the mip/stp creation in Winmip´s "Settings/Papytools" pulldown menu. When selected, WinMip2 will use these tools for the mip/stp creation instead of its own build-in code. This effects the WinMips2 surface, the NR2003 car editor and the batch conversion as well.

Why use papytools?: Well, this gives you the feel to create your textures the same way and with the same tools Papy did. They also have a compression routine which reduces the filesize. On the other hand my own conversion routines include some improvements for the texture compressed miptypes 10 and 11and the subimage creation. It´s your choice...

Note: If you notice your models with transparency have strange z-depth issues it is recommended to turn OFF makemip in winmip2


NR2003 Batch Conversion:

The batch conversion is a tool to convert several files at once. It reads the header of the original file and takes information about miptype, mapping, subimages off the original file. So you don't have to mess around with these flags and your mip will be set up correctly. However it accepts bigger or smaller bmps. It is loaded by pressing "Batch Conversion" in WinMip´s file menu. Please select NR2003 in the toolbar before starting the batch conversion!

Batch conversion steps:

Note: Batch conversion unfortunately cannot batch convert TGA's, only work with BMP to Mips/Stp's
  1. Create seperate output folders for bmps converted from mips and stps. When you select dat->bmp, the converted mip and stp-files go into the same folder, however they follow the subfolder structure of the dat.
  2. Then set the destination folder by selecting the folder in the directory list and clicking the SET button. You´ll see the complete path of the output folder in the textbox. The batch conversion overwrites files in the output folder without prior message!
  3. For creating mips and stps the batch creation tool reads the header informations of the original file. This means, the original mip/stp-file must be located in the same folder and with the same name as your bmp. When it doesn´t find the original file it looks for the original dat in the output folder and tries to find the necessary file informations.
  4. Choose the input folder by double click in the directory list and check the conversion you want to proceed in the check boxes. Then you can select one or more files to be converted as you are used by the Explorer.
  5. With a click on the START button the conversion begins. Depending on the number of files to be converted and your CPU it may take several minutes! The program should not hang; you´ll get a message if an error occurs.
  6. A message appears in the upper textbox when the conversion is done. Clicking on the down-arrow opens the conversion protocol.
Note: In order to batch convert put all your original mips and the BMP's in the same folder. When you choose an output folder choose a different directory other than the one these files are located in. It should generate new mips with the changes the BMP's had reflected in them.


NR2003 Car File Editor

The car files contain the car texture, the crew texture and the car.ini. You can import/export car and crew textures with NR20023's built-in paint shop. Besides this, the WinMip car file editor allows you to import bigger textures and to access values in the car.ini.

You open the car file editor in the "Extras" menu. It displays the current contents of the chosen car file. Now you can import new car or crew textures. The imported textures must be in 24-bit bmp format. Allowed is any size as long as the width and height are a power of 2. (For example 256, 512, 1024, 2048, etc.; 2048x512 would be a valid size.) You can choose whether the texture should be saved as 24-bit texture compressed (default), 24-bit or 16-bit mip within the car file. Note: when importing other texture sizes than the default ones, you will not be able to edit this car file with NR2003's paint shop anymore.

The car file editor allows you to import textures as tga when NR2003 is selected. Also there is a priority slider. Default priority is 8. The priority determins how fast mip levels are dropped compared to other mips.

When in the car.ini the value for NumChampionships in the [CareerStats] section is bigger than 0, then "Official Nascar Champion" will be displayed in the opponent manager.


Unpacking DAT files:

WinMip2 can unpack DAT files. DAT files are for most NR2003 files such as packed tracks, mods, and layout UI graphics. To unpack a DAT file go to the extras drop down selection. A window will open and you will navigate to the DAT file to unpack. The bar in WinMip2 will fill until it completes unpacking.

You cna also pack files into a DAT with WinMip2 but you need a .pck file alreayd and there is a much easier tool that doesn't require as much work.


Troubleshooting WinMip2:

Imported TGA appears upside down:
Some paint programs when creating a TGA assign the up axis to a 0 or 1. Whne assigned differently to what NR2003 WinMip2 is used to the image will appear upside down in WinmIp2 a sa result. The 'fix' is if you paint program causes the TGA to be upside down in WinMip2 you will need to export the TGA's in your paint program upside down causing them to be right-side up in WinMip2. Another method is saving them as PNG for exmaple and then opening them in a paint program or tool that can batch convert the file to TGA with the proper verticla coordinates.

BMP files: There is a known problem with opening bmp-Files which don´t follow the standards set by Microsoft for the fileformat. Make sure a 4-bit bmp is stored with a 4-bit palette and a 4-bit data section, a 8-bit bmp is stored with a 8-bit palette and a 8-bit data section. 24-bit bitmaps usually should work well.

Files take a long to save or fail: With modern technology we have begun exporting much larger resulution texture mips and stps thna NR2003 originally had whne it first released. Whne you save a texture WinMip2 can take awhile to save so be patient. Other times it may just outirght fail. If you receive an error make sure the settings are correct (for example a mip needs to be a resolution of a power of 2). If you are certain the error is not caused by any settings then reopen WinMip2 and try again.
 
Last edited:
Who read this thread (Total readers: 0)
    Back
    Top