Difference between revisions of "2D - General information"

From Mashinky
Jump to: navigation, search
Line 1: Line 1:
Mashinky engine is able to load many different formats:
+
Mashinky engine is able to load well known formats like:
  
* [https://en.wikipedia.org/wiki/DirectDraw_Surface *.dds] - preferred. DirectDraw Surface, it is native format for DirectX. Industry standard, able to store in many different bit formats, very fast for loading, custom mipmaps, etc.
 
 
* [https://en.wikipedia.org/wiki/BMP_file_format *.bmp]
 
* [https://en.wikipedia.org/wiki/BMP_file_format *.bmp]
 
* [https://en.wikipedia.org/wiki/JPEG *.jpg]
 
* [https://en.wikipedia.org/wiki/JPEG *.jpg]
Line 8: Line 7:
 
* ...
 
* ...
  
Take a look into [[how to setup 2D editor]] to prepare exporter and your 2d editor
+
but the native one to the engine and best to use is [https://en.wikipedia.org/wiki/DirectDraw_Surface *.dds]. DDS stands for DirectDraw Surface, what is native format for DirectX, an industry standard. Vanilla textures curently use DXT3 filtering. The size of textures is of power of two (2^n), so in the line of 128^2, 256^2, 512^2, 1024^2, 2048^2...
 +
 
 +
Mashinky vanilla textures are stored in DriveLetter:\SteamAppsPath\Mashinky\media\maps\.
 +
 
 +
There are no materials per se like in other engines/tools though the game works texture sets of sorts. Each UV set (part of a model on separate texture) uses in fact two textures, one is used as a regular color/diffuse texure + alpha and the other, with _n suffix, utilizes it's channels for different purposes.
 +
 
 +
First of all an example:
 +
{| class="wikitable"
 +
!colspan="2"|Example A - train engine with one UV set
 +
|-
 +
|TrEngine.dds
 +
|Diffuse texture with color information + alpha if needed
 +
|-
 +
|TrEngine_n.dds
 +
|R,G channels - normal map; B - glossiness map; A - snow/rust mask
 +
|}
 +
 
 +
Mentioned maps/masks are further described in separate topics in the 2D Art - textures category.
 +
 
 +
'''NOTE 1:''' Glass texture is placed on a separate texture. you can also use glass texture that is already in vanilla. <br\>
 +
'''NOTE 2:''' Animated wheels, like those on steam engines are on a separate texture.
 +
'''NOTE 3:''' Keep the number of textures and their resolution as low as possible while ratining appropriate quality in order not to clutter the game (i.e. do not use five 4k textures per train car).
 +
 
 
[[Category:Modding]]
 
[[Category:Modding]]
 
[[Category:2D Art - textures]]
 
[[Category:2D Art - textures]]

Revision as of 15:12, 22 March 2021

Mashinky engine is able to load well known formats like:

but the native one to the engine and best to use is *.dds. DDS stands for DirectDraw Surface, what is native format for DirectX, an industry standard. Vanilla textures curently use DXT3 filtering. The size of textures is of power of two (2^n), so in the line of 128^2, 256^2, 512^2, 1024^2, 2048^2...

Mashinky vanilla textures are stored in DriveLetter:\SteamAppsPath\Mashinky\media\maps\.

There are no materials per se like in other engines/tools though the game works texture sets of sorts. Each UV set (part of a model on separate texture) uses in fact two textures, one is used as a regular color/diffuse texure + alpha and the other, with _n suffix, utilizes it's channels for different purposes.

First of all an example:

Example A - train engine with one UV set
TrEngine.dds Diffuse texture with color information + alpha if needed
TrEngine_n.dds R,G channels - normal map; B - glossiness map; A - snow/rust mask

Mentioned maps/masks are further described in separate topics in the 2D Art - textures category.

NOTE 1: Glass texture is placed on a separate texture. you can also use glass texture that is already in vanilla. <br\> NOTE 2: Animated wheels, like those on steam engines are on a separate texture. NOTE 3: Keep the number of textures and their resolution as low as possible while ratining appropriate quality in order not to clutter the game (i.e. do not use five 4k textures per train car).