HISE Logo Forum
    • Categories
    • Register
    • Login

    Video as background eats CPU (obviously)

    Scheduled Pinned Locked Moved General Questions
    30 Posts 7 Posters 1.2k 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.
    • hisefiloH
      hisefilo @hisefilo
      last edited by

      Maybe a gif? it reduces size 10x and does not need the loop at 25fps
      Any way to make a gif run?

      d.healeyD 1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey @hisefilo
        last edited by

        @hisefilo said in Video as background eats CPU (obviously):

        Maybe a gif? it reduces size 10x

        It will still be full bitmap when loaded into RAM though, no?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        hisefiloH 1 Reply Last reply Reply Quote 0
        • hisefiloH
          hisefilo @d.healey
          last edited by

          @d-healey Yes, but only 60mb for this quality

          alt text

          1 Reply Last reply Reply Quote 2
          • ?
            A Former User @hisefilo
            last edited by

            @hisefilo I think you’d probably be much better off using Lottie or OpenGL!

            Not that this would be without issues, but more performant!

            hisefiloH 1 Reply Last reply Reply Quote 1
            • hisefiloH
              hisefilo @A Former User
              last edited by hisefilo

              @UrsBollhalder That would be great! Any quick tip on how to add a video or frames within ScriptShader?

              Just found this snippet but I guess will be a long way to figure it out.

              const var Panel1 = Content.getComponent("Panel1");
              const var shader = Content.createShader("shader");
              
              //shader.setBlendFunc(true, shader.GL_SRC_ALPHA , shader.GL_ONE);
              
              
              Panel1.setPaintRoutine(function(g)
              {
              	g.applyShader(shader, [0, 0, this.getWidth(), this.getHeight()]);
              });
              
              
              const var Knob1 = Content.getComponent("Knob1");
              inline function onKnob1Control(component, value)
              {
              	shader.setUniformData("myValue", value);
              	shader.
              };
              
              Content.getComponent("Knob1").setControlCallback(onKnob1Control);
              
              
              
              ? 1 Reply Last reply Reply Quote 0
              • ?
                A Former User @hisefilo
                last edited by

                @hisefilo I was thinking more along the lines of creating that sort of landscape and fog with shader code all along, instead of using mentioned video. I'm not 100% sure, but I don't think that'd be even possible.

                Doing shader code is not for the faint of heart in my experience... But there are many talented people out there:

                favicon

                (www.shadertoy.com)

                Maybe you can find something landscape-like on shadertoy and then you can contact the creator to discuss possible licensing...

                hisefiloH Christoph HartC 2 Replies Last reply Reply Quote 1
                • hisefiloH
                  hisefilo @A Former User
                  last edited by

                  @UrsBollhalder Yes! that's a good idea. Will see if I can find something!
                  Thanks bro

                  1 Reply Last reply Reply Quote 0
                  • Christoph HartC
                    Christoph Hart @A Former User
                    last edited by

                    Actually the problem with most "landscapy" shaders on shadertoy is that they use some kind of textures, which isn't supported in HISE yet (you can only load fragment shaders in HISE which don't have the ability to load textures).

                    hisefiloH 1 Reply Last reply Reply Quote 1
                    • hisefiloH
                      hisefilo @Christoph Hart
                      last edited by

                      @Christoph-Hart Ohhh. I see.
                      Then... what if I do some kind of layered transparent pngs? and move them onNoteOn or whatever? (timers will kill cpu)

                      This are 8 layers (moons, terrain, etc)

                      Screen Shot 2022-11-03 at 9.46.18 AM.png

                      Christoph HartC LindonL 2 Replies Last reply Reply Quote 0
                      • Christoph HartC
                        Christoph Hart @hisefilo
                        last edited by

                        Yes that might sound like the best solution - and shuffling around 8 images at 25fps shouldn't kill the CPU.

                        1 Reply Last reply Reply Quote 1
                        • LindonL
                          Lindon @hisefilo
                          last edited by

                          @hisefilo - you could try independently scaling the layers - the "disney" technique...

                          HISE Development for hire.
                          www.channelrobot.com

                          hisefiloH 1 Reply Last reply Reply Quote 1
                          • hisefiloH
                            hisefilo @Lindon
                            last edited by hisefilo

                            @Lindon LOL true. HISE becomes a 2D animation framework

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

                              @hisefilo Don't say it too loud or @ulrik will recreate The Jungle Book with ScriptPanels..

                              hisefiloH ulrikU 2 Replies Last reply Reply Quote 4
                              • hisefiloH
                                hisefilo @Christoph Hart
                                last edited by

                                @Christoph-Hart LOL

                                1 Reply Last reply Reply Quote 0
                                • ulrikU
                                  ulrik @Christoph Hart
                                  last edited by

                                  @Christoph-Hart Haha, just wait...

                                  Hise Develop branch
                                  MacOs 15.3.1, Xcode 16.2
                                  http://musikboden.se

                                  hisefiloH 1 Reply Last reply Reply Quote 1
                                  • hisefiloH
                                    hisefilo @ulrik
                                    last edited by hisefilo

                                    Silly question. Anyone knows how to do a function that ramps from zero to 1 value in "x" time (without a timer callback)?, then to return to zero in "x" time ? like an attack and release but not for audio but UI ?? (yes I am trying to move objects like in a timeline)

                                    d.healeyD 1 Reply Last reply Reply Quote 0
                                    • d.healeyD
                                      d.healey @hisefilo
                                      last edited by

                                      @hisefilo What is going to be changing the value if not a timer?

                                      Libre Wave - Freedom respecting instruments and effects
                                      My Patreon - HISE tutorials
                                      YouTube Channel - Public HISE tutorials

                                      hisefiloH 1 Reply Last reply Reply Quote 0
                                      • hisefiloH
                                        hisefilo @d.healey
                                        last edited by

                                        @d-healey I was thinking in getSystemTime and parsing milliseconds. But maybe will use CPU as the timer callback

                                        d.healeyD 1 Reply Last reply Reply Quote 0
                                        • d.healeyD
                                          d.healey @hisefilo
                                          last edited by

                                          @hisefilo getSystemTime is a function that will give you the current time, it's not a callback. Why not give up on your crazy dreams of putting videos in audio plugins :p

                                          Libre Wave - Freedom respecting instruments and effects
                                          My Patreon - HISE tutorials
                                          YouTube Channel - Public HISE tutorials

                                          hisefiloH 1 Reply Last reply Reply Quote 0
                                          • hisefiloH
                                            hisefilo @d.healey
                                            last edited by

                                            @d-healey never! LOL. I'm also thinking into a VR add-on to allow users to play VSTs in Metaverse 😄

                                            d.healeyD 1 Reply Last reply Reply Quote 1
                                            • First post
                                              Last post

                                            46

                                            Online

                                            1.7k

                                            Users

                                            11.7k

                                            Topics

                                            101.8k

                                            Posts