Displacement Map Trainz 2019

capdiamont

Active member
Playing around with looking though forums and Wiki on how to do it. For 2019 the config.txt file doesn't seem to work from the Wiki and a thumbnail is not needed. Seems two ways to do it.

a) clone a displacement map in Content Manager. Open the clone for edit in Content Manager. Then go to that directory, replace the image file with your new image file. Then edit the config.txt with your user ID, asset ID, name of asset, and alternative language names for the asset.

Other parts say you can import the bitmap, however I kept getting warnings using the config.txt after editing the one from the Wiki. I then pulled the config.txt from the "a" process above to come up with "b" process.

b) put your displacement map in a folder with a config.txt as below. I used a 1024x1024 PNG file with a gradient from black to white. Then edit your config.txt as above. Then in Trainz, run Import Content. If there is any errors you will have to correct.

Once you have your config file, the "b" process will save you time, just edit the file as need for each new map and place in the same folder as your image map.



Code:
kuid                                    <kuid:143918:1>
kind                                    "groundbrush"
username                                "TestMap"
trainz-build                            2.9
displacement-bitmap                     "test.png"




username-cz                             "''"
username-pl                             "''"
username-hu                             "''"
username-it                             "''"
username-ru                             "''"
username-es                             "''"
username-nl                             "''"
username-fr                             "''"
username-jp                             "''"
username-de                             "''"
username-pt                             "''"


kuid-table
{
}

Username is the name of the map, the other user names are the alternative language names of the map. "displacement-bitmap" is the file name of your displacement map image. First number part of your asset is your user ID number. Second number part is the asset number.
 
Last edited:
You can save some steps by using the displacement map panel to create a displacement under your KUID and then just replace the image by opening the new asset for editing.

1. Use the Select area tool to choose a section of a baseboard. It can even be a blank baseboard.
2. Use the Get displacement tool to grab the selection into the panel. A new icon appears in the upper right of the map labeled Save Displacement.
3. Click it and enter a name and description.

Then follow your instructions to replace the map and add any more tags.

This is a good way to make displacement maps from existing routes.

William
 
That is a good way to save a displacement map from existing route. I'm not sure how it saves steps. Now I have a working config file, I can just copy it and edit it to reflect the new displacement map and import both. I'm hoping to make computer generated displacement maps.
 
You're right that since you have already cloned and edited the config.txt that it doesn't save you any steps. But I assumed that others might be following your instructions and it does make it easier for them.

William
 
Back
Top