Add support for tilesets
- iisu
- Member
- Posts: 220
- Joined: Tue Mar 28, 2017 20:13
- GitHub: iisu
- IRC: iisu
- In-game: iisu
- Location: Internet
Add support for tilesets
Tilesets are commonly used in games when there are many small textures. The basic concept is that instead you should use bigger files each containing a grid of textures called tiles. When you load the tileset, you then split it into the tiles in the program. The purpose for this technique is to optimize loading textures: it takes less time to load a single file and perform some simple operations on it than to load many small files separately. Mod API should provide an easy way to load tilesets and cut them according to given parameters.
Roses are red, violets are blue. Omae wa mou shindeiru.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: Add support for tilesets
I get you argument, but it would probably be a pain for texture pack maintainers.
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Add support for tilesets
This is not a bad idea. It's not much different than the way that textures for player models in Minetest are stored.
I imagine the tileset storage method would be of particular benefit for remote hosting of media. I don't know if Minetest supports HTTP keep-alive sessions, but no doubt there is still going to be less overhead transferring a single large image file for each node than hundreds of small image files for every node face.
I imagine the tileset storage method would be of particular benefit for remote hosting of media. I don't know if Minetest supports HTTP keep-alive sessions, but no doubt there is still going to be less overhead transferring a single large image file for each node than hundreds of small image files for every node face.
- iisu
- Member
- Posts: 220
- Joined: Tue Mar 28, 2017 20:13
- GitHub: iisu
- IRC: iisu
- In-game: iisu
- Location: Internet
Re: Add support for tilesets
I thought more of one or a couple tilesets for entire mod but your point is also valid. We do this with player skins already afterall.
I wonder if it would noticeably affect the gameplay if merged default mod's textures in a single image file and also gave it a proper compression.
An external utility to convert a tileset to a series of single textures and back for texture pack maintainers who still want to work on single files should be relatively easy to write but working on a single tileset file also has benefits for a designer: you could see how all textures look together and it's generally easier to maintain a consistent style when you have everything on one sheet so you don't need to jump between files to check if you're not screwing some important details. Also it's easier to chose one color palette and stick to it which will make your texture pack look more consistent and professional.
I wonder if it would noticeably affect the gameplay if merged default mod's textures in a single image file and also gave it a proper compression.
An external utility to convert a tileset to a series of single textures and back for texture pack maintainers who still want to work on single files should be relatively easy to write but working on a single tileset file also has benefits for a designer: you could see how all textures look together and it's generally easier to maintain a consistent style when you have everything on one sheet so you don't need to jump between files to check if you're not screwing some important details. Also it's easier to chose one color palette and stick to it which will make your texture pack look more consistent and professional.
Roses are red, violets are blue. Omae wa mou shindeiru.
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Add support for tilesets
I agree with your points. According to this video by octacian, tilesets (or more aptly sprite sheets) were added in 0.4.16. I haven't had a chance to scan through the recent changelogs, but it's undoubtedly mentioned somewhere.
https://www.youtube.com/watch?v=sieIpZoR_Mg
https://www.youtube.com/watch?v=sieIpZoR_Mg
- kaadmy
- Member
- Posts: 706
- Joined: Thu Aug 27, 2015 23:07
- GitHub: kaadmy
- IRC: KaadmY
- In-game: KaadmY kaadmy NeD
Re: Add support for tilesets
Yeah, you can use tilesheets via something like ^[sheet;x,y I think.
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Add support for tilesets
I'm curious if this is indeed a new feature? Or is it supported by client versions prior to 0.4.16?
- webdesigner97
- Member
- Posts: 1328
- Joined: Mon Jul 30, 2012 19:16
- GitHub: webD97
- IRC: webdesigner97
- In-game: webdesigner97
- Location: Cologne, Germany
- Contact:
Re: Add support for tilesets
I think we used to have something like this in earlier versions (correct me if I'm wrong). It was called Texture Atlas and caused a lot of problems...
Visit me: webD97.de | @GitHub | @DeviantArt
Mods: StreetsMod | Vehicles
Featured from my blog: Dockerize the Minetest server
On my own behalf: Chameleon - A PHP image manipulation library built around GD
Mods: StreetsMod | Vehicles
Featured from my blog: Dockerize the Minetest server
On my own behalf: Chameleon - A PHP image manipulation library built around GD
- Wuzzy
- Member
- Posts: 4804
- Joined: Mon Sep 24, 2012 15:01
- GitHub: Wuzzy2
- IRC: Wuzzy
- In-game: Wuzzy
- Contact:
Re: Add support for tilesets
Texture sheets will be a nightmare for texture pack makers, however. If you want to change the texture of a single block only, you have to overwrite a big file with maybe 256 textures/tiles. There is a good reason why we have 1 file per texture.
I don't like this idea. If you want to optimize servers, the server could automatically do this texture sheet thing, but only as an internal measure. In general, I think any optimization should be made in a way that they are totally transparent to texture pack makers. If this is not possible, discard the idea, think of a better one. :P
I don't like this idea. If you want to optimize servers, the server could automatically do this texture sheet thing, but only as an internal measure. In general, I think any optimization should be made in a way that they are totally transparent to texture pack makers. If this is not possible, discard the idea, think of a better one. :P
- sorcerykid
- Member
- Posts: 1847
- Joined: Fri Aug 26, 2016 15:36
- GitHub: sorcerykid
- In-game: Nemo
- Location: Illinois, USA
Re: Add support for tilesets
I agree Wuzzy, the tilesets could easily be generated on the fly during server startup. It seems unduly complex for mod authors to have to manually splice together the textures particularly since the engine already has access to libraries necessary for manipulating images internally, so it could be easily automated.Texture sheets will be a nightmare for texture pack makers, however. If you want to change the texture of a single block only, you have to
overwrite a big file with maybe 256 textures/tiles. There is a good reason why we have 1 file per texture.
- rubenwardy
- Moderator
- Posts: 6978
- Joined: Tue Jun 12, 2012 18:11
- GitHub: rubenwardy
- IRC: rubenwardy
- In-game: rubenwardy
- Location: Bristol, United Kingdom
- Contact:
Re: Add support for tilesets
Texture overrides would help with nodes, but not other thingsWuzzy wrote:Texture sheets will be a nightmare for texture pack makers, however. If you want to change the texture of a single block only, you have to overwrite a big file with maybe 256 textures/tiles. There is a good reason why we have 1 file per texture.
- Linuxdirk
- Member
- Posts: 3219
- Joined: Wed Sep 17, 2014 11:21
- In-game: Linuxdirk
- Location: Germany
- Contact:
Re: Add support for tilesets
It is undeniably utter nonsense to have mod makers or texture artists care about tilesets by themselves. 1 node = 1 file is the best solution for everyone.Wuzzy wrote:I don't like this idea. If you want to optimize servers, the server could automatically do this texture sheet thing, but only as an internal measure.
But I wonder if it’s faster to have the server create a tileset load it as a whole and then split the tileset as needed in RAM or load the same amount than tiles as individual files.
- iisu
- Member
- Posts: 220
- Joined: Tue Mar 28, 2017 20:13
- GitHub: iisu
- IRC: iisu
- In-game: iisu
- Location: Internet
Re: Add support for tilesets
Arithmetic operations are faster than I/O operations.Linuxdirk wrote:I wonder if it’s faster to have the server create a tileset load it as a whole and then split the tileset as needed in RAM or load the same amount than tiles as individual files.
I didn't say tileset format should be required from texture artists to use but it is sometimes easier to use (e.g. when you care about consistent design, as I said in my second post). Ideally, the server would check if the tileset file exists when starting; if it does, load it, if it doesn't, generate it from existing individual files. This resolves both of your concerns.Linuxdirk wrote:It is undeniably utter nonsense to have mod makers or texture artists care about tilesets by themselves. 1 node = 1 file is the best solution for everyone.
Roses are red, violets are blue. Omae wa mou shindeiru.
- voxelproof
- Member
- Posts: 1087
- Joined: Sat Aug 05, 2017 08:13
- Location: Europe
Re: Add support for tilesets
That depends on the style of creation. If you want to make a simple 8px lego-like TP with no more artistically ambitious goals, it's true. But if you want to work out a more detailed TP, say 32px, with a view of enhancing immersiveness of virtual worlds display, you have to check different visual interactions of textures in action, not just by looking at the tableau of textures. You have to watch how they perform in different lighting conditions, with smooth lighting on, off, different sets of shaders, in different biomes etc. I have some (well, maybe more than 'some') experience with making textures and only once there was a situation when this kind of arrangement of texture pack would be useful - when I wanted to change shade of dry grasses (there're several hights of them) - even was thinking about merging them into a single file and then perform edition. But except this single case I suppose I wouldn't find this useful.iisu wrote: I didn't say tileset format should be required from texture artists to use but it is sometimes easier to use (e.g. when you care about consistent design, as I said in my second post).
Simply speaking, such arrangement says very little, if anything at all, how the textures will perform, because it is strongly dependent both on the surroundings of their display, and on the shapes these textures are put on.
I think such solution (although of course easily achievable) would provide some benefit not for TP creators and maintainers, but for users who don't have time, skills or patience to go into details of each and every one texture, and rather want to make all of them at once lighter, darker, more greenish etc. But this has little to do with truly professional graphic design of a game.Ideally, the server would check if the tileset file exists when starting; if it does, load it, if it doesn't, generate it from existing individual files. This resolves both of your concerns.
To miss the joy is to miss all. Robert Louis Stevenson
- iisu
- Member
- Posts: 220
- Joined: Tue Mar 28, 2017 20:13
- GitHub: iisu
- IRC: iisu
- In-game: iisu
- Location: Internet
Re: Add support for tilesets
Such solution would enable the optimization I talked about earlier, regardless of whether the textures have been created as a single tileset manually or generated by the the server from separate files in a previous boot.voxelproof wrote:I think such solution (although of course easily achievable) would provide some benefit not for TP creators and maintainers, but for users who don't have time, skills or patience to go into details of each and every one texture, and rather want to make all of them at once lighter, darker, more greenish etc. But this has little to do with truly professional graphic design of a game.Ideally, the server would check if the tileset file exists when starting; if it does, load it, if it doesn't, generate it from existing individual files. This resolves both of your concerns.
Anyways, I don't think this is so important. The optimization probably wouldn't be even noticeable. Minetest has many problems that are more relevant.
Roses are red, violets are blue. Omae wa mou shindeiru.
- voxelproof
- Member
- Posts: 1087
- Joined: Sat Aug 05, 2017 08:13
- Location: Europe
Re: Add support for tilesets
[/quote][/quote]iisu wrote: Anyways, I don't think this is so important. The optimization probably wouldn't be even noticeable. Minetest has many problems that are more relevant.
My point of view is the one of a designer :) If an optimization was to make the game run noticeably faster, of course making one tileset either manually or by program itself would be very welcome.
And I agree that Minetest has more serious issues - imho one of the more serious are lighting problems inside large areas of woods. But all in all it is a very good engine - I truly hope that the coming upgrade won't kill majority of mods designed for previous versions.
To miss the joy is to miss all. Robert Louis Stevenson
Who is online
Users browsing this forum: No registered users and 7 guests