Long node names are hard to read though; the mod should use line breaks.
This mod slowed loading the game a lot. This was fixed and I can recommend it now.
Part of my earlier critcism is still relevant and there was a conversation, so my previous review can be read below. Note that I have since put the mod tga_encoder on ContentDB, which makes it trivial to generate textures for Minetest <5.5.
This mod does exactly what the description says.
However, it contains three technical flaws:
First, textures are regenerated every time a world is loaded. This is wasteful and not necessary. This is probably what makes it very slow.
Second, textures are given via the texture modifier [png. This is wasteful and does not degrade gracefully in older versions.
Third, textures are generated as RGBA, even though they are simple monochrome bitmaps.
Here is how I would fix those:
First, write the textures to the filesystem instead of using the [png texture modifier.
Second, generate the text textures only if they do not exist on the filesystem yet.
Third, use TGA as the file format (~20 bytes header, dump pixels, write footer).
This should result in a mod that is much faster and also compatible with older Minetest versions.
Disk saving was on my to-do before I got distracted from this :P Thanks for reminding me.
The current way of generating textures is rather wonky dumb, bodged together in a night. Its performance could be improved vastly.
[png was used due to the current method of overriding the textures, dynamic media does not yet allow so.
As far as I can tell, minetest.encode_png does not accept a monochrome format, it has to be RGBA, ColorSpecs are RGBA also.
Does Minetest accept TGA? lua_api.txt heavily pushes PNG, should be changed if other formats are accepted.
What would be best was if MT accepted binary PBM ;)
I personally will not put effort into supporting & testing older than the latest release, however anyone is free to send me a patch if the modifcations are minor!
Minetest before version 5.5 claimed to support a wide variety of texture formats: PNG, JPG, BMP, TGA, PCX, PPM, PSD, WAL, RGB. All except PNG, JPG, BMP were removed when hecks gutted the Irrlicht library to create Irrlichtmt. Support for TGA was only restored after I complained, since it is both useful (very simple format useful for texture generation & in-place texture editing, even uncompressed TGA files are smaller than PNG for very small textures) and in use in MineClone2 (in mcl_maps).
The implementation of minetest.encode_png() is very wasteful. You can check this yourself: Just use optipng on the checkerboard texture that devtest generates for the PNG test nodes … and reduce its size to 5% of the size that MInetest writes. Also for a lot of use cases an API that takes a color palette would have made much more sense than a full RGBA. My personal suspicion is that it was made “just because” and without any deep understandng of texture formats or needs of mod authors, but I bet you can draw your own conclusions when you look at the issues about texture formats in Minetest and Irrlicht.
Btw, the [png modifier is a hilarious addition. I think it has about 100 bytes of overhead before it starts to encode a single pixel. This makes it both unsuited for small images and inefficient for large ones. It is so bad that you could literally make a texture modifier for plain PBM and would have a human-readable bitmap texture modifier that used less storage space for small textures up to like 10×10 textures or so.
I personally will not put effort into supporting & testing older than the latest release, however anyone is free to send me a patch if the modifcations are minor!
Does your package have a git repository? If so, please link it.
As I am generating the textures in Lua, they have to be sent dynamically, or at least that is the impression I've got. As I am not yet saving to disk, [png was required.
If they're saved to disk the this will only be the case the first load, when the textures need generating.
Not your fault, unless you're a mind reader, but I've read your messages about images many a times before ;) was just unaware TGA was actually in the engine.
No git. My email is easily available, and the source's probably in your mods folder :P
This mod makes the world a lot more literal.
Long node names are hard to read though; the mod should use line breaks.
This mod slowed loading the game a lot. This was fixed and I can recommend it now.
Part of my earlier critcism is still relevant and there was a conversation, so my previous review can be read below. Note that I have since put the mod
tga_encoder
on ContentDB, which makes it trivial to generate textures for Minetest <5.5.This mod does exactly what the description says.
However, it contains three technical flaws:
First, textures are regenerated every time a world is loaded. This is wasteful and not necessary. This is probably what makes it very slow. Second, textures are given via the texture modifier [png. This is wasteful and does not degrade gracefully in older versions. Third, textures are generated as RGBA, even though they are simple monochrome bitmaps.
Here is how I would fix those:
First, write the textures to the filesystem instead of using the [png texture modifier. Second, generate the text textures only if they do not exist on the filesystem yet. Third, use TGA as the file format (~20 bytes header, dump pixels, write footer).
This should result in a mod that is much faster and also compatible with older Minetest versions.
Disk saving was on my to-do before I got distracted from this :P Thanks for reminding me.
The current way of generating textures is rather wonky dumb, bodged together in a night. Its performance could be improved vastly.
[png
was used due to the current method of overriding the textures, dynamic media does not yet allow so. As far as I can tell,minetest.encode_png
does not accept a monochrome format, it has to be RGBA, ColorSpecs are RGBA also.Does Minetest accept TGA?
lua_api.txt
heavily pushes PNG, should be changed if other formats are accepted. What would be best was if MT accepted binary PBM ;)I personally will not put effort into supporting & testing older than the latest release, however anyone is free to send me a patch if the modifcations are minor!
Thanks for the comments!
Minetest before version 5.5 claimed to support a wide variety of texture formats: PNG, JPG, BMP, TGA, PCX, PPM, PSD, WAL, RGB. All except PNG, JPG, BMP were removed when hecks gutted the Irrlicht library to create Irrlichtmt. Support for TGA was only restored after I complained, since it is both useful (very simple format useful for texture generation & in-place texture editing, even uncompressed TGA files are smaller than PNG for very small textures) and in use in MineClone2 (in
mcl_maps
).The implementation of
minetest.encode_png()
is very wasteful. You can check this yourself: Just use optipng on the checkerboard texture that devtest generates for the PNG test nodes … and reduce its size to 5% of the size that MInetest writes. Also for a lot of use cases an API that takes a color palette would have made much more sense than a full RGBA. My personal suspicion is that it was made “just because” and without any deep understandng of texture formats or needs of mod authors, but I bet you can draw your own conclusions when you look at the issues about texture formats in Minetest and Irrlicht.Btw, the
[png
modifier is a hilarious addition. I think it has about 100 bytes of overhead before it starts to encode a single pixel. This makes it both unsuited for small images and inefficient for large ones. It is so bad that you could literally make a texture modifier for plain PBM and would have a human-readable bitmap texture modifier that used less storage space for small textures up to like 10×10 textures or so.Does your package have a git repository? If so, please link it.
Why would dynamic media be needed here?
As I am generating the textures in Lua, they have to be sent dynamically, or at least that is the impression I've got. As I am not yet saving to disk,
[png
was required. If they're saved to disk the this will only be the case the first load, when the textures need generating.Not your fault, unless you're a mind reader, but I've read your messages about images many a times before ;) was just unaware TGA was actually in the engine.
No git. My email is easily available, and the source's probably in your mods folder :P
Latest release solves your first two criticisms. I do not know what this makes the minimum version, it is still set to 5.5.