Time Nick Message 00:00 erle i can also render emojis and hacked in tabs 00:00 erle a bunch of control characters will show up as placeholder pics though 00:00 muurkha does Minetest know how to ingest TGAs without writing a Lua thing to read the format? 00:00 muurkha I mean it's pretty trivial... 00:00 erle obviously yes 00:00 muurkha hmm 00:01 muurkha think about doing the Paeth predictor thing 00:01 erle not necessary 00:01 muurkha it might buy you extra crunch 00:01 erle tga was removed when someone™ did a thing, but it was re-added after it was pointed out that mcl_maps used it for generated textures. 00:02 erle many games only load tga lol 00:02 erle it's just simple enough to get it right 00:03 erle in practice, obv every simple bitmap format would do, but for some reason people who have no idea how these formats look internally always point out that bmp exists and … one look at the wikipedia article is a big NOPE 00:03 erle i think i implemented a BMP writer once and it was awful (you need padding for each scanline or so) 00:03 erle anyways, don't get nerdsniped 00:04 erle i think the predictor thing is not useful 00:04 erle can you even do it in a single pass? 00:05 erle then again, my intuitions were wrong and might be wrong again hehe 00:05 erle muurkha, if you get to anything, tell. but i'll stop at the suggestion to use tga.z and obj.z 00:05 erle n8n8 00:07 muurkha I hacked together a BMP writer in Python one day on a ferryboat 00:07 muurkha on the way across the river 00:07 erle yes, it's not that hard, but it's obnoxious 00:07 muurkha the Paeth predictor is indeed single-pass 00:07 erle bmp is basically worse than TGA in any case i have seen, so it can go the way of the dodo 00:07 muurkha it does require you to buffer an entire scan line 00:08 erle if you can do it fast in lua, i am interested 00:08 erle because, again, generated textures in minetest mods 00:08 muurkha probably reasonably fast? 00:09 erle also the thing must be interoperable ofc 00:09 muurkha it's mostly explained in https://en.wikipedia.org/wiki/PNG#Filtering 00:09 erle so are you paeth predicting the entire file and making a custom compressor? 00:09 erle or inventing a new file format which is based on TGA but incompatible with everything else 00:09 muurkha well, you can think of it as an image filter 00:09 muurkha an invertible image filter 00:09 erle so? 00:10 erle you make a new file format right? 00:10 muurkha so you can think of it as taking a TGA as input and producing a TGA as output 00:10 muurkha of the same size 00:10 erle yeah i'm not interested 00:10 muurkha which is usually more compressible 00:10 erle i get it 00:11 erle but this is a holographic fracture 00:11 muurkha I mean Paeth ο zlib is conceptually the same kind of transformation as just zlib, right? 00:11 erle interpretation of information may differ at system boundaries 00:11 erle the naive user must not be able to confuse your faul tga with a real one 00:11 erle faux tga 00:12 muurkha if you want to put a blob of bytes on the meta property of something in the game, and then use some arbitrary Lua to convert it into a texture 00:12 erle that sounds bizarre 00:12 muurkha isn't that what you're doing with zlib? 00:12 erle i'd of course want the engine to support it in the end 00:13 erle given the hilarious way [png is implemented (make a temporary file, then read it again), i'm pretty sure a patch for tga.z would be accepted, given it's a much less [redacted] idea 00:13 erle but i want to *generate* textures in lua 00:14 erle i mean i am already doing it 00:15 erle anyway, good night 00:18 muurkha I feel like you could set byte 3 of the .TGA to, say, 66 instead of 2 00:18 muurkha to indicate that it's Paeth-predicted 00:19 muurkha looking at http://www.paulbourke.net/dataformats/tga/ 00:24 erle damn, i'm still not a sleep 00:24 erle look muurkha you are solving a different problem here 00:25 erle it's no longer about “how much can i wring out of existing dataformats/primitves” 00:25 erle but ”if i was not limited, how good could it get” 00:26 erle interesting problem, but the results are impractical to use, since you would have to patch every single program that uses TGA ig 00:26 erle meanwhile DEFLATE is available everywhere 00:27 erle i mean a data format lives and dies by if you can actually use it 00:28 erle which is also probably the reason why we two wrote BMP encoders, some other software wanted to consume that 01:18 muurkha oh, I was thinking "how can I compress textures transmitted between minetest servers and clients" 01:37 wsor just going to drop https://github.com/minetest-mods/skinsdb/pull/91 here for the people noticing that the skins database has been down for a few months. also tagging Krock 10:27 jonadab There is a categorical difference in prominence and importance, between PNG and Targa. And it is not in Targa's favor. Software that supports Targa, invariably also supports 30+ other image formats. Whereas it's almost easier to list software that *doesn't* support PNG. 10:32 erle jonadab it depends on the space you are in. on the web, tga is nothing. in gaming, well, a lot of textures on steam start their life as TGA or so i heard. 10:33 erle the source engine uses it as base for VTF for example 10:34 erle in any case, it has far more support than any new format, as it is probably the most basic widely-supported format that gives you the benefits of most of PNG color formats without the complexity 10:34 erle jonadab what do you think of the tga.z idea btw? 10:34 erle i literally see no downsides, as having smaller files than optipng can do without the runtime of optipng is pretty good (unexpectedly so) 10:35 erle and it's not like minetest uses PNG gamma (which leads to some weird blending bugs obv, but no one seems to care) 10:38 erle btw, if anyone here is rendering text in minetest mods, please tell me if you do bidi stuff 10:38 erle because if there is no interest at all, you get a broken bidi rendering ig 10:38 erle as in: if you mix hebrew and english it might look wrong 11:22 ROllerozxa I'm curious about your text renderer, does it write the text to a texture and send it as dynamic media? 11:46 s20 Might be a mundane question: Can people modify block textures to make them transparent? 11:47 s20 Does it depend on node properties which does not enable it for specific ones? 11:50 MTDiscord s20: yes, it depends on the node def - see the use_texture_alpha field (documented in lua_api.md) 11:51 s20 Ah, thanks for the clarification. Here's your answer @qasdwer 11:51 s20 Hmm, ping didn't work :shrug: 12:05 s20 What languages are available for translation/can be translated for the Minetest client? 12:12 rubenwardy full list: https://hosted.weblate.org/projects/minetest/minetest/ 12:13 rubenwardy not all of those are enabled in the client because of 1) no RTL support 2) other bugs with certain languages 3) translations not reaching a high enough % to be enabled 12:17 s20 Ah, I wanted to know it for Hindi. However, I remember the default MT font not supporting it? 12:19 s20 Checking that once 12:19 s20 It seems that it does not 12:20 erle ROllerozxa, what i have created is a thing that fills a pixel array in exactly the format tga_encoder expects it. you would send it as dynamic media, like mcl_maps and xmaps do. 12:22 erle (tga_encoder obviously expects different formats for indexed, 16bpp, 24bpp, 32bpp) 12:22 erle (or monochrome) 12:22 erle so basically i have a pure-lua unicode-text-to-pixels-in-a-texture rendering lib 12:25 erle before someone asks: no, it's not a good idea to use minetest.encode_png() with the pixel array. first, it only supports RGBA (while you probably want your text to be monochrome or indexed color-format-wise), second it produces ridiculously large files. third, as i have explained above, even optipng (which can take several seconds for a texture) is unable to beat the “throw zlib at the tga” hack filesize- or runtime-wise. 12:26 erle rubenwardy, can bidi-text be input in formspecs at all? 12:26 erle like are there issues? 12:26 rubenwardy not sure but I imagine not 12:26 erle imagine not input or imagine no issues 12:27 rubenwardy I imagine big issues 12:27 erle well i have researched sign libraries and since there is none as ambitious (i.e. full unicode), i.g. we have to try 12:27 rubenwardy Minetest doesn't support RTL, you can expect a lot of broken stuff when trying it 12:27 erle ah 12:28 erle rubenwardy, btw where does the image for tga_encoder on contentdb come from? i certainly did not put it there 12:29 erle i can provide images, but then i would need to know what to show. it's a library after all. 12:29 rubenwardy https://content.minetest.net/packages/erlehmann/tga_encoder/audit/ 12:29 rubenwardy the audit log shows that ROllerozxa added it 12:29 ROllerozxa hi yes that was me 12:30 erle maybe i can just make a similar image but generated by the library (and smaller) 12:30 erle give me a moment ^^ 12:31 rubenwardy images must be t least 950x517, and only png and jpeg is supported 12:31 erle give me more of a moment :P 13:15 erle rubenwardy ROllerozxa consider the following: https://git.minetest.land/erlehmann/tga_encoder/src/branch/master/logo.lua 13:15 erle if you wonder why the logo in the source is upside down, i keep to the default scanline order (i do not have to, but i do) 13:16 erle the upscaled logo is 1200×1200, would that be allowed or even a good logo for tga_encoder? 13:16 erle i mean it's not much better than the current one lol 13:16 erle maybe even worse 13:16 erle who knows 15:23 ROllerozxa erle: heh neat 15:23 ROllerozxa might wanna pad out the image so it's close to a 16:9 ratio (also because it will cut off at the edges to fit) 15:23 erle send a patch lol 15:24 ROllerozxa @_@ 15:24 erle do we have a pixelops library? 15:24 erle for scaling and shit 15:25 erle for more fun see https://git.minetest.land/erlehmann/tga_encoder/src/branch/master/examples.lua 15:29 erle hmm, the tga test images should probably be generated using tga_encoder 15:29 erle goals 15:30 erle ROllerozxa i enjoy the colormap feature so much for putting small images in source code 15:31 erle ROllerozxa the arrows in xmaps for example are generated like that https://git.minetest.land/erlehmann/xmaps/src/branch/master/generate_textures.lua 15:33 erle ROllerozxa since you added the image to tga_encoder, you using it for anything? or was it just “that thing is lacking a picture” 15:37 ROllerozxa well I find it to be a useful library, but I don't actually use it for anything at the moment 15:38 ROllerozxa anyways I thought just padding out the table could do it 15:53 erle ROllerozxa, wdym padding the table 16:18 ROllerozxa increasing the table size with black pixels, for the screenshot image 16:30 erle rubenwardy, why does contentdb show “recent positive reviews” and not “recent helpful reviews”? 16:30 erle are the recent reviews not helpful enough because no one upvoted them? 16:31 erle asking because for some packages there are positive reviews that say nothing and positive reviews that say A LOT 16:34 MTDiscord I would imagine that no one cares about negative reviews in this case; its for the purpose of suggesting the next thing to try 16:36 erle then you could limit it to positive HELPFUL reviews 16:37 erle i actually think negative reviews are pretty interesting 16:37 erle i'd love to try out mods by controversial (smallest difference between positive & negative votes, but high number of votes overall) 17:50 jonadab erle: It isn't just the web. PNG is supported by things like printers, file managers, email clients, the things that draw wallpaper on the root window / desktop, and flipping widget sets for crying out loud. It's probably the second most widely supported image format in the history of computing, after jpeg. 17:51 sfan5 I see there are productive discussions being had again 17:51 erle jonadab so? those environments *mostly* do not have the constraints of game engines. it does not matter at all how widespread something is *if your current toolchain supports it*. 17:52 erle similarly i could go on how gif is widespread, it would still *probably* be a stupid idea to use it in minetest 17:52 MTDiscord erle: re "pixelops library": best i can do is https://github.com/appgurueu/modlib/blob/master/tex.lua 17:53 jonadab erle: My point was that ".png is supported with this gross method, so it follows that Targa should be supported" is not sound logic. 17:53 erle jonadab oh, the argument was more overall one of code quality: if this weird and hackish way of doing was accepted in review, this non-gross and architecturally sound way probably has no issues. 17:54 jonadab erle: I think you should make the case for Targa on its own merits, without reference to something that is already in the codebase. 17:55 erle targa is already in the codebase, zlib is already there 17:55 jonadab Ah. 17:55 jonadab Didn't realize that. 17:55 erle always has been 17:55 erle so i merely showed that tga.z is 30% smaller than *the most optimized png* for a typical minetest texture 17:55 jonadab zlib makes since, most open-source software of any complexity uses it. 17:55 MTDiscord just make the case for sending some media (targa and wavefront obj, perhaps even .x and blitz3d) zlib-compressed, there hardly is a reason not to 17:55 erle so you merelly need to put together the pieces together differently 17:56 erle luatic well it was not all intuitive that the savings would be that big 17:57 erle i merely found it when i did the unicode text rendering library 17:57 erle and was pretty amused 17:57 ROllerozxa .x text format really could use some compression... 17:57 sfan5 we could really use a better model format 17:57 ROllerozxa yes of course 17:57 jonadab 30% size savings is probably worth making for something that has to be sent via the network, if there isn't a major perf difference in some other way (e.g., CPU cycles) against it. 17:58 sfan5 on that note I haven't had time to review the static gltf loading PR 17:58 erle nah there is not 17:58 erle what i think can be done and reduce traffic by quite a bit is, add support for tga.z and obj.z and then send it to older clients uncompressed 17:58 jonadab Many users won't notice a 30% savings by itself, but these things can add up. 17:58 erle what should *not* be done is automatically compress all tga or obj 17:59 erle just in case some rando thinks it's a good idea, it's a shitty one and don't do it 17:59 erle jonadab, several projects spend a ridiculous amount of time to run optipng on everything 17:59 erle it pollutes the git history and generally sucks 18:00 erle also because png has metadata, you regularly get mods where stuff is *not* optimized and the entire script of the bee movie is there in some png chunk or so 18:00 erle at least mineclone2 had that several times 18:00 erle a format that only has raw pixels does not offer this failure mode ;) 18:01 MTDiscord hah, imagine not scrubbing metadata 18:01 erle and tbh the main pull for me is the encoding speed (as i generate textures dynamically) 18:01 jonadab So we're talking about having the game server automatically convert/compress the images, what, as needed, when a client needs them? 18:01 erle no 18:01 erle that is wrong 18:01 erle i already wrote that 18:02 jonadab When would it happen then? At startup? 18:02 MTDiscord PBM would be nice. 18:02 erle i have spent a lot of time on figuring out what works and what not and “throw everything into zlib” does not work 18:03 MTDiscord I think erle is proposing burdening the mod authors with this 18:03 MTDiscord which I'm not sure is a good idea 18:03 erle luatic not necessarily 18:03 MTDiscord throwing everything into zlib certainly does work 18:03 MTDiscord just make sure to only use zlib if the size savings are worth it 18:03 erle yes that's the point 18:03 erle it sucks 18:03 jonadab Requiring module authors to convert images to Targa would be insane. 18:03 erle and you don't *always* save stuff 18:03 erle jonadab, you would not require that 18:04 erle but if so, it's like 20 lines of shell to convert a mod (have done that with minetest game and mineclone2 to see if the savings are imaginary) 18:04 MTDiscord erle: just have the the server try compression at startup and fall back to sending media files uncompressed if it turns out to not be worth it 18:05 erle why is it that EVERY SINGLE TIME i say “there is an obvious but subtly wrong solution to this problem DO NOT DO THE THING” people come out and immediately insist on DOING THE THING? 18:05 jonadab Because you haven't given an alternative yet, in terms that folks can understand. 18:05 erle do you think i have some strange ulterior motive for keeping you from doing greedy optimizations or so 18:06 erle what i propose is simply to start *small*, support tga.z and obj.z as file formats with backwards compatiblity, server-side. everything else can follow afterwards. 18:06 jonadab Ah. 18:07 jonadab So you're proposing not to _require_ mod authors to convert to Targa, but to _allow_ them to do so? 18:07 erle yes 18:07 erle specifically because i have written a text rendering library, for which the savings are *very large* 18:07 jonadab I mean, that's harmless, but module authors aren't going to do it. 18:07 erle as i said, people are willing to wait hours to get 3000 files through optipng 18:08 erle if you really want small transfer size, converting them to another file format and using deflate is MUCH faster 18:08 erle and just to spell it out: the reason why you do not want to automatically recompress everything before sending is a) CPU cycle waste b) it depends on the content of the image if you get any space savings at all 18:09 erle that's trivially true for every ccmpressed image format lol 18:09 erle just fill it with random noise 18:10 erle jonadab, the unique value proposition is a) smallest transfer size b) fast creation of textures 18:10 erle so it is probably the best method for dynamically creating textures 18:10 erle like the best, even in theory 18:11 erle like even if you fix minetest.encode_png() to use whatever optipng does, it could not ever beat it in runtime and filesize 18:11 erle because a) it would be noticeably slow for generated textures b) regardless you don't get a file that small unless you get to larger texture sizes than minetest typically uses 18:12 erle my ultimate goal is fast and efficient dynamic texture generation and transfer 18:12 erle e.g. unicode on signs 18:12 erle and by noticably slow i mean “optipng may take several seconds *per texture* even on the fastest hardware that my employer allows me to use” 18:12 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Inventory: Fix assertion caused by a no-op stack movement 130ba899e https://github.com/minetest/minetest/commit/0ba899e2390a397b2c68e33e96f8ba6c48739013 (152023-08-27T18:12:10Z) 18:12 MinetestBot 02[git] 04SmallJoker -> 03minetest/minetest: Inventory: skip redundant stack movement 13bf9f831 https://github.com/minetest/minetest/commit/bf9f831cb2a7977c16fe146abdd41c5ee85d0bb9 (152023-08-27T18:12:10Z) 18:12 MinetestBot 02[git] 04savilli -> 03minetest/minetest: Fix potential freeze in core.check_for_falling 13852d6a7 https://github.com/minetest/minetest/commit/852d6a7976d05e5ab58d6b8a685b1b488f914840 (152023-08-27T18:12:53Z) 18:13 erle jonadab you can try all that out yourself, install mtpaint or so, draw something and then save it in different formats. 18:14 erle basically, what quake etc. did (tga in zip) is a low-complexity, high-throughput local optimum that you probably can't beat at the texture sizes we are looking at 18:14 erle and 30% is 30% 18:15 erle now you can certainly make up something more complicated involving custom dictionaries for zstd or something 18:16 erle but my experience has taught me that this never pans out 18:17 erle see minetest.compress() with zstd (which could be better than zlib, but so far the only cases i have seen where it performed better than zlib were when you gave it several seconds to compress stuff or had more than about 4MB to 8MB of data) and minetest.encode_png(), which creates PNGs that are about 20 times the size that they should be 18:18 erle in both cases you have a complex solution which could be tuned, but it would put a *huge* burden on mod authors to, say, provide zstd dictionaries 18:19 MinetestBot 02[git] 04grorp -> 03minetest/minetest: Small setting-related fixes (#13755) 137b56daa https://github.com/minetest/minetest/commit/7b56daa2368be8de8514487f6c937f342d2d6ac5 (152023-08-27T18:18:41Z) 18:19 erle so back to the original point: i think just slapping already supported primitives together is a good idea 18:19 erle while trying to invent new image formats is not 18:21 erle jonadab also, to say it again: if you put images in item meta, you CERTAINLY want them to be as small as possible 18:21 erle because huge item meta = lag 18:25 erle and i'm pretty sure that the same kind of clowns who gave us this gem will put them in item meta 18:25 erle https://git.minetest.land/MineClone2/MineClone2/pulls/1939#issuecomment-30134 18:25 erle and you can't run optipng on item meta 18:25 erle surely you see where i am going with this 18:25 erle after all, i got a 97% filesize reduction in the linked comment 18:25 erle and no one before me even noticed 18:26 erle >4 kilobytes for a 16x16 texture, just by saving it using GIMP lol 18:26 erle that makes like 16 bytes for each pixel hehehehe 18:32 erle jonadab, i think the only lesson here is: if you make a NEW engine and you have small textures (below prob 256x256 or so) mainly, use tga.z and don't bother with any other format 18:32 erle it eliminates entire categories of png bloat errors :P 20:28 kyle56 erle: just read the chat log and saw what you did with the goatse. thats funny AF. reminds me of what i did to make sure links to my website were removed from the MT forum since they were on a page i could not access after i had asked my account be deleted. i like to look under the tail -F of my web server. saw that months after my account was deleted, someone found an old page through the forum. decided to have some fun. >:) 20:52 muurkha ego puto in horto meo. 21:28 MTDiscord Command sent from Discord by not luatic: 21:28 MTDiscord !tell TenPlus1 have you considered moving (or mirroring) your mods from notabug to a more reliable service such as codeberg? (notabug has been down again today) 21:28 MinetestBot MTDiscord: I'll pass that on when TenPlus1 is around 23:54 jonadab erle: Pretty sure the last time I used mspaint, it was running on Windows 95 OSR2, and did not support formats other than .bmp 23:54 erle jonadab, mtpaint, not mspaint 23:54 jonadab Oh, I thought that was a typo. 23:55 erle great, you are one of these google people hehe 23:55 jonadab Never heard of mtpaint. 23:55 erle PGP? did you mean: PHP? we helpfully searched for PHP instead 23:55 erle :P 23:55 jonadab No, I know what PGP was. 23:55 jonadab Though I haven't heard much about it lately. 23:55 erle i think google did that once 23:55 erle it still works and is still used 23:56 erle many people who say they “don't use PGP” use it to sign commits and for pass(1) the standard unix password manager (ed is the standard editor) 23:56 erle anyways, mtpaint is a pretty nice program to edit textures, especially colormapped ones 23:57 erle https://en.wikipedia.org/wiki/MtPaint 23:57 cheapie I'm assuming you don't mean this MT Paint: https://cheapiesystems.com/media/mtpaint-startup.webm 23:57 jonadab How on earth could people be using software that costs thousands of dollars per seat and not know it? 23:57 erle Mark Tyler's Painting Program 23:58 erle jonadab, you mean “they use the PGP protocol, not PGP, but GPG”? ;) 23:58 jonadab Ah.