Minetest logo

IRC log for #minetest-dev, 2019-05-12

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

All times shown according to UTC.

Time Nick Message
00:28 Cornelia joined #minetest-dev
01:41 T4im joined #minetest-dev
01:55 indiana joined #minetest-dev
01:55 deezl joined #minetest-dev
02:10 tacotexmex joined #minetest-dev
02:13 MayeulC joined #minetest-dev
02:27 kollaps[m] joined #minetest-dev
02:45 Hijiri joined #minetest-dev
02:45 thePalin- joined #minetest-dev
02:45 bobby joined #minetest-dev
02:45 cheapie joined #minetest-dev
02:56 p_gimeno @DS-Minetest, I think I see what happens. We're using opposite matrix conventions. I'm using row vectors (because Irrlicht does too, see http://irrlicht.sourceforge.net/docu/classirr_1_1core_1_1_c_matrix4.html#details) and you're using column vectors. We're transposed with respect to each other :)
02:58 p_gimeno Irrlicht weirdness should probably not be exposed to users where it can be avoided, so I like your convention better.
05:55 ANAND Super trivial #8526
05:55 ShadowBot https://github.com/minetest/minetest/issues/8526 -- Move HTTP request logging to infostream by ClobberXD
06:20 fwhcat joined #minetest-dev
08:07 Fritigern joined #minetest-dev
09:06 tomraceror joined #minetest-dev
09:45 Fixer joined #minetest-dev
10:06 ensonic joined #minetest-dev
11:04 p_gimeno re #8521, Second Life works this way: when a logged in user user logs in again, the old user is disconnected. It's used pretty often actually, and quite useful.
11:04 ShadowBot https://github.com/minetest/minetest/issues/8521 -- Kick player when another user who knows the password joins
11:05 tomraceror hello?
11:05 tomraceror someone can help me?
11:06 tomraceror with gimp?
11:06 p_gimeno tomraceror: wrong channel, this is for minetest development only
11:07 tomraceror ah
11:27 tomraceror i have idea for a minetest function,maybe for multyplayer a cmd:
11:28 tomraceror /setinfo (text (about the player))
11:28 ShadowBot https://github.com/minetest/minetest_game/issues/330 -- Vessels : new textures by kilbith
11:28 tomraceror and other players can see with /seeinfo (playername) the text
11:29 Thomas-S tomraceror: It seems like your suggestion is a mod request. Please post it in a more appropriate channel, e.g. #minetest.
11:30 tomraceror ok
11:30 tomraceror left #minetest-dev
11:34 Beton joined #minetest-dev
11:42 ensonic joined #minetest-dev
14:26 tomraceror joined #minetest-dev
14:26 tomraceror left #minetest-dev
14:46 calcul0n joined #minetest-dev
14:46 turtleman joined #minetest-dev
15:54 p_gimeno @DS-Minetest, problem is the order of multiplications. Row vectors and column vectors are the transpose of each other, and since A^T*B^T = (B*A)^T, when you deal with row vector matrices, you have to right-multiply the matrices instead of left-multiply. So for ZXY order it's Z*X*Y and not Y*X*Z as in normal convention.
16:04 tomraceror joined #minetest-dev
16:08 p_gimeno I've just looked at your special casing. Values that return 1 don't need to be included. See https://notabug.org/pgimeno/Gists/src/sin-cos-precise
16:11 paramat joined #minetest-dev
16:48 paramat please can anyone approve my mapgen PRs? #8473 #8481 , well tested so you don't need to, and it's mapgen so you can partly trust me =)
16:48 ShadowBot https://github.com/minetest/minetest/issues/8473 -- Dungeons: Settable density noise, move number calculation to mapgens by paramat
16:48 ShadowBot https://github.com/minetest/minetest/issues/8481 -- Allow multiple cave liquids in a biome definition by paramat
16:52 paramat input needed on what to do for #8249
16:52 ShadowBot https://github.com/minetest/minetest/issues/8249 -- Make autoforward simulate keys by DS-Minetest
16:52 paramat merging #8526
16:52 ShadowBot https://github.com/minetest/minetest/issues/8526 -- Move HTTP request logging to infostream by ClobberXD
16:58 p_gimeno @DS-Minetest: by the way, don't worry about quaternions yet, let's get matrices right first
17:02 paramat merging #8519
17:02 ShadowBot https://github.com/minetest/minetest/issues/8519 -- Revert e6a9e60 by ClobberXD
17:08 p_gimeno @DS-Minetest: Please call the functions from_pitch_yaw_roll and to_pitch_yaw_roll instead, because X corresponds to pitch, Y corresponds to yaw and Z corresponds to roll, so I think it will cause less confusion that way
17:10 p_gimeno re 3x3 vs 4x4, I think 3x3 is OK, but I'd suggest adding something in the name that indicates the matrix size it deals with, e.g. call the table matrix3 instead of matrix
17:10 p_gimeno that will simplify adding a 4x4 one in future
17:13 p_gimeno I don't think matrix.floor and matrix.round are necessary. You can always use matrix.apply(m, math.floor). For matrix.round, I'd say, implement math.round instead so that it can be used in matrix.apply.
17:14 ensonic joined #minetest-dev
17:18 p_gimeno Since you're adding vector.dot, please add vector.cross too as it will be necessary as well. Keep handedness in mind for vector.cross.
17:19 p_gimeno Maybe we can talk via email instead? My email is in my homepage, http://www.formauri.es/personal/pgimeno/
17:21 tomraceror joined #minetest-dev
17:28 ensonic joined #minetest-dev
17:28 ANAND_ joined #minetest-dev
17:33 Lia joined #minetest-dev
17:40 ensonic joined #minetest-dev
17:52 DS-minetest joined #minetest-dev
17:54 p_gimeno hey :)
17:54 DS-minetest >I've just looked at your special casing. Values that return 1 don't need to be included.
17:54 DS-minetest why?
17:55 p_gimeno because there's enough precision for them to be accurate
17:55 DS-minetest and hello : ) I haven't used irc for months
17:56 p_gimeno >>> cos(317*pi)
17:56 p_gimeno -1.0
17:56 DS-minetest but if you rotate around multiples of pi and want to compare two matrices, this is needed
17:56 DS-minetest oh
17:56 p_gimeno it's exactly 1 already
17:57 p_gimeno the problem happens near 0 because the closer to 0 you are, the more precision you have
17:57 ANAND joined #minetest-dev
17:58 DS-minetest you are right
17:58 DS-minetest I'll change it
17:58 p_gimeno thanks
17:58 DS-minetest thanks to you
18:09 Taoki joined #minetest-dev
18:10 DS-minetest btw. if you add a function to existing code or documentation, is there any rule on how they are sorted?
18:12 p_gimeno I don't think there is
18:12 DS-minetest should i rename core.facedir_to_matrix to core.facedir_to_matrix3 to?
18:13 DS-minetest ,too*
18:13 p_gimeno I think so, yeah
18:14 tomraceror hey,what are you addding to mintest or changing?
18:14 p_gimeno maybe mat3 instead of matrix3 everywhere, for brevity? I was thinking of that
18:14 tomraceror i mean with hey = hi not angry :p
18:15 p_gimeno tomraceror: DS-minetest is working on a matrix library, see #8515
18:15 ShadowBot https://github.com/minetest/minetest/issues/8515 -- Add matrix helpers to builtin by DS-Minetest
18:15 tomraceror cool
18:15 tomraceror but the windows user cant use matrix ...
18:16 DS-minetest mat could also stand for mattress
18:16 p_gimeno lol
18:16 p_gimeno ok, matrix3
18:18 p_gimeno also, the matrix global is claimed by a mod, it wouldn't be too nice to override it https://forum.minetest.net/viewtopic.php?f=11&t=20329
18:20 Cornelia joined #minetest-dev
18:21 DS-minetest ooh, and there's an issue for my pr
18:31 DS-minetest p_gimeno: did I forget a comment from you?
18:32 DS-minetest I don't actually know what you mean with right-multiply or left-multiply
18:33 calcul0n joined #minetest-dev
18:39 p_gimeno DS-minetest: never mind, I was referring to the ZXY vs YXZ from Wikipedia
18:40 DS-minetest ok
18:41 Taoki[laptop] joined #minetest-dev
18:42 p_gimeno in Irrlicht, to rotate a row vector V first by A and then by B you multiply V * A * B. Wikipedia uses the normal convention, and you multiply B * A * V where V is a column vector.
18:43 p_gimeno that's all I meant
18:43 DS-minetest ah
18:44 DS-minetest because you still need A to have as many columns as B has rows if you do A*B
18:46 p_gimeno just another consequence of Irrlicht's upside-down conventions
18:47 p_gimeno unconventional conventions, dare I say
18:47 DS-minetest maybe I should use a completely new convention in my PR to cause even more confusion, we need more conventions! *irony off now*
18:48 p_gimeno yeah! <insert mandatory XKCD reference here>
18:50 proller joined #minetest-dev
18:50 DS-minetest actually, I got the method that I used before to make matrix to euler via the wheel method: https://www.xkcd.com/2140/
18:51 p_gimeno heheh
18:55 tomraceror joined #minetest-dev
19:45 p_gimeno DS-minetest: what about the signs of the cross product? should they be inverted, since this is a left-handed coordinate system?
19:46 DS-minetest Uh, I have never thought of this
19:47 DS-minetest so probably the crossproduct vector is now left handed to the input vectors
19:49 DS-minetest ok, wikipedia says that it is defined as right handed, I'll invert
19:50 p_gimeno I'd vote for keeping it right-handed, there are things that are already broken anyway
19:51 DS-minetest done
19:51 proller joined #minetest-dev
19:52 p_gimeno really, left-handed coordinate systems suck
19:53 tomraceror bye
19:53 tomraceror good nighth!
19:54 tomraceror left #minetest-dev
19:55 p_gimeno oh typo, the transposed of -> the transpose of
19:55 DS-minetest ok
19:55 p_gimeno (twice)
19:56 DS-minetest i'm not a native english speaker
19:57 p_gimeno me neither
19:57 DS-minetest done
19:58 p_gimeno hmm, I'm pondering how necessary it is to have a matrix3.inverse()
19:59 p_gimeno since they are mostly rotation matrices, it's possible that transposing suffices
19:59 DS-minetest yes, i wanted to add this but i havent found an easy way to get it in wikipedia
19:59 p_gimeno I have one somewhere, one sec
20:01 p_gimeno anyway, since they are going to be usually rotation matrices, transposing them also inverts them
20:01 p_gimeno that's why I'm pondering
20:05 p_gimeno https://notabug.org/pgimeno/Gists/src/mat3-det-and-invert
20:05 DS-minetest should I just copy both functions?
20:06 p_gimeno no I don't think so, you can copy the determinant one but the inverse one will need a bit of work
20:07 p_gimeno first, to decide what to do when the determinant is zero; my interface for that one used (dest, source) and only modified dest when the determinant was not zero
20:07 p_gimeno the interface probably needs to be changed too
20:08 calcul0n joined #minetest-dev
20:08 p_gimeno maybe return true, <matrix> if it's invertible, and false, "Matrix can't be inverted" if not
20:08 DS-minetest ok
20:08 p_gimeno hm
20:09 p_gimeno or just <matrix> if it's invertible, and false if not
20:09 p_gimeno that's simpler, simpler is good
20:10 DS-minetest yes, this is probably better as tables are true values
20:10 p_gimeno yeah, you can still do: b = assert(matrix3.invert(a))
20:12 DS-minetest the first few lines can be replaced with "det = det_mat3(a)", right?
20:14 p_gimeno no because it calculates variables that it reuses later
20:14 DS-minetest oh
20:20 DS-minetest done: https://github.com/minetest/minetest/pull/8515/commits/79d404fbcba3f69cb63ac14ae30e57ac1e5e61b4
20:22 p_gimeno :+1:
20:23 DS-minetest :D
20:26 DS-minetest there are still at least two questions left:
20:26 DS-minetest 1: should the rotation matrices given by the functions be counterclockwise (righthanded)
20:26 paramat joined #minetest-dev
20:27 DS-minetest 2: should the functions need degrees instead of radians?
20:27 p_gimeno 2: radians please, pretty pretty please
20:27 p_gimeno 1: if you want to keep your sanity, I recommend leaving them as is
20:27 DS-minetest I could of course add both
20:28 p_gimeno probably the cross product should be right handed too
20:28 DS-minetest it is
20:29 paramat yes radians please
20:29 DS-minetest (1,0,0)x(0,1,0) now gives (0,0,-1) which is righthanded
20:30 DS-minetest (it would be lefthanded like this in a righthanded system, that's why it's righthanded)
20:30 p_gimeno oh, rounding_precision and the local function round() are now only used inside a commented out section
20:32 DS-minetest it's now commented out, too
20:32 p_gimeno woot
20:34 p_gimeno one last thing, matrix3_1p_1n_0_hash can be done with just the first 6 elements, you don't need all 9
20:34 DS-minetest might there be copyrightial problems with the fact that some things like rotation matrices for specific angles were taken from other sources like wikipedia?
20:35 DS-minetest are you sure?
20:35 p_gimeno first question: no, second question: yes
20:36 p_gimeno https://github.com/entuland/rhotator/commit/c7e288dbe3cd663d31f965e1bd06f8e9d0ef1fb1
20:36 DS-minetest ok
20:37 p_gimeno if minetest allowed mirroring nodes, then you'd need all 9 elements, but without it, the third one is redundant (it can be calculated from the other two using a cross product)
20:37 DS-minetest and should wrong values like -0.5 or 3 be handled?
20:37 p_gimeno no I don't think so
20:37 p_gimeno for those, a wrong answer is an appropriate answer
20:38 p_gimeno core devs may disagree
20:39 DS-minetest done
20:40 DS-minetest matrix3_to_wallmounted could be implemented faster
20:40 DS-minetest by using another table
20:41 p_gimeno yeah, maybe it's not a bad idea
20:44 p_gimeno I need to be AFK for a while
20:45 DS-minetest ok
20:49 paramat "a wrong answer is an appropriate answer" i agree, keeps it simple too
20:50 DS-minetest now I use table.indexof in matrix3_to_wallmounted
20:52 p_gimeno have you tested it?
20:53 DS-minetest no
20:53 p_gimeno hm, it should probably work, I just haven't looked into how indexof works
20:54 p_gimeno anyway, AFK for real now
21:22 Cornelia joined #minetest-dev
21:25 Cornelia joined #minetest-dev
21:37 Lia joined #minetest-dev
22:02 DS-minetest no
22:03 DS-minetest oops, sorry
22:03 DS-minetest left #minetest-dev
22:41 BuckarooBanzai joined #minetest-dev
22:49 Fixer_ joined #minetest-dev
23:14 indiana joined #minetest-dev
23:29 turtleman joined #minetest-dev

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