Recent

Author Topic: Lines Animation: Horizontal, Vertical, Diagonal  (Read 930 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 715
Lines Animation: Horizontal, Vertical, Diagonal
« on: July 13, 2024, 04:05:41 am »
A Lines Animation with Horizontal, Vertical, Diagonal Lines.

A bit hypnotic.

On a TBgraBmp and also on a TPaintbox.

Looking closely at the png's the Paintbox version has jaggies on the diagonal lines.

I thought an extra effect would be to make the lines "Neon Glow" a bit with the bgrabmp version.
« Last Edit: July 13, 2024, 04:13:40 am by Boleeman »

Boleeman

  • Hero Member
  • *****
  • Posts: 715
Re: Lines Animation: Horizontal, Vertical, Diagonal
« Reply #1 on: July 13, 2024, 08:35:17 am »
This produces Blurred lines/Glow type effect on bgraBmp but is incredibly slow.

I love the effect of the intersection points of the lines.

Is there a better way to produce a similar effect, but make it faster ? I wonder ?



« Last Edit: July 13, 2024, 08:38:23 am by Boleeman »

circular

  • Hero Member
  • *****
  • Posts: 4356
    • Personal webpage
Re: Lines Animation: Horizontal, Vertical, Diagonal
« Reply #2 on: July 15, 2024, 06:18:05 pm »
Yes, it is possible to make it faster using OpenGL. I suggest to begin with to look at how to do some geometry and then blur:
opengltest0 shows how to draw a geometric shape.
opengltest4 shows how to apply blur to a texture.
opengltest5 shows how to use a framebuffer (see attached picture).

For the blur lines, the steps would be to create a framebuffer, draw the lines in it, retrieve it as a texture, apply a blur to it and display it.
« Last Edit: July 15, 2024, 06:23:56 pm by circular »
Conscience is the debugger of the mind

Boleeman

  • Hero Member
  • *****
  • Posts: 715
Re: Lines Animation: Horizontal, Vertical, Diagonal
« Reply #3 on: July 16, 2024, 02:10:11 pm »
Thanks Circular for that advice. I will need to install Lazarus on another laptop and the Dev branch of BgraBmp.

Much appreciated for your kind/wise hints on how to extend the animation features.
I was also going to maybe go back to Josh's and DZandaa's animated examples.

What I did also notice was that the screen shot of the program looks different when I compiled on an Intel based laptop.
(with part of the image cut off), where as compiling to my AMD based laptop produces the correct sized image.
Not exactly sure why?




 

TinyPortal © 2005-2018