Forum
    • Categories
    • Register
    • Login

    BLUR.

    Scheduled Pinned Locked Moved Bug Reports
    22 Posts 5 Posters 169 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • lalalandsynthL
      lalalandsynth @David Healey
      last edited by

      @David-Healey that is interesting, wonder why we dont have that available as a general blur ? Blur is needed to make bloom effects which can really help a vector ui pop.

      https://trikk.studio/
      https://www.instagram.com/trikkstudio/

      David HealeyD 1 Reply Last reply Reply Quote 0
      • David HealeyD
        David Healey @lalalandsynth
        last edited by

        @lalalandsynth It might be available on the CSS side, I haven't tried.

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - HISE tutorials
        My Patreon - More HISE tutorials

        lalalandsynthL 1 Reply Last reply Reply Quote 0
        • lalalandsynthL
          lalalandsynth @David Healey
          last edited by

          @David-Healey will have a look tomorrow, i need blur on some dynamic elements, lets see if i I find a way.

          https://trikk.studio/
          https://www.instagram.com/trikkstudio/

          HISEnbergH 1 Reply Last reply Reply Quote 0
          • HISEnbergH
            HISEnberg @lalalandsynth
            last edited by

            @lalalandsynth Yea CSS would be the way to go. HISE does indeed use melatonin_blur , it's negative performance effects have been noted on the forum before. Possibly updating it to a newer version would help, but I personally dropped it in favour of CSS or using a Webview.

            Sonic Architect && Software Mercenary

            lalalandsynthL 2 Replies Last reply Reply Quote 1
            • lalalandsynthL
              lalalandsynth @HISEnberg
              last edited by

              @HISEnberg for shadows excusively or can css or webview be overlayed on vectors for " layer blur".
              Css is only for laf right , not paint routines or have i gotbit wrong?

              https://trikk.studio/
              https://www.instagram.com/trikkstudio/

              David HealeyD 1 Reply Last reply Reply Quote 0
              • David HealeyD
                David Healey @lalalandsynth
                last edited by

                @lalalandsynth said in BLUR.:

                Css is only for laf right , not paint routines or have i gotbit wrong?

                Css can be used with panels too div is the selector

                Free HISE Bootcamp Full Course for beginners.
                YouTube Channel - HISE tutorials
                My Patreon - More HISE tutorials

                lalalandsynthL 1 Reply Last reply Reply Quote 0
                • lalalandsynthL
                  lalalandsynth @David Healey
                  last edited by

                  @David-Healey i will have to test, that might be a solution if I am understanding correctly.

                  https://trikk.studio/
                  https://www.instagram.com/trikkstudio/

                  1 Reply Last reply Reply Quote 0
                  • lalalandsynthL
                    lalalandsynth @HISEnberg
                    last edited by

                    @HISEnberg will using webview not require including a dependency, dont think its in win 10.

                    https://trikk.studio/
                    https://www.instagram.com/trikkstudio/

                    HISEnbergH 1 Reply Last reply Reply Quote 0
                    • HISEnbergH
                      HISEnberg @lalalandsynth
                      last edited by

                      @lalalandsynth Not to my knowledge. But the webview presents a whole series of challenges by itself. If it's a simple LAF for a knob, or paint routine for a panel, then CSS is much more worth investigating.

                      Sonic Architect && Software Mercenary

                      Christoph HartC 1 Reply Last reply Reply Quote 1
                      • Christoph HartC
                        Christoph Hart @HISEnberg
                        last edited by

                        Yes webview for adding shadows is definitely the wrong direction, it basically replaces your entire interface (or at least a rectangle of it) by a web browser.

                        The problem why melatonin blur hasn't been integrated into the Graphics API calls yet is because there were some inconsistencies with the API parameters with what melatonin expects and before breaking the API call surface I just decided to use it in CSS where there is no issue with backwards compatibility, but maybe now it's time to rethink that and (at least) put it behind a preprocessor like we always do when deprecating stuff.

                        The melatonin blur is a marvelous piece of engineering, but it still renders the shadows on the CPU so it still is super slow compared to a solution that just gives the GPU the instruction to blur something with its millions of shader units. Unfortunately this is the one hard restriction that comes with using JUCE as underlying GUI framework.

                        I would also recommend starting to play around with the CSS LAF stuff to get a feel for the performance of melatonin - start with buttons, these are best suited for CSS LAF. Sliders / Knobs are a bit quirky because you need to abuse the pseudo element classes to render different parts of the knob (eg. the track, the arc, the thumb).

                        const var laf = Content.createLocalLookAndFeel();
                        
                        laf.setInlineStyleSheet("
                        
                        button
                        {
                        	background: #666;
                        	color: white;
                        	margin: 5px;
                        	border-radius: 3px;
                        	box-shadow: 0px 2px 3px black;
                        }
                        
                        button:hover
                        {
                        	background: #999;
                        	transition: background-color 0.1s;
                        }
                        
                        button:active
                        {
                        	transform: translate(0px, 2px);
                        }
                        
                        ");
                        
                        Content.getComponent("Button1").setLocalLookAndFeel(laf);
                        
                        ustkU 1 Reply Last reply Reply Quote 0
                        • ustkU
                          ustk @Christoph Hart
                          last edited by

                          @Christoph-Hart Funny, I've been working on this greedy blur since yesterday too.

                          Claude says the main performance cost comes from allocating a new Melatonin object on every call. That means there's effectively no caching, making it quite expensive when repainting continuously at the frame rate. Is that something that could be improved?

                          In my case, the path needs to be reconstructed depending on the knob angle, so I can't keep a permanent path, which means I can't use CSS. Or is there a way around that?

                          Hise made me an F5 dude, any other app just suffers...

                          Christoph HartC 1 Reply Last reply Reply Quote 0
                          • Christoph HartC
                            Christoph Hart @ustk
                            last edited by

                            @ustk you can try if the overhead of passing a dynamic path exceeds the blur render performance but my guess would be that its faster.

                            ustkU 2 Replies Last reply Reply Quote 0
                            • ustkU
                              ustk @Christoph Hart
                              last edited by ustk

                              @Christoph-Hart In fact now I improve this part by pre-computing the path and use it like a filmstrip (better for the paint routine but still not usable for CSS).
                              The result as you can see is that the main perf issue is still by far the dropShadow (which becomes a real deal for 20+ knobs):

                              Screenshot 2026-07-30 at 12.05.53.png

                              Hise made me an F5 dude, any other app just suffers...

                              1 Reply Last reply Reply Quote 0
                              • ustkU
                                ustk @Christoph Hart
                                last edited by

                                @Christoph-Hart And when zooming the interface or making the knob bigger, the difference becomes even more dramatic:

                                Screenshot 2026-07-30 at 12.17.43.png

                                Hise made me an F5 dude, any other app just suffers...

                                lalalandsynthL 1 Reply Last reply Reply Quote 0
                                • lalalandsynthL
                                  lalalandsynth @ustk
                                  last edited by

                                  @ustk How can I enable this profiler, cant find it ? ;)
                                  In an empty project , is it in the watchtable once i got something going

                                  https://trikk.studio/
                                  https://www.instagram.com/trikkstudio/

                                  Christoph HartC ustkU 2 Replies Last reply Reply Quote 0
                                  • Christoph HartC
                                    Christoph Hart @lalalandsynth
                                    last edited by

                                    @ustk the fillPath thing on the profiler isn't the time it takes to encode and decode the path to base64 then do all the overhead in C++ in the CSS engine (that's probably all tucked away under the paintRoutine graph, that's just the function passing on the path data to the GPU which is just a memcpy operation and should be very fast.

                                    but drawDropShadowFromPath isn't using melatonin yet, no?

                                    ustkU 1 Reply Last reply Reply Quote 0
                                    • ustkU
                                      ustk @lalalandsynth
                                      last edited by

                                      @lalalandsynth You can see the % button everywhere in Hise allowing you to profile the UI, DSP, Module tree, etc...

                                      Screenshot 2026-07-30 at 12.29.46.png

                                      Screenshot 2026-07-30 at 12.30.01.png

                                      Screenshot 2026-07-30 at 12.30.20.png

                                      There is also the main profiler tab with many option:

                                      Screenshot 2026-07-30 at 12.32.26.png

                                      Hise made me an F5 dude, any other app just suffers...

                                      lalalandsynthL 1 Reply Last reply Reply Quote 1
                                      • ustkU
                                        ustk @Christoph Hart
                                        last edited by ustk

                                        @Christoph-Hart said in BLUR.:

                                        @ustk the fillPath thing on the profiler isn't the time it takes to encode and decode the path to base64 then do all the overhead in C++ in the CSS engine (that's probably all tucked away under the paintRoutine graph, that's just the function passing on the path data to the GPU which is just a memcpy operation and should be very fast.

                                        You're right it resides in the paint routine call so it doesn't represent the total build+paint time. Still it improved the construction time anyway compared to what I had before and we see the shadow is still the greedy boy.

                                        but drawDropShadowFromPath isn't using melatonin yet, no?

                                        yes it does:

                                        void ScriptingObjects::GraphicsObject::drawDropShadowFromPath(var path, var area, var colour, int radius, var offset)
                                        {
                                        	auto r = getRectangleFromVar(area);
                                        	auto o = getPointFromVar(offset).toInt();
                                        	auto c = ScriptingApi::Content::Helpers::getCleanedObjectColour(colour);
                                        
                                        	if (auto p = dynamic_cast<ScriptingObjects::PathObject*>(path.getObject()))
                                        	{
                                        		Path sp = p->getPath();
                                        		drawActionHandler.addDrawAction(new ScriptedDrawActions::drawDropShadowFromPath<melatonin::DropShadow>(sp, r, c, radius, o));
                                        	}
                                        }
                                        

                                        drawDropShadow (rectangle version) doesn't use melatonin but JUCE's own juce::DropShadow

                                        Hise made me an F5 dude, any other app just suffers...

                                        1 Reply Last reply Reply Quote 1
                                        • lalalandsynthL
                                          lalalandsynth @ustk
                                          last edited by

                                          @ustk Sweet , thanks !

                                          https://trikk.studio/
                                          https://www.instagram.com/trikkstudio/

                                          1 Reply Last reply Reply Quote 0
                                          • First post
                                            Last post

                                          25

                                          Online

                                          2.5k

                                          Users

                                          13.9k

                                          Topics

                                          120.9k

                                          Posts