Difference between revisions of "TxdGen/Mipmapping San Andreas for PC"
(another neat tutorial for you folks) |
m (HQ download link) |
||
(10 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
'''At time of writing, [[TxdGen]] version 0.9 is current.''' | '''At time of writing, [[TxdGen]] version 0.9 is current.''' | ||
+ | |||
+ | ''And yes, we will fix the irritating black roads.'' | ||
+ | |||
+ | [https://www.youtube.com/watch?v=6So27GlS5qg Video tutorial] ([https://mega.co.nz/#!0MdHHJCY!r9YJOpeac5CSttS5vd0ofXEGg02VnwMmsHDHzpU085A high quality download]) | ||
==Directions== | ==Directions== | ||
===Step 1: Requirements=== | ===Step 1: Requirements=== | ||
− | There are only a few requirements for fixing your game. | + | There are only a few requirements for fixing your game textures. |
* the [[TxdGen|latest version of TxdGen]] (0.9+) | * the [[TxdGen|latest version of TxdGen]] (0.9+) | ||
* an installation of ''Grand Theft Auto: San Andreas'' (no matter what version) | * an installation of ''Grand Theft Auto: San Andreas'' (no matter what version) | ||
Line 28: | Line 32: | ||
targetVersion=SA | targetVersion=SA | ||
targetPlatform=PC | targetPlatform=PC | ||
+ | clearMipmaps=false | ||
generateMipmaps=true | generateMipmaps=true | ||
mipGenMode=default | mipGenMode=default | ||
− | mipGenMaxLevel= | + | mipGenMaxLevel=15 |
− | mipGenSafe=true | + | mipGenSafe=false |
+ | improveFiltering=true | ||
compressTextures=false | compressTextures=false | ||
compressionQuality=1.0 | compressionQuality=1.0 | ||
Line 47: | Line 53: | ||
===Step 3: The Conversion=== | ===Step 3: The Conversion=== | ||
That is all you need to do to prepare the conversion. Once you are ready, execute <code>txdgen.exe</code>. A console window will open in which you can see debug information. Most importantly it displays what TXD files it currently processes. Since it requires a long time (even more so depending on your workstation processing power) please be patient. | That is all you need to do to prepare the conversion. Once you are ready, execute <code>txdgen.exe</code>. A console window will open in which you can see debug information. Most importantly it displays what TXD files it currently processes. Since it requires a long time (even more so depending on your workstation processing power) please be patient. | ||
+ | |||
+ | [[File:Txdgen_tut_samip_proc.png|650px|center|Console window]] | ||
Just like it was stated earlier the converter will '''fix a lot of textures'''. For each fixed texture it will display a warning which tells you about the bugs that the texture had. So if you cannot wait, sit back and relax while reading the output of the console window! | Just like it was stated earlier the converter will '''fix a lot of textures'''. For each fixed texture it will display a warning which tells you about the bugs that the texture had. So if you cannot wait, sit back and relax while reading the output of the console window! | ||
Line 59: | Line 67: | ||
* browse into the "txdgen_out/" directory | * browse into the "txdgen_out/" directory | ||
* copy the entire contents of that directory into the "models/" directory we opened earlier | * copy the entire contents of that directory into the "models/" directory we opened earlier | ||
− | '''You have | + | |
+ | [[File:Txdgen_tut_samip_copy.png|650px|center|Copying the generated files into the game]] | ||
+ | |||
+ | '''Congratulations! You have fixed the 'black-roads' bug! Every world texture is now using mipmaps!''' | ||
+ | |||
+ | ==Comparison Shots== | ||
+ | These screenshots were taken with the following game configuration. | ||
+ | * '''draw distance:''' full | ||
+ | * '''frame limiter:''' off | ||
+ | * '''widescreen:''' on | ||
+ | * '''FX quality:''' low | ||
+ | * '''mip mapping:''' on | ||
+ | * '''anti aliasing:''' 3 | ||
+ | * '''resolution:''' 1680x1050x32 | ||
+ | * Windows 98 compatibility mode + administrator | ||
+ | * '''IMPORTANT: no driver overrides''' | ||
+ | Follow these configurations to reproduce the issues dipicted in the screenshots. '''Make sure that you go into the game options before loading the game!''' | ||
+ | ===Black-roads bug=== | ||
+ | {| class="wikitable" | ||
+ | !colspan="1"|Before | ||
+ | !colspan="1"|After | ||
+ | |- | ||
+ | |[[File:brf_ls_highwayexit_side.png|500px|center]] | ||
+ | |[[File:brf_ls_highwayexit_side_fixed.png|500px|center]] | ||
+ | |- | ||
+ | |[[File:brf_lv_toairstrip.png|500px|center]] | ||
+ | |[[File:brf_lv_toairstrip_fixed.png|500px|center]] | ||
+ | |- | ||
+ | |[[File:brf_sf_mainroad.png|500px|center]] | ||
+ | |[[File:brf_sf_mainroad_fixed.png|500px|center]] | ||
+ | |- | ||
+ | |[[File:brf_sf_scraper.png|500px|center]] | ||
+ | |[[File:brf_sf_scaper_fixed.png|500px|center]] | ||
+ | |} | ||
==Technical Details== | ==Technical Details== | ||
Line 69: | Line 110: | ||
===Conversion Behavior=== | ===Conversion Behavior=== | ||
Each texture that has been converted will just be extended by mipmaps if it did not have them already. The converter has been carefully crafted so that textures '''do not loose quality''' (avoiding recompression). Automatic mipmap generation is turned off for all textures. | Each texture that has been converted will just be extended by mipmaps if it did not have them already. The converter has been carefully crafted so that textures '''do not loose quality''' (avoiding recompression). Automatic mipmap generation is turned off for all textures. | ||
+ | |||
+ | '''Filtering modes''' are fixed for all textures. This enables mipmapping for textures that had it disabled previously. Using <code>improveFiltering=true</code> the rendering quality of textures is upscaled closely to how the GTA:SA engine does it. | ||
{{N|SA}} | {{N|SA}} | ||
[[Category:Tutorials]] | [[Category:Tutorials]] |
Latest revision as of 12:53, 25 February 2015
Mipmapping is an important final touch to game textures. Using mipmaps you can improve the visual quality of models when they are rendered in the distance. Both CPU and GPU performance is increased: Mipmaps do not have to be generated during runtime, the GPU has an easier job mapping lower resolution textures onto triangles. When done correctly mipmapping only bears advantages. Unfortunately, Rockstar Games has not entirely done things right, which is the cause in the "black roads bug" that plagues the PC and XBOX version of San Andreas. In this tutorial, we want to put a closure to the dark history and fix San Andreas textures how they were supposed to be.
At time of writing, TxdGen version 0.9 is current.
And yes, we will fix the irritating black roads.
Video tutorial (high quality download)
Contents
Directions
Step 1: Requirements
There are only a few requirements for fixing your game textures.
- the latest version of TxdGen (0.9+)
- an installation of Grand Theft Auto: San Andreas (no matter what version)
Step 2: Downloading and Preparing
First off, you need to install GTA:SA if you have not already. The recommended location to install to is C:/Program Files (x86)/Rockstar Games/GTA San Andreas/
. If you have installed somewhere different, please adjust the following steps accordingly.
How to install TxdGen
- Place the downloaded txdgen_*.zip archive onto your desktop
- Right click on the icon and select "Extract All"
- Press the "Extract" button.
- You now have a txdgen_* folder on your desktop
Next we want to configure the tool. Inside of the TxdGen folder you see a txdgen.ini file. This is the central configuration file. You should fiddle around with the settings if you got spare time.
This is a specialized version of that file that we need.
txdgen.ini
[Main]
gameRoot=C:/Program Files (x86)/Rockstar Games/GTA San Andreas/models/
outputRoot=txdgen_out/
targetVersion=SA
targetPlatform=PC
clearMipmaps=false
generateMipmaps=true
mipGenMode=default
mipGenMaxLevel=15
mipGenSafe=false
improveFiltering=true
compressTextures=false
compressionQuality=1.0
palRuntimeType=PNGQUANT
dxtRuntimeType=SQUISH
warningLevel=3
ignoreSecureWarnings=false
reconstructIMGArchives=true
fixIncompatibleRasters=true
dxtPackedDecompression=false
imgArchivesCompressed=false
Keep the TxdGen directory window around.
Step 3: The Conversion
That is all you need to do to prepare the conversion. Once you are ready, execute txdgen.exe
. A console window will open in which you can see debug information. Most importantly it displays what TXD files it currently processes. Since it requires a long time (even more so depending on your workstation processing power) please be patient.
Just like it was stated earlier the converter will fix a lot of textures. For each fixed texture it will display a warning which tells you about the bugs that the texture had. So if you cannot wait, sit back and relax while reading the output of the console window!
When the console window has closed automatically, the conversion is finished.
Step 4: Modding the game
- open the game directory of GTA:SA (
C:/Program Files (x86)/Rockstar Games/GTA San Andreas/
) - browse into the "models/" subdirectory
- (OPTIONAL): back up the .img and .txd files inside of this directory
- return to the TxdGen directory window
- browse into the "txdgen_out/" directory
- copy the entire contents of that directory into the "models/" directory we opened earlier
Congratulations! You have fixed the 'black-roads' bug! Every world texture is now using mipmaps!
Comparison Shots
These screenshots were taken with the following game configuration.
- draw distance: full
- frame limiter: off
- widescreen: on
- FX quality: low
- mip mapping: on
- anti aliasing: 3
- resolution: 1680x1050x32
- Windows 98 compatibility mode + administrator
- IMPORTANT: no driver overrides
Follow these configurations to reproduce the issues dipicted in the screenshots. Make sure that you go into the game options before loading the game!
Black-roads bug
Before | After |
---|---|
Technical Details
Streaming Memory
Adding mipmaps to game textures significantly increases their size. Since the San Andreas engine uses a concept called streaming memory, you may encounter slower loading of the world around you. This effect is increased if you have set a high draw distance in your game settings.
To fix this issue, I recommend that you install one of the many streaming memory fixes from the GTA modding community.
Conversion Behavior
Each texture that has been converted will just be extended by mipmaps if it did not have them already. The converter has been carefully crafted so that textures do not loose quality (avoiding recompression). Automatic mipmap generation is turned off for all textures.
Filtering modes are fixed for all textures. This enables mipmapping for textures that had it disabled previously. Using improveFiltering=true
the rendering quality of textures is upscaled closely to how the GTA:SA engine does it.