Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Need help with blur function

    Help
    2
    6
    349
    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.
    • K
      kendog400 F last edited by pianofire

      Here I have a simple program that displays cards, under the card I put a black rectangle to look like a shadow. It looks OK, but would be nicer to see a blur Fx added to the black rectangle...I tried the rendereffect (box, framebuffer, fx_motionblur, [1/1280, 1/720] , but I cant seem to get it to work...Can anyone see what went wrong ?..........

      clear(darkGreen)
      card = createSprite ( )
      deck = loadImage ("Kenney/boardgames")
      setSpriteImage (card, dack)
      setSpriteLocation (card, gwidth/2-500, gheigh/2)
      setSpriteAnimation (card, 0, 67)
      tile = 15
      
      loop
      c = controls (0)
         if c.a and tile < tiles - 1 then
           tile += 1
         endif
      
      setspriteschale (card, 3, 3)
      //....................................................................................
      box(580, 95, 430, 570, black, false)     // this is the rectangle
      // I think the rendereffect goes here, but I keep getting varible does not exsist
      // rendereffect (box, framebuffer, fx_motionblur, [1/1280, 1/720]..??
      //......................................................................................................
      if tile == 54 then
         tile += 1
        endif
        drawSprites
        update ( )
      repeat
      
      pianofire 1 Reply Last reply Reply Quote 0
      • pianofire
        pianofire Fuze Team @kendog400 last edited by

        @kendog400 Render effect doesn't quite work like that. You have to draw first to an image and then use rendereffect to draw the image to the frame buffer using that effect. Check out the example here: https://fuzearena.com/help/view/renderEffect

        1 Reply Last reply Reply Quote 0
        • K
          kendog400 F last edited by

          Is there some sort of opacity Fx ?

          pianofire 1 Reply Last reply Reply Quote 0
          • pianofire
            pianofire Fuze Team @kendog400 last edited by

            @kendog400 The effects are the ones listed. I am not sure what they all do. You can set the opacity of a colour using the alpha value of the colour { r, g, b, a) where r,g,b and a are all between 0 and 1

            Try this for your box

            box(580, 95, 430, 570, {0, 0, 0, 0.5}, false)
            
            1 Reply Last reply Reply Quote 1
            • K
              kendog400 F last edited by

              I'e looked all over the help section trying to find the while ! command,
              seems though its not there ?....I've looked in the tutorials...
              Is it hidden somewhere ?....

              pianofire 1 Reply Last reply Reply Quote 0
              • pianofire
                pianofire Fuze Team @kendog400 last edited by

                @kendog400 Not really it is just the normal while command but testing for the condition to be false rather than true before entering the loop

                https://fuzearena.com/help/view/while

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