💾 Archived View for gemini.minetest.land › docs › engine › texture_packs.txt captured on 2022-07-16 at 13:36:30.

View Raw

More Information

⬅️ Previous capture (2022-04-28)

-=-=-=-=-=-=-

Minetest Texture Pack Reference
===============================

Texture packs allow you to replace textures provided by a mod with your own
textures.

Texture pack directory structure
--------------------------------

    textures
    |-- Texture Pack
    |   |-- texture_pack.conf
    |   |-- screenshot.png
    |   |-- description.txt
    |   |-- override.txt
    |   |-- your_texture_1.png
    |   |-- your_texture_2.png
    `-- Another Texture Pack

### Texture Pack
This is a directory containing the entire contents of a single texture pack.
It can be chosen more or less freely and will also become the name of the
texture pack. The name must not be “base”.

### `texture_pack.conf`
A key-value config file with the following keys:



### `description.txt`


A file containing a short description of the texture pack to be shown in the
content tab.

### `screenshot.png`
A preview image showing an in-game screenshot of this texture pack; it will be
shown in the texture packs tab. It should have an aspect ratio of 3:2 and a
minimum size of 300×200 pixels.

### `your_texture_1.png`, `your_texture_2.png`, etc.
Any other PNG files will be interpreted as textures. They must have the same
names as the textures they are supposed to override. For example, to override
the apple texture of Minetest Game, add a PNG file named `default_apple.png`.

The custom textures do not necceessarily require the same size as their
originals, but this might be required for a few particular textures. When
unsure, just test your texture pack in-game.

Texture modifiers
-----------------

See lua_api.txt for texture modifiers

Special textures
----------------

These texture names are hardcoded into the engine but can also be overwritten
by texture packs. All existing fallback textures can be found in the directory
`textures/base/pack`.

### Gameplay textures


                (default size: 12×12)

                     (transparent by default, same size as bubble.png)




    * the crosshair texture in the center of the screen. The settings
      `crosshair_color` and `crosshair_alpha` are used to create a cross
      when no texture is found.


    * the crosshair seen when pointing at an object. The settings
    `crosshair_color` and `crosshair_alpha` are used to create a cross
    when no texture is found.




               (default size: 12×12)

                    (transparent by default, same size as heart.png)















Note: The default textures of `player.png`, `player_back.png` and `wieldhand.png`
are placeholders intended to be overwritten by the game.

### Mainmenu textures




    * texture when no screenshot was found for a texture pack or mod



### Android textures









Texture Overrides
-----------------

You can override the textures of nodes and items from a
texture pack using texture overrides. To do this, create one or
more files in a texture pack called override.txt

Each line in an override.txt file is a rule. It consists of

	itemname target texture

For example,

	default:dirt_with_grass sides default_stone.png

or

	default:sword_steel inventory my_steel_sword.png

You can list multiple targets on one line as a comma-separated list:

	default:tree top,bottom my_special_tree.png

You can use texture modifiers, as usual:

	default:dirt_with_grass sides default_stone.png^[brighten

Finally, if a line is empty or starts with '#' it will be considered
a comment and not read as a rule. You can use this to better organize
your override.txt files.

Here are targets you can choose from:

| target        | behavior                                          |
|---------------|---------------------------------------------------|
| left          | x- face                                           |
| right         | x+ face                                           |
| front         | z- face                                           |
| back          | z+ face                                           |
| top           | y+ face                                           |
| bottom        | y- face                                           |
| sides         | x-, x+, z-, z+ faces                              |
| all           | All faces. You can also use '*' instead of 'all'. |
| special1      | The first entry in the special_tiles list         |
| special2      | The second entry in the special_tiles list        |
| special3      | The third entry in the special_tiles list         |
| special4      | The fourth entry in the special_tiles list        |
| special5      | The fifth entry in the special_tiles list         |
| special6      | The sixth entry in the special_tiles list         |
| inventory     | The inventory texture                             |
| wield         | The texture used when held by the player          |

Nodes support all targets, but other items only support 'inventory'
and 'wield'.

### Using the special targets

The special* targets only apply to specific drawtypes:



Designing leaves textures for the leaves rendering options
----------------------------------------------------------

Minetest has three modes for rendering leaves nodes if the node has the
`allfaces_optional` drawtype.

### Fancy

Uses the texture specified in the `tiles` nodedef field.
The texture should have some transparent pixels and be in the RGBA format so
that the transparent pixels can have color information.
Faces of every leaves node are rendered even if they are inside a solid volume
of leaves; this gives a dense appearance.

### Opaque

Uses the texture specified in `tiles` but makes it opaque by converting each
transparent pixel into an opaque pixel that uses the color information of that
transparent pixel.
Due to this the `tiles` texture format must be RGBA not 'indexed alpha' to allow
each transparent pixel to have color information.

The colors of the transparent pixels should be set for a good appearance in
`opaque` mode. This can be done by painting the pixels the desired colors then
erasing them. Then when saving the texture, use the 'save color information from
transparent pixels' option (or equivalent).

### Simple

Uses the texture specified in the `special_tiles` nodedef field if it exists, if
not, the `tiles` texture.
The `special_tiles` texture should have fewer transparent pixels than the
`tiles` texture and be in the 'indexed alpha' format.

This mode is between the other two in terms of appearance and rendering load.
The nodes are rendered using the `glasslike` drawtype, only showing the surface
faces for any solid volume of leaves, not the internal faces.
Due to this the `tiles` texture might appear lacking in density, so optionally a
`special_tiles` texture can be used to provide a texture with fewer transparent
pixels for a denser appearance.