Partially manually edited computer translation. In case of doubt, the German text applies.
Since I was already dealing with terrain textures, I briefly dealt with it in February: Luftbilder als Konstruktionsvorlage nutzen
At /// M Power I had seen a few ideas about this and tried the terrain textures straight away, but nothing else. Now I have a little more time and wanted to explicate that now.
Principles
- a game world needs at least four map pictures, in the center there are always the corners of four textures
- a terrain texture must always be 4096x4096 pixels in size
- is in the config file of a terrain texture for detailSize e.g. given the value 1 / 2048, then the texture is scaled to pretty much (or entirely) exactly 2048 m
Examples
In the following, there are a few examples of different scaling and the meaning for a game world with a size of 12x12 km.
Example 1:
Scaling of the terrain textures: detailSize = 1 / 2048
In the game, one pixel of the terrain texture corresponds to: 0.5 m
Converted width of a texture: 2048 m
Number of terrain textures required for game world 12x12 km: 36 (6x6)
Example 2:
Scaling of the terrain textures: detailSize = 1 / 3072
In the game, one pixel of the terrain texture corresponds to: 0.75 m
Converted width of a texture: 3072 m
Number of terrain textures required for game world 12x12 km: 16 (4x4)
Example 3:
Scaling of the terrain textures: detailSize = 1 / 1024
In the game, one pixel of the terrain texture corresponds to: 0.25 m
Converted width of a texture: 1024 m
Evaluation: The resolution is good.
Number of terrain textures required for game world 12x12 km: 144 (12x12)
Example 4:
Scaling of the terrain textures: detailSize = 1 / 4096
In the game, one pixel of the terrain texture corresponds to: 1 m
Converted width of a texture: 4096 m
Evaluation: the simplest, because 1 px = 1 m
Number of terrain textures required for game world 12x12 km: 16 (4x4)
Example 5:
Scaling of the terrain textures: detailSize = 1 / 4000
In the game, one pixel of the terrain texture corresponds to: 0,9766 m
Converted width of a texture: 4000 m
Evaluation: easy to use if a single picture shows exactly 1 km, 16 1 km single pictures can be combined to a 4 km picture
Number of terrain textures required for game world 12x12 km: 16 (4x4)
If you want to decide on scaling the terrain textures, two pieces of information are interesting:
- game world size (the bigger, the more work and more textures with smaller scaling like e.g. detailSize = 1 / 1024, better choose bigger scaling like detailSize = 1 / 4096)
- scaling of original map or aerial photos (if e.g. 1 px = 1 m, then detailSize = 1 / 4096)
Here is a lot of information to be found, which I mainly found out by trying and calculating, so I cannot give an absolute guarantee of accuracy.
Brief instructions for adding image/map material for modification
- a single terrain texture always needs a config file (path: "relozu_map_test_1/res/config/terrain_material/shared")
- a single terrain texture still needs several texture files (path: "relozu_map_test_1/res/textures/terrain")
- the config file merges the texture files
- a new config file and a texture file with the ending _albedo are always required for new map terrain textures, other texture files can be used repeatedly and therefore ignored
- the colors of the albedo texture are as seen in the game
- when creating in an editor like GIMP the texture has to be mirrored vertically and exported as dds with the compression DXT1 and generated mipmaps
- you can use the texture contained in the mod as a base (copy, rename, edit and export file)
- you can also copy the config file again and again and have to change the following:
- name - Here comes the display name of the terrain texture
- detailColorTexture - This is where the name of the albedo texture comes in
- detailSize - if necessary and explained above
- names can e.g. orientate to a 2D coordinate system:
- texture furthest southwest (bottom left) ..._ 0-0
- texture east (right) next to it ..._ 1-0
- etc.
Use in the game
If you keep the mod's standard terrain texture, you can paint the floor with a grid at the beginning and then paint your customized terrain textures in the appropriate fields.
Unfortunately, this is not automatic, it is just a crafting solution. The advantage is that no shaders need to be changed.
If an area is finished later, the eraser can be used to get the terrain textures back to their original state.
Changelog of the article roughly
- Removal of outdated information on card sizes (dimensions are no longer based on n * 256 + 1)! and revision of the examples
- Mod adapted - changed file names and added letters for cardinal points
- Edited Use in the game - just paint a grid
- Added Example 5