tynet-lichat/shirakumo - IRC Chatlog
Search
Wednesday, 22nd of March 2023, 11:20:20 UTC
11:24:04
gingerale
shinmera: https://plaster.tymoon.eu/view/3725
11:24:18
gingerale
I added *action-mappings* to the annotations
11:24:37
shinmera
thanks. the problem isn't the mappings
11:25:39
gingerale
The call to the FIND seems to be in EVENT-APPLICABLE-P.
11:26:25
shinmera
Pushed fix to physics.
11:27:25
gingerale
Alright, it launches now.
11:27:50
shinmera
Guess I never had a gamepad plugged in
11:29:06
selwyn
planning what to do with trial-vr
11:29:49
selwyn
i want to work on making interactions with the environment easier, as this is mostly the point of trial-vr
11:30:18
shinmera
we're gonna need more collision testers, then.
11:30:29
selwyn
so i will sketch out some kind of protocol governing how objects and people (via the controllers) interact
11:31:00
selwyn
as the physics engine can handle cubes and the like, i thought it would be nice to make some kind of rigid body simulation
11:31:24
selwyn
where you can interact with the objects
11:31:44
shinmera
we don't have raycasts or more complex shapes like hands tho.
11:31:50
selwyn
would not need additional 3d assets which is convenient
11:32:04
selwyn
not having hands is fine
11:32:33
selwyn
how does raycasting come into it?
11:32:47
selwyn
having point in box would be enough to start with
11:33:12
shinmera
you probably want to have some tolerance so you can project a ray from the hand and find a close object to snap to the hand.
11:33:51
selwyn
well, maybe more work on collisions is needed then
11:34:38
shinmera
also cubes get old fairly quick. We really do need more complex collisions. Which means two things: 1. deconstruction of concave into convex and 2. GJK
11:35:49
shinmera
If you wanna get started on that, the book Real Time Collision Detection by Ericson is very good.
11:35:56
shinmera
You can find PDFs online.
11:37:07
shinmera
It goes over literally everything, so just pick what's important to you lol
11:37:15
shinmera
even exciting things like doing it on GPU
11:37:40
shinmera
I hope gingerale can give the PR a look over soon so we can merge and move on to next steps
11:37:57
shinmera
I'm currently working on IK, which is gonna need raycasts, too.
11:38:05
shinmera
So I might tackle that soon
11:38:21
selwyn
we should coordinate efforts
11:39:08
shinmera
What do you feel would be most interesting for you?
11:39:30
shinmera
GJK has neat maths theory behind it, so maybe that tickles your fancy.
11:39:42
selwyn
i like implementing algorithms
11:39:55
selwyn
and this one could be useful for both of us one day
11:40:07
shinmera
GJK will be very useful for all of us soon
11:40:41
shinmera
So if you'd get started on that, I'd be immensely grateful :)
11:41:11
selwyn
i will devote like an hour tonight to getting started with it
11:41:23
shinmera
Since GJK is gonna need to interact with meshes, we might also need to rethink our current mesh representation.
11:41:32
shinmera
But I'll let you get acquainted with it first.
11:41:52
selwyn
knowing where the code is would be really helpful
11:42:38
selwyn
is all the collision detection in the physics pr
11:42:48
shinmera
so spin off from the physics branch.
11:43:06
shinmera
I'd probably make a new physics/gjk.lisp, and then later integrate with the protocol from primitives.lisp
11:43:45
shinmera
We'll probably need some extra protocol for the support function
11:44:03
shinmera
but I'll just let you get to it. :)
11:47:50
selwyn
it uses caratheodorys theorem lol
11:48:02
selwyn
ive done some convex analysis before
11:50:23
selwyn
do you want to apply it to moving objects
11:51:20
shinmera
But the solution there is rather simple, you just enlarge the object shape along the combined velocity vector in the support function.
11:51:51
shinmera
For now just focus on the non moving case.
11:56:35
selwyn
why does the support function need its own protocol
11:57:52
shinmera
well, you can have analytical shapes like a sphere, which are not described by a triangle hull.
11:58:29
shinmera
so generally you'd have some generic function with methods for every primitive, which implements the support function.
12:09:20
selwyn
sounds like a really general algorithm
12:12:26
selwyn
friendship with sdf ended
12:12:34
selwyn
now support mapping is my best friend
13:27:08
selwyn
what would epa be used for
13:30:54
shinmera
GJK only tells you whether an intersection exists or not
13:31:04
shinmera
EPA then figures out the normal and penetration depth.
13:41:11
shinmera
In general for geometry stuff it's nice to have a set of different things
13:41:39
shinmera
Though for our purposes having a boolean test function and a hit-generating function should suffice.
13:42:55
shinmera
so we can both (intersects-p a b) and (detect-hits a b ..)
13:46:03
shinmera
might also need an extra karg to intersects-p to pass a velocity.
13:50:42
shinmera
I'll hook the raycasts into detect-hits, at least
13:50:54
shinmera
and add a test-hit wrapper that just generates one hit at most.
17:19:29
selwyn
do you want to define a new primitive of type polyhedron?
17:20:20
shinmera
wouldn't deltahedron be more accurate?
17:20:53
shinmera
what is the name for a triangle mesh?
17:21:56
selwyn
gjk works on convex polyhedra
17:22:22
shinmera
Yeah I know, but we really don't need to bother with the additional complexity of anything but triangle meshes
17:22:35
shinmera
and things that aren't triangle meshes will get their bespoke primitive like sphere
17:22:56
shinmera
so it wouldn't be apt to call it polyhedron when it's not the supertype of all polyhedra
17:23:13
selwyn
i just call it a triangle mesh
17:23:59
shinmera
since the convexity *is* an important detail.
17:28:08
selwyn
do you want to implement gjk by specialising define-hit-detector on those
17:38:51
shinmera
As mentioned above I want two user-facing APIs; intersects-p, and detect-hits
17:39:55
shinmera
since gjk by itself can't provide everything needed for detect-hits, I wouldn't worry about the user-facing API yet
17:40:06
shinmera
just implement it with regular functions for now
17:58:45
shinmera
One question will be the representation of the mesh, which as mentioned I'm not sure about.
18:00:48
shinmera
probably the most efficient would be an array of floats which implicitly represent the verts as groups of three, and an array of indices that implicitly represent the tris as groups of three.
18:08:11
shinmera
which has the added bonus of being easy to upload to GPU.
18:09:03
selwyn
does the book have a gpu implementation?
18:09:12
selwyn
haven't looked at the gpu chapter yet
18:09:34
shinmera
dunno what it has for gpu.
18:09:55
selwyn
the algorithm doesn't seem that parallelizable
18:10:02
selwyn
but guess i will find out
18:17:04
shinmera
SAL9000: sooo I moved my weechat over to a new Arch-based server, which presumably has a more recent weechat. the lichat script now has a strange behaviour where the buffer won't clear its unread counter if you're on that buffer, meaning as soon as I switch away from the buffer it pops up saying I've got unread messages on it.
18:17:42
Colleen
Can you compare the Weechat versions before/after?
18:17:42
SAL9000
Can you compare the Weechat versions before/after?
18:18:34
Colleen
o_O that's a huge upgrade, I'm on 3.7.1 at the moment
18:18:34
SAL9000
o_O that's a huge upgrade, I'm on 3.7.1 at the moment
18:18:45
shinmera
the old servers run ubuntu
18:18:51
Colleen
lol I was expecting debian
18:18:51
SAL9000
lol I was expecting debian
18:18:55
shinmera
and in addition I hated updating them because stuff would break every time
18:18:56
Colleen
(given the super old weechat)
18:18:56
SAL9000
(given the super old weechat)
18:19:23
Colleen
I've been trying to look into Nix/NixOS again (for server duties)
18:19:23
SAL9000
I've been trying to look into Nix/NixOS again (for server duties)
18:19:39
shinmera
I've got stuff set up with Arch, ZFS, and LXD now.
18:20:06
shinmera
Or rather: proxmox on the root, Arch VM for my stuff, LXC/LXD Arch containers for the actual services.
18:20:17
shinmera
This time doing it "right" and having one container per thing, rather than muddling it all.
18:20:38
Colleen
where is zfs in that stack? proxmox, arch vm, both?
18:20:38
SAL9000
where is zfs in that stack? proxmox, arch vm, both?
18:21:39
shinmera
I didn't handle the root setup myself, my cohort did that.
18:21:50
shinmera
but we can now (finally) snapshot stuff for backups.
18:21:57
shinmera
didn't have regular backups on the old server :y
18:23:08
shinmera
augh this buffer stuff is very annoying
18:23:38
Colleen
yeah I'll see what I can do. gotta go for now though :(
18:23:38
SAL9000
yeah I'll see what I can do. gotta go for now though :(
18:23:58
shinmera
just wanted to let you know in case
20:05:57
selwyn
should i branch from physics?
20:33:22
shinmera
hopefully gingerale won't have any scalding remarks so there won't be much churn on the physics branch before the merge
20:50:58
gingerale
Trying to look at the documentation but I'm just too tired to focus
20:51:33
shinmera
there's always tomorrow.
20:52:04
gingerale
Yeah, just hopefully I'm not too tired after work again
20:52:14
selwyn
i believe i once had to prove the theorem that gjk uses
20:54:22
selwyn
implementing all of gjk tonight will be tricky but i get how the algorithm works
20:54:45
shinmera
and no worries, there's no particular rush.
20:59:17
selwyn
does 3d-vectors have a method for approximately equal?
20:59:46
shinmera
At least I don't think it does. It would be called v~=
21:30:15
selwyn
https://github.com/Shirakumo/trial/blob/physics-gjk/physics/gjk.lisp#L34
21:33:20
shinmera
Bike: you might want to check file-notify on macos. I believe it's pretty badly bugged (not cleaning up FDs on failure among other stuff)
21:34:36
shinmera
I am amazed at how visceral my reaction is upon seeying >= lol
21:37:15
shinmera
I religiously use < and <=
21:38:12
shinmera
they read better to me because it follows the left-to-right smaller->greater scheme.
21:43:22
Colleen
"Hmm, my WSL has weechat 2.8 as well?" "Oh, it's still on the *previous* Ubuntu LTS. Yay."
21:43:22
SAL9000
"Hmm, my WSL has weechat 2.8 as well?" "Oh, it's still on the *previous* Ubuntu LTS. Yay."
22:14:58
selwyn
how do i write a protocol?
Wednesday, 22nd of March 2023, 23:20:20 UTC