Current Server Time: 15:36 (Central Europe)

#apertus IRC Channel Logs

2020/05/09

Timezone: UTC


02:02
Bertl
off to bed now ... have a good one everyone!
02:02
Bertl
changed nick to: Bertl_zZ
03:35
Dest123
left the channel
06:15
BAndiT1983|away
changed nick to: BAndiT1983
10:16
panintended
joined the channel
10:16
panintended
Hi people o/
10:17
panintended
I'm going to put some time into T1184 today. I have a solution in mind, and I'd like your feedback on it
10:19
BAndiT1983
hi, very good!
10:19
BAndiT1983
am extending the visualiser right now, but won't tell details yet, maybe a teaser image later when i have time
10:19
panintended
Basically I'm thinking to make clicking the internal part of the knob to correspond to a knob press, while clicking the rest (i.e. the remaining outer ring) can be used to turn the knob
10:20
BAndiT1983
you can try that, was also my idea at first, but had trouble to get proper area for it
10:20
panintended
what do you think? I've had trouble with disabling the knob when hovering etc. (although that might be me not understanding properly how dear imgui should be used)
10:21
panintended
ok, let me give it a shot
10:21
BAndiT1983
according to my link from last time, the one with issue in imgui, but which had nice code, you could draw a button in the middle of the knob and check when the mouse is over it, then disable knob handling for this time and handle only the click
10:21
BAndiT1983
if you want, then i can guide you a bit through the structure if the knob
10:23
BAndiT1983
her is the link again, the response from ocornut at the bottom shows how to push flags for disabling, but i haven't tried it yet
10:23
panintended
yes, I thought to do something like this. I was having issues with which button (the invisible button of the knob, or the newly added button) is actually "in the foreground". For some reason the invisible button was always the one taken into account
10:23
BAndiT1983
could also be that there has to be a boolean flag in the knob code, to be able to react on it
10:23
BAndiT1983
ah, you mean the one in the base of the knob?
10:26
panintended
this one (in bool Knob()): ImGui::InvisibleButton(label, ImVec2(knobSize, knobSize + lineHeight + style.ItemInnerSpacing.y));
10:27
BAndiT1983
yep, this one
10:27
panintended
which got me thinking now... what is the use for it if the return value is not taken into account?
10:27
BAndiT1983
it's used for click/drag handling on the knob
10:27
BAndiT1983
the original knob code is not by me, but heavily modified
10:27
BAndiT1983
have grabbed it from some thread in imgui issues
10:28
panintended
but HandleActiveKnob() is where the click on the knob is actually detected
10:28
panintended
using this: ImVec2 mp = ImGui::GetIO().MousePos;
10:29
BAndiT1983
this command, right after creating the invisible button is relating to it -> bool is_active = ImGui::IsItemActive();
10:29
panintended
then there is some trigonometry to figure out that the new value of the knob is (and hence by how much its image must be rotated)
10:29
panintended
ah, correct
10:29
BAndiT1983
when using imgui you have to think in layers, or states like in opengl
10:30
BAndiT1983
so you can push states or pop them, also setting attributes or getting them, relates always to previous item, if not specified differently/globally, like windows-related functions do
10:31
BAndiT1983
trigonometry was a fun part to do, rusted all the way since my study
10:31
panintended
I tried to do this (albeit not very methodically though, by trial and error) but I thinkg pushing a disable flag disabled everything
10:32
BAndiT1983
everything, like the whole UI?
10:33
panintended
I guess so, since the button I added after pushing the disable flag was also not working. Come to think of it though, my code was conditional on the invisible button being hovered - which might have been masking the problem
10:33
BAndiT1983
interesting
10:34
panintended
maybe I have to retry this, since I'm now doubting what I did :P
10:34
BAndiT1983
you could use the alpha adjustment, then it would be more obvious and non-blocking -> ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
10:34
BAndiT1983
don'T know if oyu see the smiley, but it should be ImGui :: Push...
10:35
BAndiT1983
not doubting at all, am rather sure you will get it done in no time
10:36
panintended
ok, let me check out what's the expected behavior. but indeed, I don't fully grasp how the UI interaction is polled with dear imgui, which is why this has taken me a while
10:36
BAndiT1983
btw. found a nice tool for opengl debugging which i've missed for years, as there are similar ones, but are tied to AMD or nvidia -> renderdoc, have verified and fixed my problems with it
10:36
panintended
(no, it showed up in plain text)
10:36
panintended
thanks
10:36
BAndiT1983
ok, my client shows smilies
10:37
BAndiT1983
imgui tries ti emulate immediate mode UIs, but uses some tricks to store values, for faster processing
10:37
BAndiT1983
so you don't have handlers like in the classic UI with interrupts
10:37
BAndiT1983
although you can add callbacks also
10:38
BAndiT1983
you can see it as the step by step UI, so when you expect something happening when clicking, then you have to add it to the specific element and only there
10:42
panintended
yeah, it took me a while to notice :)
10:44
panintended
btw i'm glad I found out about the framework. I had a solar eclipse simulation I'd written in the past to which I wanted to add visualization to and never got to it because of how daunting it can be. maybe now I'll dig it up and have some closure :P
10:45
panintended
anyway, I'll get back to the bug. let's see what I can get working
10:45
BAndiT1983
sounds good, if you have questions also there, i would be glad to help you
10:46
panintended
cool, thanks :)
11:03
Bertl_zZ
changed nick to: Bertl
11:03
Bertl
morning folks!
11:04
BAndiT1983
hi
11:10
panintended
hello
11:20
panintended
hmm, so I got it working with the clickable internal circle approach, but I get multilple knob presses per click
11:20
panintended
float diff_x {mp.x - center.x}, diff_y {mp.y - center.y};
11:20
panintended
knobPressed = (diff_x*diff_x + diff_y*diff_y) < knobClickableRadiusSqared;
11:20
panintended
I added this to the start of HandleActiveKnob()
11:22
panintended
so, I might have to utilize the imgui flow to get the expected result as you suggested BAndiT1983
11:24
BAndiT1983
do you have a boolean var to set true when clicked, it should stop multiple events
11:25
BAndiT1983
as the whole method is only for the knob, it's imgui way, it should be placed there, as HandleActiveKnob is a bit misleading, it's handling only the rotation/dragging
11:26
panintended
I've modified it to this: void HandleActiveKnob(uint8_t& value, const ImVec2& center, bool& knobPressed)
11:26
panintended
so it now also "returns" whether knobPressed
11:27
BAndiT1983
in my opinion it would be easier to do it outside of this method and avoid executing it when the knob is clicked
11:27
BAndiT1983
but i haven'T seen your solution yet, so can't say much there yet
11:28
BAndiT1983
what about second invisible button?
11:31
Bertl
why does imgui require invisible buttons and such? shouldn't it be easy to extend an existing 'control' like a slider to the new drawing/handling?
11:31
BAndiT1983
it'S the way of imgui and proposed by the authoer
11:31
BAndiT1983
*author
11:32
Bertl
so sliders have 'invisible buttons' as well?
11:34
BAndiT1983
yep
11:35
Bertl
okay then ... strange design ...
11:36
BAndiT1983
there are also other methods which are not described that much, like ItemHoverable, but i have used the original design which was approved by Omar (the founder of imgui)
11:36
BAndiT1983
Bertl: but good question, will also investigate if there are already handlers for attributes
11:39
BAndiT1983
original thread which i'Ve used -> https://github.com/ocornut/imgui/issues/942
11:41
BAndiT1983
also there is an addon in the repo with an implementation -> https://github.com/Flix01/imgui/blob/869d4cfaa2c63ea3b8fe54db5f5bc7e525862260/addons/imguivariouscontrols/imguivariouscontrols.cpp#L4154
11:42
BAndiT1983
never seen the addon before, but my modifications were larger, so it wouldn't help either, also uses InvisibleButton as drag handler
11:44
BAndiT1983
panintended: what happens if you stack another button on top of the knob, in the center? is the click still affecting the knob?
11:45
BAndiT1983
i know that we can place one somewhere near the knob, but it's a nice exercise to learn more about it and reuse the knowledge for more sophisticated widgets
12:06
BAndiT1983
small teaser of new feature: https://pasteboard.co/J7ziBxG.png
12:07
BAndiT1983
will be used to have some visual feedback when testing serial communication locally
12:35
metal_dent[m]
the background image looks good.... is that Bertl ?
12:35
Bertl
you've tapped into my camerafeed? :)
12:36
Bertl
but it looks a little weird, is it photoshopped?
12:36
BAndiT1983
;) my plan was to grab some 16bit depth image, but SDL image is refusing to give me the data, just 8bit like normal
12:37
BAndiT1983
nope, just tried to keep it neutral for preview, done basic adjustments in rawtherapee on the DNG file
12:37
Bertl
because the round corners at the top area and the strange jagged corners at the bottom
12:38
BAndiT1983
imgui uses the concept of windows, haven't disabled rounded corners yet, maybe i will add some separator also
12:38
BAndiT1983
so there are 2 imgui windows of 800x480
12:38
BAndiT1983
*each
12:40
BAndiT1983
by the way, it's already working, not just a static preview, uses a fragment shader to adjust brightness with fixed value in code for now, haven't added any other property yet
12:41
Bertl
this is my current status: http://vserver.13thfloor.at/Stuff/AXIOM/remote-cam.jpg
12:42
BAndiT1983
nice!
12:43
BAndiT1983
will the remote move closer to the webcam?
12:43
Bertl
unlikely
12:43
Bertl
but we might do a second cam looking at the display later
12:43
Bertl
unless you get the remote display via USB working :)
12:43
BAndiT1983
okay, then framebuffer transfer should be done a bit quicker
12:44
BAndiT1983
this is my target, as serial communication would allow to do a lot of stuff, same with virtual preview, as it will react only to proper serial data, like the camera to the one from real board
12:45
BAndiT1983
metal_dent[m]: the preview image is grabbed from here, in case you're wondering -> https://www.apertus.org/axiom-beta-uhd-raw-mode-explained-article-may-2016
12:46
BAndiT1983
and yes, it's Bertl
12:46
BAndiT1983
you can find longer videos of him on youtube with apertus presentation
12:50
metal_dent[m]
Yes, I've watched a few videos of apertus, the most interesting one was the April Fool's video of Bertl and se6ast1an
12:54
BAndiT1983
off for now, will be back later, tested gain change by using the knob, works great, more later
12:54
BAndiT1983
changed nick to: BAndiT1983|away
12:56
Bertl
off for now ... bbl
12:56
Bertl
changed nick to: Bertl_oO
13:36
se6ast1an
Great to see so much progress, currently in the countryside , will return in the evening
16:06
metal_dent[m]
how's this -> https://pasteboard.co/J7AS6lqM.png
16:49
BAndiT1983|away
changed nick to: BAndiT1983
16:49
BAndiT1983
back
16:49
BAndiT1983
metal_dent[m]: a bit more context, please ;)
16:52
metal_dent[m]
Changed the opacity of text in the logo image from 1 to 0 then trimmed the transparent background to get the ring
16:55
BAndiT1983
very good, have you also tried the conversion?
16:56
metal_dent[m]
Conversion to header files?
16:57
BAndiT1983
yes
17:00
metal_dent[m]
No, will do that tomorrow as I'll sleep soon, is that okay?
17:01
BAndiT1983
no problem
17:01
BAndiT1983
any progress with makefile yet?
17:23
ankit3699
joined the channel
17:34
Spirit532
left the channel
17:34
Spirit532
joined the channel
17:34
ankit3699
Hello! I am Ankit Lade. I am currently studying in 2nd year at the Indian Institute of Science Education and Research(IISER), Bhopal. I am amazed to see the work done by the apertus organization. I wanted to contribute to and learn more about the project and how everything works. But when I started reading the "contribute" section, I got confused with all the technical terms. I wish to contribute to your open source work and wou
17:34
ankit3699
ld like to gain some knowledge that what prerequisite shall I posses apart from programming and DSA that can get me involved in the project.
17:42
ankit3699
left the channel
17:49
panintended
left the channel
19:00
panintended
joined the channel
20:10
panintended
left the channel
20:10
panintended
joined the channel
21:15
BAndiT1983
changed nick to: BAndiT1983|away
21:22
panintended
left the channel