Page 1 of 1

[Idea] Texture map for tiles and items

PostPosted: Fri Sep 07, 2012 13:53
by Hgdavidy
Why dont add in the game support for large texture map like Minecraft, only 1 texture for all tiles for performance and speed making textures (all textures in one) (Ex: make a 512x512 .png with 1024 tiles support).
With this only need load one texture for all tiles = more performance and speed.

This is like sprite support...
For tiles and items.

Ty.

PostPosted: Fri Sep 07, 2012 14:10
by sfan5
Minetest combines all loaded Textures into one "Texture Atlas", which is simply a big Image

PostPosted: Fri Sep 07, 2012 14:36
by Hgdavidy
Oh nice

Ty.

PostPosted: Thu Sep 13, 2012 12:08
by tonyka
I dont have doubled the topic of miracle ...

the perfect idea is to create a enveloping imaging system (as used by most 3D games including MC)
how to apply will be Extremely simple:
could be done in two ways to suit the artist ...
  1. texture atlas group by node
  2. texture atlas group by multiple nodes
The image should be accompanied by a text file with the following form of texture mapping:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
default:chest (    -- name of node
    tile_set = {1,1, 48,32 },    --group of tiles => {px 1 horizontal, vertical, px 2 horizontal, vertical}
    tiles={
        {1,1, 16,16},    --top
        {1,17, 16,32},    --down
        {17,1, 32,16},    --side 1
        {17,17, 32,32},    --side 2
        {33,1, 48,16},    --front
        {33,17, 48,32},    --back
    },
)


benefits:
more organized
textures systems with a single 256-color indexed palette (lower file size, and lower system resources)
could be changed at will without changing all nodes in lua files

PostPosted: Thu Sep 13, 2012 13:58
by Sokomine
Yes, that would be nice, especially if it could be done for individual mods. The whole texture atlas of a game with several mods installed soon grows too large. As long as that doesn't exist: Does anybody know a way to split up Minecraft-like textures.png into individual files more or less automaticly? (preferably in lua)

PostPosted: Thu Sep 13, 2012 14:14
by tonyka
could be done a script for the program imagemagick ...
but I do not know how to do

PostPosted: Thu Sep 13, 2012 14:34
by tonyka
to be done with lua?
then with python ...
and is there any mod that can run python programs ...
for example this mod:
http://minetest.net/forum/viewtopic.php?id=2747

PostPosted: Thu Sep 13, 2012 15:12
by Sokomine
Lua was only a consideration because people running Minetest will have it. The mod might check if its image files are there and otherwise extract the texture.png. As far as I understand it the map mod does use an external python program to generate the map and reads only the generated image.

PostPosted: Fri Sep 14, 2012 00:16
by cornernote
i like this idea too, it means a MC texture pack could be used without chopping any images, just write a few lines of code and its done. which means when the MC pack is updated, its super easy to update the MT version.

PostPosted: Fri Sep 14, 2012 00:32
by tonyka
yes, copy & paste...