At Studio 397 we are looking to move towards an asset pipeline long term. What does that mean? Well it means we will provide tooling to help deploy assets to game, and the functions can range from ensuring textures are saved in the correct format, to baking lighting for cockpit interiors or tree lighting or more. This tool is the first step in that move and it is something that we are making use of daily to help improve our artists workflow.
The base premise of this tool is to convert TGA texture files to the correct and optimal DDS encoding for their purpose whilst doing some basic date checking to make sure it only converts updated textures. In order for all this to work you will have to name your textures to our naming standards though.
This tool is a command line app which calls Microsoft's freely available Texconv.exe to do the actual texture conversion.
Why use this?
The recommended usage of the tool at this time is to create a batch file in the folder above your maps folder to run the application. It will then automatically convert all TGA files in "MapsSource" newer than their DDS equivalent in "Maps" folder.
Firstly we need to locate where everything is on your PC. The exact location of the rFactor2 install depends on where you setup your steam installs, but by default it would be C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\Support\MapConverter.
Custom Steam Apps Folder
For example, you have the following setup:
Then all we need to do is have the batch file in D:\MyTestTrack\Assets\ with the following:
"C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\Support\Tools\MapConverter\MapConverter.exe"
After running the batch file, an output log is generated in the same folder named "MapConverter.log". This tells you, for each texture it finds, what action it takes and why and if it has any issues.
Beneath we will detail other options you can specify in order to run it, such as specifying custom directories, and forcing the conversion of all textures regardless of time stamps.
If you want to change the folders it converts from and/or to. Assuming both those folders are in the same directory as your MapConvert.bat file, then you need to edit the bat file as follows.
"C:\Program Files (x86)\Steam\steamapps\common\rFactor 2\Support\Tools\MapConverter\MapConverter.exe" -s MySourceFolder -d MyDestinationFolder
The application can be run with some optional arguments.
Textures must be named following a standard as follows.
Below are some valid examples:
Below are some invalid examples:
If for some reason a texture is not being converted, you can force it in two ways.