Minetest logo

IRC log for #minetest-dev, 2020-01-08

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

All times shown according to UTC.

Time Nick Message
00:22 longerstaff13 joined #minetest-dev
01:05 ANAND joined #minetest-dev
01:42 Calinou joined #minetest-dev
02:36 fluxflux joined #minetest-dev
05:21 indiana joined #minetest-dev
08:07 kilbith_ joined #minetest-dev
08:38 ShadowNinja joined #minetest-dev
08:46 erlehmann joined #minetest-dev
08:52 erlehmann_ joined #minetest-dev
09:41 ssieb joined #minetest-dev
09:46 Beton joined #minetest-dev
10:42 df458 joined #minetest-dev
10:44 proller joined #minetest-dev
11:21 Fixer joined #minetest-dev
11:40 erlehmann joined #minetest-dev
11:56 kilbith joined #minetest-dev
13:36 rubenwardy I'll tag 5.1.1 tonight unless there are any objections
13:37 rubenwardy Actually, should I pull translations in if the template hasn't been updated since 5.1.0?
13:37 rubenwardy Would keep Hamlet happy
13:46 CrazyDave joined #minetest-dev
13:46 CrazyDave left #minetest-dev
13:52 kilbith_ joined #minetest-dev
13:57 kilbith__ joined #minetest-dev
14:03 kilbith_ joined #minetest-dev
14:12 sfan5 can we merge translations "twice" safely?
14:13 sfan5 as in, pull it into backport-5 and master
14:13 absurb joined #minetest-dev
14:17 Wuzzy joined #minetest-dev
14:20 Wuzzy https://github.com/minetest/minetest/pull/9294
14:21 p_gimeno sfan5: I guess you can cherry-pick or rebase
14:21 Wuzzy !title
14:22 ShadowBot Add callbacks for falling and attached nodes by Wuzzy2 · Pull Request #9294 · minetest/minetest · GitHub
14:39 kilbith joined #minetest-dev
14:53 Fixer_ joined #minetest-dev
15:02 p_gimeno re https://github.com/minetest/minetest/pull/9205#issuecomment-571717643 : the dir does not have enough information, it lacks roll info
15:04 p_gimeno at least for facedir
15:07 p_gimeno the rhotator mod includes code that builds a matrix for each facedir, to use as a LUT, see https://github.com/entuland/rhotator/blob/master/init.lua#L116
15:08 p_gimeno actually https://github.com/entuland/rhotator/blob/master/init.lua#L63
15:10 p_gimeno with that, you can use a matrix to euler conversion code
15:10 p_gimeno that will give you a LUT for facedir-to-euler
15:12 p_gimeno I vouch for the exactness of the rhotator formulas
15:14 p_gimeno for matrix to euler code, see https://github.com/minetest/minetest/blob/master/src/util/numeric.cpp#L199
15:16 tomraceror joined #minetest-dev
15:17 tomraceror joined #minetest-dev
15:34 rubenwardy sfan5: surely git is clever enough for that
15:34 rubenwardy It's the same commits
15:38 user_____ joined #minetest-dev
15:38 ambagamba joined #minetest-dev
15:57 p_gimeno Wuzzy: http://www.formauri.es/personal/pgimeno/pastes/facedir2euler.lua (re #9205)
15:57 ShadowBot https://github.com/minetest/minetest/issues/9205 -- Falling nodes: Add support for facedir, colorfacedirr, wallmounted, colorwallmounted, color, airlike, signlike, torchlike and glow by Wuzzy2
15:58 p_gimeno wait, there's a problem with element 0, you need to use facedir_to_euler[facedir + 1] because it's 1-based
16:00 Wuzzy this might be useful for a Lua API function
16:02 p_gimeno it needs testing, because the matrix might be transposed when converting to euler, so please test with a node where you can distinguish rotation easily and which has several different rotations
16:02 Wuzzy i currently try the math.atan2 solution
16:03 Wuzzy so you need to test yourself atm, sorry. You can use [devtest]. this contains a facedir test node 🙂
16:05 p_gimeno the math.atan2 solution simply can't work
16:06 Wuzzy not if you also take the face rotation into account
16:06 Wuzzy I have already made it work for wallmounted
16:07 p_gimeno ah ok
16:07 p_gimeno I meant as written by SmallJoker
16:07 Wuzzy yeah Krock's solution does not work
16:09 p_gimeno wallmounted is easier because you only have 6 directions with no roll (IIRC)
16:13 p_gimeno there are multiple eulers for the same rotation for 8 of the facedirs, so don't be surprised if your result doesn't match mine
16:13 p_gimeno (the other 16 should match)
16:22 erlehmann joined #minetest-dev
16:22 Wuzzy hrm
16:22 Wuzzy i just noticed facedir_to_dir only gives me 1 of 4 possible directions
16:23 Wuzzy oops
16:23 Wuzzy nvm
16:30 tomraceror joined #minetest-dev
16:30 p_gimeno facedir_to_dir does not give you the face rotation, it just returns one of 6 possible directions
16:31 Wuzzy yeah i know. i have to extract the face by hand
16:31 Wuzzy but even that is not enough, actually
16:31 p_gimeno it should
16:31 Wuzzy sigh
16:32 Wuzzy I am starting to wonder why we're even doing this
16:32 Wuzzy I am about to give up
16:36 p_gimeno working with Minetest's axis convention is very tricky
16:37 p_gimeno most formulas you find around don't work
16:40 Wuzzy I think this calls for more library functions
16:41 p_gimeno well, set_rotation is a very recent addition; it's kind of logical to add facedir_to_euler to the set, so that a facedir can be used in set_rotation
16:44 p_gimeno I have forgotten a lot of things. I don't remember what facedir_to_dir returns, but I believe it's the Y vector. And IIRC, roll rotates over a different vector, which means you can't apply roll over the vector returned by facedir_to_dir.
16:45 p_gimeno Very tricky, as I said.
16:46 Wuzzy p_gimeno: i just tested your facedir_to_euler. it does not work, sadly
16:46 p_gimeno ok, the matrix is probably transposed, let me fix it
16:47 p_gimeno did you remember to use facedir_to_dir[facedir + 1]?
16:47 p_gimeno err facedir_to_euler[facedir + 1]
16:47 Wuzzy yes
16:48 p_gimeno http://www.formauri.es/personal/pgimeno/pastes/facedir2euler_2.lua
16:49 p_gimeno reload if you have opened the link
16:49 Wuzzy nope
16:50 p_gimeno nope you haven't opened the link or nope it does not work? :)
16:51 Wuzzy its still wrong but its better than before
16:51 Wuzzy facedir=0-3 are correct
16:51 Wuzzy then facedir 4, 8, 12, 16 and 20 are correct
16:51 Wuzzy the rest is wrong
16:53 p_gimeno let me check the getPitchYawRollRad function more carefully to see if I screwed it up
16:54 Wuzzy i strongly recommend to use [devtest]. you can test the facedir stuff much faster
16:55 Wuzzy oh wait you still need to edit builtin...
16:55 p_gimeno the function is right, that can't be it
16:56 Wuzzy p_gimeno: look in my PR to see the correct values
16:57 Wuzzy basically i just got all the values by trial-and-error... 😀
16:59 p_gimeno why not make a table with that then?
17:00 Wuzzy heh
17:00 Wuzzy well it would be nice to also have the formula that produced the table...
17:01 Wuzzy I am not sure what exactly is needed to make Krock happy anyway... lol
17:02 p_gimeno I'm not sure what the differences are with my version, I think it should match, maybe one sign convention is inverted
17:04 p_gimeno ohh
17:05 p_gimeno you have angles in range 0 to 2pi
17:05 p_gimeno I have angles in range -pi to pi
17:05 p_gimeno I think that could explain the differences
17:05 p_gimeno an angle of 7.8539816339744828 is very strange :)
17:07 p_gimeno http://www.formauri.es/personal/pgimeno/pastes/facedir2euler_3.lua <-- uses your empirical results
17:13 Wuzzy p_gimeno: my results, converted to lua: https://pastebin.com/raw/ihS5qAqf
17:14 p_gimeno let me see if I can output in that format
17:15 Wuzzy i just searched-and-replaced the constants by hand
17:19 p_gimeno http://www.formauri.es/personal/pgimeno/pastes/facedir2euler_5.lua
17:20 Wuzzy ah
17:20 Wuzzy i see a mistake already, its the last one
17:21 p_gimeno these could be equivalent
17:22 p_gimeno there must be at least 16 equal to each other to be considered good
17:22 erlehmann joined #minetest-dev
17:23 Wuzzy wait, what?
17:23 * Wuzzy test
17:23 p_gimeno there are several eulers that map to the same rotation
17:23 Wuzzy ah right
17:24 Wuzzy but its wrong 😛 i tested
17:24 p_gimeno ok
17:24 Wuzzy my table works
17:24 Wuzzy actually
17:24 Wuzzy its the same problem as before
17:24 Wuzzy fdir 0-3, 4, 8, 12, 16, 20 work, all other dont
17:25 Wuzzy oh wait. 22 also works. interesting
17:25 p_gimeno it's sounding more and more like a sign problem
17:26 p_gimeno still, the problem was getting the table, now you have a table
17:27 p_gimeno I get dizzy working with MT's axis conventions
17:28 Wuzzy lol
17:30 p_gimeno really, with normal conventions this would be a breeze, but this way you have to rework every formula from the beginning in order to not screw up axes or signs, that's what caused #7927
17:30 ShadowBot https://github.com/minetest/minetest/issues/7927 -- get/set_rotation and get/set_yaw problems
17:30 p_gimeno I haven't done that, and as a result the formulas don't work
17:41 troller joined #minetest-dev
17:44 erlehmann joined #minetest-dev
17:48 Krock joined #minetest-dev
18:08 Wuzzy hey Krock you have missed a long and productive discussion with p_gimeno about the the rotation in falling_fixes PR
18:10 Wuzzy p_gimeno experimented with generating the  facedirs a little http://www.formauri.es/personal/pgimeno/pastes/facedir2euler_5.lua
18:11 Krock calm down. post is still in progress
18:11 Wuzzy LOL
18:11 Wuzzy sorry
19:00 twistedlizard joined #minetest-dev
19:06 tomraceror joined #minetest-dev
19:28 twistedlizard joined #minetest-dev
19:31 nore joined #minetest-dev
19:51 Wuzzy lol Krock your prediction came almost true. i did file a bug for dropped items, but for a completely different reason.
19:54 Krock in 2020 we'll reach 1000 bugs
19:54 Krock help to reach this goal
19:56 ssieb joined #minetest-dev
19:58 mmuller haha, I presume you mean by filing bugs rather than adding them to the code?
20:00 Krock mmuller: one or another will cause that as final result
20:26 kilbith joined #minetest-dev
20:50 LoneWolfHT joined #minetest-dev
20:50 LoneWolfHT2 joined #minetest-dev
20:51 Lone_Wolf joined #minetest-dev
21:00 Lone_Wolf joined #minetest-dev
21:01 Lone_Wolf joined #minetest-dev
21:02 Lone_Wolf joined #minetest-dev
21:25 paramat joined #minetest-dev
21:26 paramat merging #9265
21:26 ShadowBot https://github.com/minetest/minetest/issues/9265 -- Improve Lua API documentation on sounds by Wuzzy2
21:28 df458 joined #minetest-dev
21:45 behalebabo joined #minetest-dev
21:50 behalebabo joined #minetest-dev
22:11 kilbith joined #minetest-dev
23:16 kilbith joined #minetest-dev
23:22 kilbith_ joined #minetest-dev
23:25 kilbith__ joined #minetest-dev
23:50 paramat joined #minetest-dev

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