Creating texture packs

From Minetest Wiki
Jump to navigation Jump to search
Languages Language: English

Texture packs are a simple folder containing image files named after the default ones. Minetest the engine has very few requirements for using a texture pack and texture packs are normally used by games for example Minetest Game.


Image Structure

Below is a brief overview of the texture structure of Minetest as of version 5.1

Minetest Engine

The Minetest game engine has very few base textures; these can be found under ~/your/path/to/minetest/textures/base/pack and there are 56 texture files as of ver 5.1. This includes textures for things such as; server icons, minimap overlays, logos and headers.

Game Specific Textures

Each game that you install to Minetest will have different texture requirements due to the mods that games creator will have used to create the game. For example the base Minetest Game which comes bundled with the the Minetest Engine includes 31 mods as of ver 5.1, some of these mods will have texture requirements and some will not.
For example
~/your/path/to/minetest/games/minetest_game/mods/default/textures has an extensive array of textures to support this mod, were as ~/your/path/to/minetest/games/minetest_game/mods/spawn has no textures to support the mod.

Full Minetest Game mod list as of version 5.1

~/your/path/to/minetest/games/minetest_game/mods/beds
~/your/path/to/minetest/games/minetest_game/mods/binoculars
~/your/path/to/minetest/games/minetest_game/mods/boats
~/your/path/to/minetest/games/minetest_game/mods/bones
~/your/path/to/minetest/games/minetest_game/mods/bucket
~/your/path/to/minetest/games/minetest_game/mods/butterflies
~/your/path/to/minetest/games/minetest_game/mods/carts
~/your/path/to/minetest/games/minetest_game/mods/creative
~/your/path/to/minetest/games/minetest_game/mods/default
~/your/path/to/minetest/games/minetest_game/mods/doors
~/your/path/to/minetest/games/minetest_game/mods/dungeon_loot
~/your/path/to/minetest/games/minetest_game/mods/dye
~/your/path/to/minetest/games/minetest_game/mods/env_sounds
~/your/path/to/minetest/games/minetest_game/mods/farming
~/your/path/to/minetest/games/minetest_game/mods/fire
~/your/path/to/minetest/games/minetest_game/mods/fireflies
~/your/path/to/minetest/games/minetest_game/mods/flowers
~/your/path/to/minetest/games/minetest_game/mods/game_commands
~/your/path/to/minetest/games/minetest_game/mods/give_initial_stuff
~/your/path/to/minetest/games/minetest_game/mods/map
~/your/path/to/minetest/games/minetest_game/mods/player_api
~/your/path/to/minetest/games/minetest_game/mods/screwdriver
~/your/path/to/minetest/games/minetest_game/mods/sethome
~/your/path/to/minetest/games/minetest_game/mods/sfinv
~/your/path/to/minetest/games/minetest_game/mods/spawn
~/your/path/to/minetest/games/minetest_game/mods/stairs
~/your/path/to/minetest/games/minetest_game/mods/tnt
~/your/path/to/minetest/games/minetest_game/mods/vessels
~/your/path/to/minetest/games/minetest_game/mods/walls
~/your/path/to/minetest/games/minetest_game/mods/wool
~/your/path/to/minetest/games/minetest_game/mods/xpanes

Engine and Game Texture Pack

As a very short summary in order to create a fully custom texture pack for the Minetest_game you would need to copy all the textures that are under ~/base/pack to a new folder and then copy all the textures from each individual ~/minetest_game/mods/modname/textures to the same folder this would give you a full list of the required image files that would be needed to create a custom texture pack for that specific game, further detail below on how to do this.

Setting up Custom Texture Pack Folder

The Minetest engine supports sub-folders under the custom texture pack folder. Although these sub-folders can be named anything it is sometimes easiest to keep the subfolders the same name as the mod the textures are for. This can also help with identifying what textures might be missing if you wish to support multiple different games with your custom texture pack for example Minetest Game and Lord of the Test.

Create Texture Pack Folder

Tutorial texture pack location .PNG

Under ~/your/path/to/minetest/textures create a new folder that matches the name for your new texture pack for example: "Your_Texture_Pack_Name"

You will know if your in the correct folder as there is a small txt file named "texture_packs_here.txt" in the correct location.



Copy Textures Over

Easiest

Windows
  • Browse to your Minetest folder,
  • Enter the games/minetest_game folder,
  • Then hit Ctrl+F to invoke the search function,
  • In the search box, enter “*.png” to find all the image files (or directly use the “Images” option in the search page),
  • Next Select All Ctrl+A,
  • Copy Ctrl+C and
  • Paste to your texture pack folder Ctrl+V


If you would also like to replace some of the base engine textures then follow the below:

  • Browse to your Minetest folder,
  • Enter the textures\base\pack folder,
  • Select the files you wish to copy Ctrl + mouse click you might like to change:
    • logo.png - changes the ICON on the lower part of the main screen for your game
    • minimap_*.png - changes the appearance of the minimap in game
    • unknown_*.png - changes the appearance of unknown game objects
    • server_*.png - change all the server icons
    • progress_*.png - changes the load bar when a game loads
  • Copy Ctrl+C and
  • Paste to your texture pack folder Ctrl+V
Linux

It’s better to use the terminal. These commands should do the job:

$ TP_NAME=your-pack-name
$ cd ~/your/path/to/minetest
$ mkdir textures/$TP_NAME
$ find games/minetest_game/ -name '*.png' -exec cp '{}' "textures/$TP_NAME" ';'

If you would also like to replace some of the base engine textures then follow the below - assumes GUI:

  • Browse to your Minetest folder,
  • Enter the textures\base\pack folder,
  • Select the files you wish to copy - you might like to change:
    • logo.png - changes the ICON on the lower part of the main screen for your game
    • minimap_*.png - changes the appearance of the minimap in game
    • unknown_*.png - changes the appearance of unknown game objects
    • server_*.png - change all the server icons
    • progress_*.png - changes the load bar when a game loads
  • Copy and Paste to your texture pack folder


Both of the above methods will result in all textures appearing in single big list of textures/image files under the base custom texture pack folder. Not always user friendly when trying to keep track of what textures you may or may not have already updated/edited.

More Complex

The below methods will mean you end up with each texture under a folder named the same as the mod it is required for.

Windows

To copy over using Windows it's easiest to make use of ROBOCOPY at the windows CMD prompt as this can easily copy over just *.png files while retaining the mod folder structure.

  • Make a note of the source location for the files and the destination location eg
    • Source: ~\your\path\to\minetest\games\minetest_game\mods
    • Destination: ~\your\path\to\minetest\textures\Your_Texture_Pack_Name
  • Open the windows CMD prompt, search for cmd under start menu/search or [for more help click here]
  • Type in:
  ROBOCOPY "C:\your\path\to\minetest\games\minetest_game\mods" "C:\your\path\to\minetest\textures\Your_Texture_Pack_Name" *.png /s
  • Only If you would also like to copy over the default engine graphics using robocopy then type in:
  ROBOCOPY "C:\your\path\to\minetest\textures\base" "C:\your\path\to\minetest\textures\Your_Texture_Pack_Name" *.png /s

Under you texture pack folder you should end up with a structure resembling:

C:\your\path\to\minetest\textures\Your_Texture_Pack_Name\
default\ textures\ *.png files
doors\ textures\ *.png files
.... .... ....

The above method is slightly irritating in that the texture folder is buried one extra level deep you can manually go through and simply use Windows file explorer to move the files up one level or give the bat file below a try.

This method requires the creation of a .bat file and that this file is placed and run from your new texture pack folder.

  • Copy the below into a new text document:
       @echo off
        set thisdir=%cd%
           for /f "delims=" %%B in ('dir /b /ad') do (
                echo Level 2 Directory: %%~dpnB
                cd /d "%%~dpnB"
                for /f "delims=" %%C in ('dir /b /ad') do (
                	echo Level 3 Directory: %%~dpnC
                	cd /d "%%~dpnC"
                	move *.png ..\
                	cd..
                	rd "%%~dpnC"
                )
            cd..
           )
        cd /d "%thisdir%
  • Save this file as "something.bat" at the location ~\your\path\to\minetest\textures\Your_texture_Pack_Name
  • Double click the bat file to run it, cmd window will flick up and disappear
  • Your file structure should now appear as:
C:\your\path\to\minetest\textures\Your_Texture_Pack_Name\
default\ *.png files
doors\ *.png files
.... ....
Linux

Hopefully if your using Linux you'll know how to do something similar, or someone who's better with Linux than me can update this section

Copy or Create Special Textures

There are some textures which are not included or covered by the above process these can however be created or copied from another texture pack and then included in your texture pack.

Object File name Common Size
Sun sun.png 96x96 px - square
Sun tone map[1]
sun_tonemap.png 512x1 px
Moon moon.png 96x96 px - square
Moon tone map[2]
moon_tonemap.png 512x1 px
Crosshairs crosshair.png 16x16 px - square
In Game Menu Bg gui_formbg.png 496 x 506 px
In Game Menu Sq gui_hb_bg 32x32 - square

Editing or Creating Textures

Copyright

Copyright is a tricky issue especially when it comes to images and graphics, most countries in the world consider the creator of the art piece to have the copyright on that piece of work for there lifetime + 70/100 years after death, there are exceptions to this in some countries. Additionally there is a significant amount of mis-information available on the web in regards to copyright and fair use. It's important to have an awareness of copyright as if your not careful it may preclude you from being able to share your texture pack with the minetest community. For a start see [Wikipedia Copyright].

Self-Created

If your creating all your textures from scratch ie not basing them on or using any other texture to create your texture then you are in most countries of the world considered to be the holder of the copyright to that texture/piece of work. As such you can use as permissive or as restrictive license as you like when releasing your texture pack.

Using Other Peoples Work

You'll need to check and make sure the work you are using or modifying to create your texture pack is under a licensing arrangement that allows this. If you don't perform this check later on if you wish to share your texture pack it will be difficult or next to impossible to do so. If the resources you are looking at using don't have a [clear permissive license or include no license] info it would be best to stay well clear of using those resources.

Depending on the licence used there maybe obligations around how the resources can be used, that you have attribute the original author and/or the type of license you need to use with your derivative work. If your at all in doubt it's best to leave that resource out.

Image Editing Software

It's well beyond the scope of this short page to detail how to use image editing software, there are numerous [free and commercial software packages] out there. Feel free to use your favorite the only requirement minetest has is that the image editor supports transparency (also called “alpha” or “mask”).

So your really stuck and don't know what to use/try and need it to be free:

  • [GIMP] - Very full featured equivalent to Photoshop, might be overwhelming for a new user, however there are a vast array of forums and community to help out.
  • [Paint.NET] - More than enough features to create graphics for minetest, again great community.
  • [lospec pixel art] programs list

Creating Textures

Textures for minetest maybe any size, but square images whose size is a power of 2 work best. For example 16×16, 32×32, 64×64, 128×128, 256x256 and 512x512 are preferred. You could go larger than 512 if you like but you'll be placing additional processing burden onto computing hardware for limited value in regards to graphics clarity. Some excellent highly detailed texture packs run in the range 128 to 256.

The minetest engine does not make use of all formats Irrlicht could use. The server only accepts the following file formats for graphics[3]:

  • .png
  • .jpg
  • .bmp
  • .tga
  • .pcx
  • .ppm
  • .psd
  • .wal
  • .rgb

Note that .gif is not listed. Animation in textures is simulated by rotating through linear aligned single frames within a given texture file.

Also check out the [texture_packs.txt] which can also be found under ~/your/path/to/minetest/doc

Where to Start

Creating a texture pack is no small task with 100's of different mods out there. To provide an idea [HDX] by Vanessa which is the most complete texture pack available and covers nearly all mods has 2553 unique texture files. However not all games use all mods so you can get excellent coverage of mods with a much smaller number of textures.

The biggest factor in completing a texture pack is that you set yourself a reasonable goal work on it slowly and enjoy what your doing, following are some quick ideas of how/were to start.

Create an Alternate Texture Pack

To get your feet wet and see if you even enjoy creating textures, it's often easiest to create an alternate texture pack for one of the smaller mods. Maybe a new graphic for an existing mod that you feel fits in better with the basic minetest texture pack. There are examples of Alt texture packs here. This can give you an idea or of what's needed and how long creating a texture pack will take. You can also wrap up the pack fairly quickly and get it out there for people to use.

Focus on default

The mod "default" is the most common mod used across most games as it includes all the basic textures to even generate a voxel map. That's not to say some games don't use it, just that many do. So if you can cover default your going to make some serious impact on the look and feel of a game. There are about 250 unique files inside default, the toughest textures to create are the animated ones eg torch and water. the easier tend to be wood planks and trees as often these can be a simple color shift in the first instance to differentiate tree and wood type.

How to Share

Your all done and ready to share your texture pack. There's a few things to check before you do:

  • Make sure to include and license.txt file and any relevant copyright and attribution notices in there.
  • Take a screenshot of your textures in use in game, people will be more likely to try your pack if they can see what its like

Where to Upload

Git or Equivalent

There are numerous places that run and use Git (or equivalent software) as a place for uploading your files. The beauty of Git is it gives you version control and allows other users of minetest to download and potentially add to your work in the future. Git is probably the best option for sharing texture packs however it can be a bit challenging to set up initially. It also provides transparency for those wishing to download your texture pack in that they can view the files online to ensure nothign malicious appears to be present. Popular providers include:

Minetest ContentDB

Submit it to the Minetest [ContentDB] for upload and sharing. Simply have to create an account

Zip it

If your texture pack is less than 1-2mb zipped you can simply attach it to your forum post when you make it.

Other Options

Make the Forum Post

Head over to the [Minetest Forum Texture pack section] and make a post. Below is a nice template you can use to create your post: Simply use (h)My Cool Headline Here(/h) instead of (size=150)(b)... (replace () with [], I had to use () because bbcode seems to get parsed within [icode] tags).

(h)About(/h)
Texture Pack Name - Whats the look and feel and theme for your textures

(h)Supported Games(/h)
[list]
[*]list supported Games here
[/list]

(h)Supported Mods(/h)
[list]
[*]Mod One
[*]Mod Two
[*]Mod Three
[*]Mod Four
[/list]

(h)Screenshots(/h)
[spoiler=Click to view][img]https://url.to.your.image/screenshot.png[/img][/spoiler]

(h)Download(/h)
You can download the pack from ???
[url=https://url.to.your.download/awesometexturepack]here[/url].
Additionally, you can always download fresh releases from Git as they are created: [url=https://url.to.your.git/awesometexturepack]here[/url]. 

(h)Other Links(/h)
[list]
[*][url=https://url.to.other.download/awesometexturepack]Other Link[/url]
[*][url=https://url.to.another.download/awesometexturepack]Another Link[/url]
[/list]

(h)License Info(/h)
[url=https://url.to.license/specificliscence]XXYZ Licence[/url]

If you have any questions, comments, requests, or concerns, feel free to make them known.

Hey don't forget to update the Wiki

[Add your texture pack to correct category on the wiki]

Notes and References

  1. [1]Minetest forum Sun/Moon tonemap discussion
  2. [2]Minetest forum Sun/Moon tonemap discussion
  3. As is hardcoded in the source file server.ccp near line 2360 as of June 2019