Current Server Time: 23:03 (Central Europe)

#apertus IRC Channel Logs

2020/05/09

Timezone: UTC


03:02
Bertl
off to bed now ... have a good one everyone!
03:02
Bertl
changed nick to: Bertl_zZ
04:35
Dest123
left the channel
07:15
BAndiT1983|away
changed nick to: BAndiT1983
11:16
panintended
joined the channel
11:16
panintended
Hi people o/
11: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
11:19
BAndiT1983
hi, very good!
11:19
BAndiT1983
am extending the visualiser right now, but won't tell details yet, maybe a teaser image later when i have time
11: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
11:20
BAndiT1983
you can try that, was also my idea at first, but had trouble to get proper area for it
11: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)
11:21
panintended
ok, let me give it a shot
11: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
11:21
BAndiT1983
if you want, then i can guide you a bit through the structure if the knob
11: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
11: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
11:23
BAndiT1983
could also be that there has to be a boolean flag in the knob code, to be able to react on it
11:23
BAndiT1983
ah, you mean the one in the base of the knob?
11:26
panintended
this one (in bool Knob()): ImGui::InvisibleButton(label, ImVec2(knobSize, knobSize + lineHeight + style.ItemInnerSpacing.y));
11:27
BAndiT1983
yep, this one
11:27
panintended
which got me thinking now... what is the use for it if the return value is not taken into account?
11:27
BAndiT1983
it's used for click/drag handling on the knob
11:27
BAndiT1983
the original knob code is not by me, but heavily modified
11:27
BAndiT1983
have grabbed it from some thread in imgui issues
11:28
panintended
but HandleActiveKnob() is where the click on the knob is actually detected
11:28
panintended
using this: ImVec2 mp = ImGui::GetIO().MousePos;
11:29
BAndiT1983
this command, right after creating the invisible button is relating to it -> bool is_active = ImGui::IsItemActive();
11: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)
11:29
panintended
ah, correct
11:29
BAndiT1983
when using imgui you have to think in layers, or states like in opengl
11: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
11:31
BAndiT1983
trigonometry was a fun part to do, rusted all the way since my study
11: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
11:32
BAndiT1983
everything, like the whole UI?
11: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
11:33
BAndiT1983
interesting
11:34
panintended
maybe I have to retry this, since I'm now doubting what I did :P
11: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);
11:34
BAndiT1983
don'T know if oyu see the smiley, but it should be ImGui :: Push...
11:35
BAndiT1983
not doubting at all, am rather sure you will get it done in no time
11: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
11: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
11:36
panintended
(no, it showed up in plain text)
11:36
panintended
thanks
11:36
BAndiT1983
ok, my client shows smilies
11:37
BAndiT1983
imgui tries ti emulate immediate mode UIs, but uses some tricks to store values, for faster processing
11:37
BAndiT1983
so you don't have handlers like in the classic UI with interrupts
11:37
BAndiT1983
although you can add callbacks also
11: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
11:42
panintended
yeah, it took me a while to notice :)
11: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
11:45
panintended
anyway, I'll get back to the bug. let's see what I can get working
11:45
BAndiT1983
sounds good, if you have questions also there, i would be glad to help you
11:46
panintended
cool, thanks :)
12:03
Bertl_zZ
changed nick to: Bertl
12:03
Bertl
morning folks!
12:04
BAndiT1983
hi
12:10
panintended
hello
12:20
panintended
hmm, so I got it working with the clickable internal circle approach, but I get multilple knob presses per click
12:20
panintended
float diff_x {mp.x - center.x}, diff_y {mp.y - center.y};
12:20
panintended
knobPressed = (diff_x*diff_x + diff_y*diff_y) < knobClickableRadiusSqared;
12:20
panintended
I added this to the start of HandleActiveKnob()
12:22
panintended
so, I might have to utilize the imgui flow to get the expected result as you suggested BAndiT1983
12:24
BAndiT1983
do you have a boolean var to set true when clicked, it should stop multiple events
12: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
12:26
panintended
I've modified it to this: void HandleActiveKnob(uint8_t& value, const ImVec2& center, bool& knobPressed)
12:26
panintended
so it now also "returns" whether knobPressed
12: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
12:27
BAndiT1983
but i haven'T seen your solution yet, so can't say much there yet
12:28
BAndiT1983
what about second invisible button?
12: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?
12:31
BAndiT1983
it'S the way of imgui and proposed by the authoer
12:31
BAndiT1983
*author
12:32
Bertl
so sliders have 'invisible buttons' as well?
12:34
BAndiT1983
yep
12:35
Bertl
okay then ... strange design ...
12: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)
12:36
BAndiT1983
Bertl: but good question, will also investigate if there are already handlers for attributes
12:39
BAndiT1983
original thread which i'Ve used -> https://github.com/ocornut/imgui/issues/942
12: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
12:42
BAndiT1983
never seen the addon before, but my modifications were larger, so it wouldn't help either, also uses InvisibleButton as drag handler
12: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?
12: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
13:06
BAndiT1983
small teaser of new feature: https://pasteboard.co/J7ziBxG.png
13:07
BAndiT1983
will be used to have some visual feedback when testing serial communication locally
13:35
metal_dent[m]
the background image looks good.... is that Bertl ?
13:35
Bertl
you've tapped into my camerafeed? :)
13:36
Bertl
but it looks a little weird, is it photoshopped?
13: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
13:37
BAndiT1983
nope, just tried to keep it neutral for preview, done basic adjustments in rawtherapee on the DNG file
13:37
Bertl
because the round corners at the top area and the strange jagged corners at the bottom
13:38
BAndiT1983
imgui uses the concept of windows, haven't disabled rounded corners yet, maybe i will add some separator also
13:38
BAndiT1983
so there are 2 imgui windows of 800x480
13:38
BAndiT1983
*each
13: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
13:41
Bertl
this is my current status: http://vserver.13thfloor.at/Stuff/AXIOM/remote-cam.jpg
13:42
BAndiT1983
nice!
13:43
BAndiT1983
will the remote move closer to the webcam?
13:43
Bertl
unlikely
13:43
Bertl
but we might do a second cam looking at the display later
13:43
Bertl
unless you get the remote display via USB working :)
13:43
BAndiT1983
okay, then framebuffer transfer should be done a bit quicker
13: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
13: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
13:46
BAndiT1983
and yes, it's Bertl
13:46
BAndiT1983
you can find longer videos of him on youtube with apertus presentation
13: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
13:54
BAndiT1983
off for now, will be back later, tested gain change by using the knob, works great, more later
13:54
BAndiT1983
changed nick to: BAndiT1983|away
13:56
Bertl
off for now ... bbl
13:56
Bertl
changed nick to: Bertl_oO
14:36
se6ast1an
Great to see so much progress, currently in the countryside , will return in the evening
17:06
metal_dent[m]
how's this -> https://pasteboard.co/J7AS6lqM.png
17:49
BAndiT1983|away
changed nick to: BAndiT1983
17:49
BAndiT1983
back
17:49
BAndiT1983
metal_dent[m]: a bit more context, please ;)
17: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
17:55
BAndiT1983
very good, have you also tried the conversion?
17:56
metal_dent[m]
Conversion to header files?
17:57
BAndiT1983
yes
18:00
metal_dent[m]
No, will do that tomorrow as I'll sleep soon, is that okay?
18:01
BAndiT1983
no problem
18:01
BAndiT1983
any progress with makefile yet?
18:23
ankit3699
joined the channel
18:34
Spirit532
left the channel
18:34
Spirit532
joined the channel
18: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
18: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.
18:42
ankit3699
left the channel
18:49
panintended
left the channel
20:00
panintended
joined the channel
21:10
panintended
left the channel
21:10
panintended
joined the channel
22:15
BAndiT1983
changed nick to: BAndiT1983|away
22:22
panintended
left the channel