Minetest logo

IRC log for #minetest, 2023-11-07

| Channels | #minetest index | Today | | Google Search | Plaintext

All times shown according to UTC.

Time Nick Message
00:34 proller joined #minetest
00:53 proller joined #minetest
00:59 proller joined #minetest
01:01 smk joined #minetest
01:11 proller joined #minetest
01:14 Noisytoot joined #minetest
01:24 proller joined #minetest
01:44 peterz joined #minetest
01:58 YuGiOhJCJ joined #minetest
02:02 fluxionary joined #minetest
02:10 y5nw joined #minetest
03:13 gxt joined #minetest
03:30 gxt joined #minetest
03:45 YuGiOhJCJ joined #minetest
03:58 sknebel joined #minetest
04:48 fluxionary joined #minetest
04:50 qqq joined #minetest
04:58 Waffelo joined #minetest
05:00 MTDiscord joined #minetest
05:11 dabbill joined #minetest
05:28 est31 joined #minetest
07:26 YuGiOhJCJ joined #minetest
07:29 xBarkDog joined #minetest
07:56 copygirl Is there a way to define nodes such that if the mod adding them is removed, they are automatically replaced by a "fallback" node of sorts?
07:56 copygirl In my case I want to add stairs and such to NodeCore, but if removed, it'd be nice if they got replaced with the base material block.
08:11 libera-staff joined #minetest
08:24 TomTom joined #minetest
08:26 mrkubax10 joined #minetest
09:15 erle copygirl you could make a second mod that simply aliases those
09:15 erle but the issue there is that they could not be active at the same time otherwise all hell breaks loose
09:39 CRISPR joined #minetest
10:20 sys4 joined #minetest
10:21 YuGiOhJCJ joined #minetest
10:26 est31 joined #minetest
10:36 mrkubax10 joined #minetest
10:49 YuGiOhJCJ joined #minetest
10:49 Sobinec joined #minetest
11:14 appguru joined #minetest
12:11 shaft joined #minetest
12:30 erle celeron55 muurkha i am raytracing inside minetest https://mister-muffin.de/p/2UTI.png :D
12:31 erle (soon)
12:31 CRISPR joined #minetest
12:51 shaft fancy
12:58 erstazi joined #minetest
13:18 shaft I had some thoughts regarding Voxel Area Entities and Other Worlds. Why don't you increase X in the lua api for getnode setnode to int and use the new "space" in the int for dimension coordinates? Then you'd have plenty of space both for VAE and World Coordinates and most Lua side world generators should probably still work without being dimension aware. Internally the nodes and entities of each world should of course have world
13:18 shaft coordinates.
13:19 shaft Most important is probably though that you settle on how to implement it or it will never be done.
13:20 shaft The idea is just extended from what celeron wrote
13:21 Waffelo joined #minetest
13:21 shaft Worlds already have some buffer area that should prevent blocks from one dimension ending up in the other
13:22 erle i am going to make a photography mod lol https://mister-muffin.de/p/W912.png
13:23 shaft I already saw it. Cool
13:23 erle this is a better variant
13:23 erle look at it
13:23 erle it has very primitive lighting
13:24 shaft Oh, now I see
13:28 shaft World generators would still need to be isolated
13:28 erle shaft prototype it?
13:28 erle btw overloaded values are bad
13:28 erle mkay
13:29 shaft Why? They'd work the same way.
13:29 erle what
13:30 shaft 2000065-1 is still 2000064
13:31 erle i don't get it
13:31 celeron55 yeah definitely not that way. even if it would be implemented in the engine as some kind of space partitioning hack (probably not), it shouldn't look like that to lua
13:31 celeron55 it would be a good place to partition lua into separate environments
13:31 celeron55 so that each voxel space could run in its own thread
13:32 celeron55 then almost no apis would require direct changes
13:33 celeron55 and however the inter-space interaction would be implemented would handle that in addition to the different spaces
13:34 celeron55 of course world-global stuff would require changes then, as it would have to deal with multiple lua environments
13:34 celeron55 but the basic coordinate stuff would stay the same
13:34 shaft And you might want to build more than one boat.
13:35 shaft But if you already settled on that then why don't you write it down?
13:35 shaft https://dev.minetest.net/TODO#Voxel_Area_Entities
13:35 erle i'd appreciate it if the world would be fixed first (e.g. double coordinate accuracy)
13:35 appguru joined #minetest
13:35 erle hey appguru check this shit out: https://mister-muffin.de/p/W912.png
13:35 celeron55 this is my recommendation, i could of course write it on my personal roadmap thread on the forum. would probably be the best place for such
13:36 definitelya joined #minetest
13:36 shaft But erle thinks the same. Maybe hold a vote or or make the biggest contributers decide
13:40 shaft Think about LEGO? What's their biggest selling point? Vehicles. Spaceships, the AT-AT from Star Wars, the Titanic and similar stuff
13:40 shaft Voxelgames like Minecraft and Minetest are just virtual LEGO
13:41 erle check out my studs mod then https://content.minetest.net/packages/erlehmann/studs/
13:41 erle lego minetest
13:42 shaft lol, very literate
14:02 celeron55 for what it's worth https://forum.minetest.net/viewtopic.php?p=430247#p430247
14:04 shaft great :)
14:06 erle i see this being abused to make euclidean manifolds
14:06 DeepThgt idle question, but what is the "walled in cave problem"
14:07 DeepThgt https://dev.minetest.net/TODO context is the MapVoxelManiupulator
14:12 erle warr1024 do you have any use for photo-mod like stuff in nodecore? or any idea?
14:19 s20 joined #minetest
14:20 s20 joined #minetest
14:35 agm joined #minetest
14:36 agm hello!  are changes to the world automatically saved in minetest game?  i can't find this information in the wiki
14:37 ROllerozxa the engine saves the map every 5.3 seconds by default (see server_map_save_interval)
14:38 agm interesting!  what about player's position?  will i resume in the same place where i left?
14:40 grorp joined #minetest
14:42 erle agm approximately. there exist some exceptions. if you go way out of bounds you get to the origin.
14:43 agm thanks
14:45 erle agm also you can crash the engine in some ways so that it will not save stuff. do not try to fix that, it is conceptually way too difficult to be useful. rather fix the crashes in your mods/games.
14:45 erle (what you get then is the state from the last save)
15:38 Sharpman joined #minetest
15:38 Sharpman left #minetest
15:39 Sharpman joined #minetest
15:55 erle photo mod update: https://mister-muffin.de/p/eKwk.png
15:58 jaca122 joined #minetest
16:00 DeepThgt are the resulting photos then placeable nodes erle
16:00 erle no because i did not get there
16:00 erle but that's trivial, see my code in xmaps
16:01 DeepThgt noice, this seems like a good project
16:01 erle well i wonder how to do the coloring. but i can just leave it black and white.
16:01 DeepThgt when you need testers let me know, i might toss it on Pernia
16:01 erle what is pernia?
16:02 DeepThgt my and a friend's server
16:02 erle anything else other than having placeable nodes that would be neat for you?
16:02 erle i mean right now there is a chatcommand /snap
16:03 DeepThgt tbh, i didnt even know i wanted this mod until 2 min ago
16:03 erle hahaha
16:03 erle :D
16:03 DeepThgt maybe a camera tool
16:03 DeepThgt that takes the pic
16:03 DeepThgt for the less cli inclined players
16:04 erle well the issue at hand here is that i am generating an item with an associated bitmap
16:04 erle so if it is too easy to do someone can just fill the server disk
16:04 erle basically like mcl_maps, or books or coras unicode signs, this is a user-triggerable memory leak ;)
16:05 DeepThgt suggestion of having an int define the max photos per player?
16:05 erle that breaks immersion though
16:05 erle and also maybe you WANT to have a photo wall
16:05 DeepThgt ya :/
16:05 DeepThgt ok, film
16:05 DeepThgt craftable, expensive
16:06 DeepThgt so, if you want a photo wall gotta grind for it
16:06 Sharpman joined #minetest
16:06 erle DeepThgt made out of … ?
16:06 erle in before mese + something else lol
16:06 DeepThgt im looking that up
16:06 DeepThgt to see whats most accurate
16:06 erle everything important is made of mese hehe
16:07 DeepThgt grrr, issue is im used to playing heavily modded
16:07 DeepThgt so im not thinking of default items
16:09 DeepThgt ok, its a digital polaroid style camera. it has to slowly charge via solar cell which is craftable. takes half a day to get 2 shots off the battery
16:10 DeepThgt ofc that would complicate the codebase considerably to add a charging mechainc
16:10 DeepThgt idk i never said my ideas where good, just ideas
16:10 erle i guess i just make a proof of concept mod lol
16:11 erle and you figure out what kind of APi you want
16:11 erle and tell me
16:11 erle btw if you have a good idea to get node colors in grayscale, tell me
16:11 erle i am totally faking everything here lol
16:12 DeepThgt just staring out w/ lua myself not the best one to ask
16:12 DeepThgt your faking does lead to decent results at least
16:13 erle DeepThgt well yeah that's why i keep doing it :D
16:19 grorp1 joined #minetest
16:19 DeepThgt ok erle ive got a sensible craft recipe and way to limit the usage without breaking emmersion using all default in mt game
16:19 DeepThgt its a Daguerreotype camera
16:19 DeepThgt thats why BW
16:20 DeepThgt you gotta craft a cloth to polish the plate (cotton), silver and copper ore to make the plate
16:20 DeepThgt and it takes time to take the photo
16:20 erle that is a given
16:20 DeepThgt place the node, wait all day, then photo is in the inv slot of the camera that was placed
16:20 erle because i do raycasting
16:20 erle LOL
16:20 erle i love it
16:21 erle but also i am too lazy
16:21 DeepThgt oh so it does take some time for the photo, nice it fits perfect lol
16:21 erle have you read rubenwardy's book?
16:21 erle i make you a good base and then you fork it and implement that stuff ok?
16:21 erle or i give you a good api
16:21 erle to create a picture
16:22 DeepThgt no, and ya i might see if that can be my first project. all ive done is edit others work so far to suit our desires on the server
16:22 DeepThgt this seems like fun
16:35 sparky4 joined #minetest
17:02 erle DeepThgt i supersampled the scene and see, depth of field effect + increase in quality around the edges: https://mister-muffin.de/p/H9o_.png
17:04 DeepThgt WOW!
17:05 erle this is basically where i learned the technique from http://eastfarthing.com/blog/2016-01-12-card/
17:05 erle (and similar articles about it)
17:06 erle for each pixel, you cast a ray until it hits something
17:06 erle then you calculate the color at that point
17:06 erle if you do that several times for a pixel, but slightly random direction
17:06 erle then you get a depth-of-field effect
17:07 erle as a slight change in direction is a larger change in target further out
17:07 erle so elements further away get more blurry
17:07 DeepThgt makes sense
17:07 erle i also use fog
17:07 erle clamp( math.pow ( distance / 64, 2 ), 0, 1 )
17:07 erle that's my fog function
17:08 erle and to mix it: math.floor( l_color * ( 1 - fog_amount ) + background_color * fog_amount )
17:08 erle where l_color is base_color * light
17:09 erle if i hit nothing, background_color is basically the sky color
17:27 sparky4 joined #minetest
17:35 CRISPR joined #minetest
18:06 sparky4 joined #minetest
18:13 mrkubax10 joined #minetest
18:14 Talkless joined #minetest
18:19 syl joined #minetest
18:34 sparky4 joined #minetest
18:36 Boingo joined #minetest
19:00 ___nick___ joined #minetest
19:09 sparky4 joined #minetest
19:14 ___nick___ joined #minetest
19:18 ___nick___ joined #minetest
19:41 erle DeepThgt photos can now be hung on walls hehe https://mister-muffin.de/p/xnLL.png
19:42 DeepThgt noice
20:20 Desour joined #minetest
20:36 sparky4 joined #minetest
20:36 appguru joined #minetest
20:47 Waffelo joined #minetest
21:01 Boingo joined #minetest
21:03 grorp joined #minetest
21:04 Boingo joined #minetest
21:09 Boingo joined #minetest
21:19 MinetestBot [git] rollerozxa -> minetest/minetest: Debundle Minetest Game (#13818) 570fc90 https://github.com/minetest/minetest/commit/570fc90bf6c7a842b2d8b9874fef5d843ee5fc76 (2023-11-07T21:18:26Z)
21:22 nore joined #minetest
21:26 Boingo joined #minetest
21:30 Waffelo joined #minetest
21:33 grorp joined #minetest
22:04 Boingo joined #minetest
22:08 Boingo joined #minetest
22:22 Boingo joined #minetest
22:34 MTDiscord <mistere_123> Nice, the build instructions no longer poke you to install mtg anymore either
22:37 erle MisterE123 hey would my photo mod be something for the blog?
23:03 kamdard_ joined #minetest
23:12 doseijin joined #minetest
23:12 erle DeepThgt more test images https://mister-muffin.de/p/ohde.png
23:18 MTDiscord <mistere_123> Sorry, what is your photo mod?
23:19 erle MisterE123 it makes this stuff https://mister-muffin.de/p/ohde.png
23:19 MTDiscord <mistere_123> Like, that whole grid?
23:19 erle well, i figured out that i can pretty much abuse minetest.raycast to render pictures inside of minetest
23:20 erle so i wrote a mod where you can type /snap and then you get a picture
23:20 MTDiscord <mistere_123> It makes single photos, not that whole grid, right?
23:20 erle i can make it make the whole grid, but that is because DeepThgt asked for the pictures to be placed on walls
23:20 erle like with xmaps, if you right click a wall, it places an entity there
23:20 erle an upright sprite
23:21 erle so yes, it made that whole grid. those are test images. you see a few of them have banding artifacts in the sky for example, i fixed that.
23:21 MTDiscord <mistere_123> Well, yes, that is definately blog worthy. But I suggest polishing it as a camera mod for survival, and use dynamic media to make it not suck up join-time media
23:22 erle the images are saved in the items themselves
23:22 erle as you can see, some are pixelated, some are not. this is because of supersampling
23:22 MTDiscord <mistere_123> Nice
23:22 erle if i render the same scene with a slight offset in direction when casting the rays i can have both smoother edges for nearer objects and a depth-of-field effect
23:23 erle the only downside is that the rendering time is measured in seconds, as it is custom for software raytracers
23:23 erle or raycasters, no reflections here
23:23 MTDiscord <mistere_123> Can they take in entities and players? Could you soleve the problem of projecting textures? That might make it even more amazing
23:24 erle to the first question: maybe. but the issue is that they will most likely be big chonky cuboids, because raycasting would hit the hitbox.
23:25 MTDiscord <mistere_123> The mod could be a poloriod that prints out a photo but takes time to cure
23:25 MTDiscord <mistere_123> *polaroid
23:25 erle to the second question: i have no idea what i am doing lol, so nope. also that would require loading all textures ig. if i was doing that i would just figure out the average color.
23:25 erle oh hmm i wonder how to do that
23:25 erle good idea though
23:26 erle render async instead of blocking the server
23:26 erle but how to acquire the item? maybe a machine should spit it out hehe
23:26 MTDiscord <mistere_123> For the rendering entites, luatic has a lua .b3d reader in modlib
23:27 erle again: all i am doing is using minetest.raycast() with some vectors that i cobbled together with pencil, paper, chewing gum
23:27 erle if the ray hits, i return some color
23:27 erle if it does not hit, i return the sky
23:28 erle this is an extremely stupid hack and i am happy that it works as well as it does
23:29 MTDiscord <mistere_123> Well, you could understand what it hit, do some vector math based on the entity's position and model information to figure out the shape, and determine if the ray actually hit the model. Unfortunately, that would clip the model to the bounds of the hitbox
23:29 erle but for entities to work with that i'd need them to a) have hitboxes matching their geometry b) some way to get a color out of them.
23:29 erle i doubt i could do vector math hehe. already all my rays are going towards ( 0, 0, 0 )
23:29 erle i have to fix that
23:29 erle or maybe just publish it and let someone else give me a hint
23:30 erle MisterE123 do you know linear algebra?
23:30 MTDiscord <mistere_123> Anyhow, sounds like atm its a proof of concept. If you intend to polish it, then I suggest polishing it before presenting in the blog. If its finished/as-is, its still blog worthy, I think
23:30 erle it's almost finished ig
23:30 MTDiscord <mistere_123> I'm in linear rn in fact, should be doing that, not chatting 😛
23:30 erle i want black white photos
23:31 erle i just wish i had the color information so i could have a better mapping
23:32 MTDiscord <mistere_123> Well, with some linear algebra, it would be possible, and probably not terribly hard (loc-wise) for simple cubic nodes
23:32 erle wdym
23:33 erle i simply want the minimap color
23:33 panwolfram joined #minetest
23:33 MTDiscord <mistere_123> Oh
23:33 erle it is only exposed to CSM, not to SSM
23:33 MTDiscord <mistere_123> Then get the node it hit, and average the color of the texture, right?
23:33 MTDiscord <luatic> erle: it's dangerous to go alone, take this: https://github.com/TheAlgorithms/Lua/blob/main/src/math/matrix.lua
23:34 MTDiscord <mistere_123> Luatic, do you have a png reader in modlib, that can read color data from a file?
23:34 MTDiscord <luatic> I do
23:34 erle yes obviously but
23:34 erle i want the engine to expose the info
23:35 MTDiscord <luatic> you can find the code for averaging in texgen, sent it a while ago
23:35 MTDiscord <luatic> erle: that would require minetest to become a proper engine ;)
23:35 erle luatic any idea how to construct the vectors correctly?
23:35 MTDiscord <mistere_123> Then, erle, you just look up the texture, load it from luatic's color reader, and viola, color data
23:35 MTDiscord <luatic> the vectors for rays?
23:35 erle luatic it already exposes it but it is #ifdefed to not do it on the server
23:35 MTDiscord <luatic> exposes it to lua?
23:36 MTDiscord <mistere_123> Anyhow, back to Linear for me O/
23:36 MTDiscord <luatic> Linear?
23:36 erle https://mister-muffin.de/p/LDMU.txt xcam mod
23:36 erle luatic please tell me what i do wrong there
23:37 erle local eye = girl:get_pos() + girl:get_eye_offset()
23:37 erle i hope that is correct
23:37 erle local gaze = vector.normalize( girl:get_look_dir() ) + eye * -1
23:37 erle local down = vector.new({ x=0, y=-1, z=0 }) * 4
23:37 erle local right = vector.normalize( gaze:cross( down ) ) * -4
23:37 erle is that correct? i kinda doubt it
23:38 erle because like what if i am looking down lol
23:38 erle or anywhere except straight ahead really
23:38 MTDiscord <luatic> I think you might have to divide the eye offset by ten
23:38 erle wait what
23:39 MTDiscord <luatic> I think eye offset was in BS units
23:39 MTDiscord <luatic> in non-BS units*
23:39 erle bullshit units
23:39 MTDiscord <luatic> eye_height is in BS however
23:39 MTDiscord <luatic> erle: BS indeed
23:39 MTDiscord <luatic> I think it stands for blocksize
23:39 MTDiscord <luatic> 1 BS = 1 node
23:39 MTDiscord <rollerozxa> bullshit units
23:39 MTDiscord <luatic> and 1 BS = 10 non-BS
23:39 MTDiscord <luatic> and IIRC eye offset is in non-BS
23:40 erle okay so i divide eye offset by 10
23:40 erle and then?
23:40 MTDiscord <luatic> oh also you need to add eye height
23:41 erle damn
23:41 erle where in the docs does it say that eye offset is in which units?
23:41 MTDiscord <luatic> erle: https://gist.github.com/appgurueu/2a4c800efffe6c0bc63bed98b46995d5
23:41 MTDiscord <luatic> this is how to properly do it
23:42 MTDiscord <luatic> 1. there are two eye offsets and you don't know which one is active, warn if they aren't equal
23:42 erle uwu what's this
23:42 MTDiscord <luatic> it shows how to properly determine the absolute "eye" pos (in m)
23:43 erle why vector.divide(first, 10) and not just first/10 ?
23:43 MTDiscord <luatic> you take the player pos, you add the eye height, you add the eye offset (assuming the eye offsets are equal, warn otherwise)
23:43 erle i thought metatables exist
23:43 MTDiscord <luatic> erle: when that was written, they didn't
23:43 erle i see
23:46 MTDiscord <luatic> anyways re your code
23:46 erle ok so what next
23:47 erle minetest.raycast(eye_pos, vector.add(eye_pos, player:get_look_dir()) hmm
23:47 MTDiscord <luatic> it seems odd. 1. no need to normalize look dir; 2. much more importantly: why are you adding the eye pos to gaze? i'd do that at the very end - you don't want to change the look dir into "position + look dir"; 3. down is.. (0, -4, 0)? why?; 4. that way, gaze:cross(down) can't be correct
23:48 erle look i cargo culted it together from learning a bit about business card raytracing over the weekend
23:48 MTDiscord <luatic> erle: you'll need to work with look horizontal / vertical angles; working with the look dir alone doesn't work
23:48 erle code here at the bottom http://eastfarthing.com/blog/2016-01-12-card/
23:48 erle why not?
23:49 MTDiscord <luatic> you gave the counterexample yourself: if you're looking down, you don't know where "right" is
23:49 erle hmm okay
23:49 erle do you have something that i can cargo cult or wanna tell me the solution?
23:50 erle or do i have to work it out myself?
23:50 erle also i only need DOWN right
23:50 erle because then i can use cross()
23:50 erle to get something perpendicular to both?
23:55 srifqi joined #minetest
23:58 MTDiscord <luatic> yeah, but that fails to work when down is parallel to your look dir, i.e. when you're looking straight down
23:59 erle i suggest you try out the code
23:59 erle it fails to work in some other ways too
23:59 erle so basically i cast towards the origin right now

| Channels | #minetest index | Today | | Google Search | Plaintext