Jump to content

Morrowind texture tweak for linux users under wine.


xander2077

Recommended Posts

This may not be what some are looking for, but i found it to be helpful in morrowind under linux. I am running it through PlayonLinux, with the MCP, and a few other suggested ini tweaks. The 4gb patch does not work in a 32 bit environment, so as a result the memory has to be modified experimentally and finding the files to do so is a pain, sometimes they dont exist due to the simplicity of the wine wrapper. So istead of trying to find a workaround for MGE or other exe's that just dont work, and to balance things out so the memory isnt overtaxed, i found this to be an acceptable tweak for the replacement textures in the Data files folder. It certainly doesn't tax memory as much, and it is an acceptable tradeoff for me considering i have a lot of texture and mesh mods in place to update the look of the game, and MGE and other patches that work in a true windows environment just dont work in linux.

 

so here goes a very short tutorial on how to resize textures to play nicer with morrowind in linux (which is a lot closer to vanilla morrowind)

 

Before i get into that though, i have read before that one good way to ensure you are installing texture replacers properly or overwriting files in your data files folder properly, is to ensure your file names, and all single letter alphabeitcal folders are named in lower case. i have done this in my own morrowind directory and it is a huge help when i download a new texture or mesh mod, becasue it ensures i overwrite any older files and have only the new ones in each directory. so i have lower cased my files and single letter alphabetical folders, and then make sure the mod files i unzipped are renamed to match the already existing files and folders as well. reason being that linux is case sensitive, and i dont think windows or morrowind are unless a nif file specifically makes it that way. so to aid in replacing textures and meshes (because many modders do not follow a strict naming convention, and you can end up with three files or more of all the same name except they all have a mix of different case letters in them) i recommend using a converter like metamorphose2 in linux to change all texture and nif files to lower case before adding any new files or overwriting any existing files, if there are multiples, it can aid in eliminating files you dont want to keep too. it can be found in the repository, or by doing a search for it in google, and i think they have a sourceforge page, so it may have to be installed manually with gdebi or your naitve linux package installer.

 

so everything already in the folders and things you want to past into them, should all be lower cased. just a good rule of thumb. now granted some mod makers give you a file folder that is unique, and their model and texture files are unique, so it may be best to leave those folders alone, and simply focus on nif and textures files in the main textures and meshes folders, and any single letter alphabetical subfolders only. reason being is most vanilla pluginless texture replacers use those folders, and it makes things easier, if the folders in the morrowind directory below textures and meshes are lowercase, and the folders that came in the zip file that would overwrite them are the same. i have also noticed that some modders package their folder for textures or meshes in lower case, so make sure they are capitalized to match the name of the existing folder in morrowinds directory, or you will end up with two texture and mesh folders with dfferent case letters in them. also make sure the texture and mesh files inside them are lower cased when you paste them into your morrowind directories. that way you do not end up with multiple files. this confuses the game and it can get jammed up. it only needs to find one file not multiples for each texture or mesh.

 

while using metamorphose to lower case files and folders, if there are red entries in metamorphose in the preview window, then the only option is to delete duplicate files until you have the one you want to keep (subjective to the user) and then you can rename all the files. dont let metamorphose do this for you because it may choose a file you dont want to keep. for folders the way to remedy this is to cut the contents of a captialized folder and paste them into the lower case one and then delete the capitalized folder. remember this is only effective really for subfolders with a single alphabetical letter name. any other unique folder names created by mod makers are usually not recognized as subfolders in vanilla morrowind and only register if there is an esp that points the game to them or the nif points to them, so dont worry about those. also if you paste files from a capitalized letter folder into a lower case one, and did not rename thefiles inside to lower case to match the lower case files in your existing directory, you will end up with duplicate named files with a mixture of cases in names and file extensions, thats just how it goes, so renaming them before pasting is always a good practice. a cleaned up morrowind directory can really bost performance in ways most dont realize. and that is just where it begins. so now on to the tutorial.

 

In linux:

 

1: open the textures folder and find all textures, then sort them according to size, descending.

 

2: you will need Gimp, so if you dont have it, then install it from the official repository and also get the dds plugin.

 

3: open a few files at a time, as many as your system can handle, and click yes when the prompt asks about mipmaps etc, and make sure all boxes are checked.

 

4: here comes the painstaking part, but if you have a lot of user made texture replacesrs, this is about the only way to trim the memory use and keep things smooth instead of choppy. ANY file larger than 512x512, has got to be resized to 512x whatever, 512 being the largest pixel dimension. some are equal both directions, and some may have one side larger than the other. Every subfolder is also going to be gone through in order to resize each texture to the proper dimensions. However with a resize you get to keep the new textures (better than the old stock ones) and though they may not be as hi resolution, they still look better than stock.

 

5: each file opened in gimp will have its own tab. simply go to the top of the window where the menu is, and select the dropdown for "image" and look down til you see "scale" then click on it.

 

6: here is how to change the files in gimp with as detailed steps as i can remember YMMV:

 

A: a window will open up and show the dimensions onf the texture file. the largest number of the two should be 512, then hit enter. look for the button in the lower right hand corner of the window and click "resize". it may give you a warning about losing some of the mipmaps, but that is not an issue so just click "resize" and the image will resize in the window as well as the actual size. to view the quality of the image simply choose "view" at the menu bar, and then look down and choose "zoom" then follow that dropdown to "fit image to window" and the resolution should not be as bad as you think. in fact i was pretty pleasesd at the results.

 

B: anyway, then you go to "file" in the menu bar and look down til you find "overwrite image name.dds" (image name being whatever it was when you opened it) and this will automatically save it over the file with all the mipmaps attached to it already.

 

C: if there is a file that is absent mip maps and you want them, then you can choose to export the file using the same "file" menu and instead click on "export as" where you simply click the "export" button in the folder window, then is prompts you to make sure you really want to overwrite, then another window opens asking details about the mipmaps. stop, look for the button that by default says "dont generate mipmaps" and change it to "generate mipmaps". this will increase file size a little, but not much. then press "ok". this will generate the texture with mipmaps now and save it.

 

D: to remove mipmaps from files that doesn't need them, you can look at the dock on the side of gimp, whichever side it is, that shows the image layers, and then you can see the decresing order of mipmaps in each layer. such files as menu textures, and books or scrolls dont need mipmaps really. since they fill the whole window and dont scale in or out. so to rid the dds of mipmaps, look at the menu bar again and choose "layer". from there look down til you find "stack' snd follow it over to "select bottom layer". once the bottom layer is selected, you can go back to the "layer" menu and choose "delete layer" until you have deleted every layer but the top layer, which is the largest mipmap. sometimes this does not reduce the file size but increases it, in which case just replace it with the original file from the original mod. the aim is to decrease file size not increase it. this can also be done with textures that have mipmaps that are so tiny they are not even visible any more. in fact, IMHO for a 512 texture, there should probably be only three or four mipmaps, because the rest wont show. again if this for some weird reason decides to increase the file size, then just go back to the original file and just resize it and dont delete any mipmaps.

 

7: i realize this may not be fore everyone, but for me i chose this route because i wanted to make sure morrowind can recognize the files as well as gimp. But there are other methods to resize these in bulk, and i will cover that next. I have not tried to use the textures in game though because trying to open them in gimp gives a message "unexpected EOF (end of file) which means that it cant read it in gimp, however it can be viewed by the native image viewer in linux, so the texture is still there and a viable dds file, but to be sure i went the long route. But anyway, to resize them in bulk there are two programs that will do it in linux, one is native, and the other must be run in wine.

 

A: XNview, can run in wine and even shows the thumbnails, and a handy extra is it will also display under each thumbnail the size of the texture so you can choose which ones you want to resize. simply highlight all that need to be shrunk a bit, and follow the instructions on various tutorials on how to resize a dds file in XNview. make sure you have another output folder selected besides your "data files/textures" directory or any subfolder that textures are being resized from, so you can see if they converted properly before overwriting the textures in your morrowind folder(s). usually it works best to only select those that need resizing, and change the percentage value to "50%" and then let it batch convert them all. it can take a while and runs the cpu a bit hard so beware if you have a lighter system. after it is done you can close XNview and go to your output folder snd view the textures in linux with the native image viewer. like i said i dont know how they show in game with this method because i didnt use it. if it gives an error in gimp it may or may not give on in morrowind.

 

B: Converseen, which in my opinion is not as feature rich as XNview, but can still convert the size of dds, is another method, and it is cross platform, so it works natively under linux. it is also a lot faster at resizing. unfortunately the menu bar where it says "help" doesnt have a link to any kind of help file, so you are on your own to figure out how to use it, but they made sure the put multiple links for donations, and funding. anyway, this is a little trickier, becuase you have to select the files in converseen on your own based on file size first, and then trial and error next, becasue there is no size reference under each thumbnail. a good rule of thumb for me is that nay file over 1 MB is probably in need of a resize, but to be sure it is best to open them in gimp first if you are not sure to see the dimensions before converting them. after all you dont want to reduce any files to 256, unless you really want to. the process for selsction is similar, but clunkier, but the method of conversion is almost the same, where you would do best to change the percentage instead of going through every file to ensure they are 512 by whatever. watch it though, because you only neeed the mouse pointer over any of the entry cells and a scroll of the center button on accident to change the values, which to me is a pain in the backside. it should not be that easy, but there is no option to change that behavior. anyway once you have the values set properly for all files, and choose your output folder (which should be somewhere besides in your morrowind folders) then you can convert them and it whould take a very short time to have results. then you can close converseen and view the files in your native image viewer. this also yeilds the same "unexpected EOF" in gimp. so just be aware they may or may not give errors in game. if not then great!

 

Both of the above methods work for conversion and viewing in the native image viewer, but strangely cause an error in gimp. which may ormay not be a factor in morrowind. i have not tried textures using this method of size conversion so someone else will have to try. if you are like me and want to change a texture a bit, and need gimp to do it, then it may not work for you. gimp will not open dds files resized with this method. that is why i did not use the batch methods.

 

8: when using either batch conversion method, it is highly recommended to use an output folder outside your morrowind directory, probably named "test" and also have the appropriate subfolders in there, and then copy the files over to where they belong afterward, and also backup your data files before finalizing the overwrite. Also to keep from getting confused as to where the new files go, simply create a subfolder in your main output file folder with exactly the same name as the folder where the converted textures come from and output the resized files into that so you know where to copy them later. this works great for the single letter alphabetical folders.

 

9: with the gimp method it is not necessary to backup your data files folder unless you really want to, and it will overwrite the file in the same directory it is in. so there are some tradeoffs to each method.

 

The reason i wrote this up, was because linux users often cannot reap the benefits of all the morrowind patching exe's that native windows users can, so it becomes an issue where texture replacers often are only released in packages where the file size is outrageously huge, some laughably so, especially where smaller textures are more than enough. sometimes people just upsize the textures, and dont even add detail, which leads to grainy huge textures, and their only apparent benefit is because they can boast a 2048x size. i mean cmon, 2048x2048 for an amulet or potion bottle? that is not practical for linux users. also many of the mesh replacers, especially if they are a few years older, do not account for 1024x or 2048x textures, which leads to an oversized texture where only part of it is placed on the mesh, and in some cases can make things look ridicuouls, like instead of woven fabric, the robe texture can look like a basketweave on a character. in my experience, i noticed much better details being displayed on robes and clothing by doing the size down conversion, and a noticeable drop in cpu use and memory lag, in fact the movement was not even choppy any more. so 2048x textures may be cool and all, but i think 512x is enough for me in linux.

 

again YMMV, but i think this can be a godsend to many linux players out there to know they can speed the game up even without the benefit of things like MGE or other programs that wont work or are missing features, or could bork their game because they depend on a true windows environment. sure it means losing some resolution on textures, but it actually works.

 

so eliminating extra duplicate texture files and nifs and renaming them all to lower case in the vanilla morrowind folders, AND resizing them to no larger than 512x can increase the performance of morrowind in a linux wine environment ramatically, without the fancy exe patches that only like to run in windows.

 

another thing to try, that could help performance a bit is to go into your splash folder, and resize the images there to more closely resemble the size of your screen. the way to do this in gimp is to go to "image" and then down to "properties" and it will display the resolution as well as the print size. the print size is the size to pay attention to. for example, if you look at the splash screens based off of the concept art, then they are so many pixels, but a print would be almost 33 inches across. and your screen is probably not 33 inches across. if it is then great, no change is needed. but if not, there is wasted memory right there from loading an image that is bigger than your screen. so you can guess pretty much how wide your splash should be based off this information. simply choose a standard height or width and then go back to image properties to view the print size, and adjust it as necessary until it is pretty close to the size of your screen height and width in inches. and there you go! just freed up more memory and still have a nice splash to look at. and remember you can always undo and try to adjust it to a more proper fit.

 

have fun and enjoy!

Edited by xander2077
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...