VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. Freelance scientist Chemist116's Avatar
    Join Date
    May 2017
    Location
    Perú
    Search Comp PM
    I want to make animated gif text. I've browsed different sites and so on but they require registration and I am not looking for that.

    Is there any easy way to do this?. What I intend to do is some retro 90s era text which it can move. I mean the letters up and down.

    How can I do this?.
    Quote Quote  
  2. Member
    Join Date
    Feb 2006
    Location
    United States
    Search Comp PM
    Originally Posted by Chemist116 View Post
    I want to make animated gif text. I've browsed different sites and so on but they require registration and I am not looking for that.

    Is there any easy way to do this?. What I intend to do is some retro 90s era text which it can move. I mean the letters up and down.

    How can I do this?.
    try with Aviutl - https://forum.videohelp.com/threads/366724-Aviutl-Tips-Tricks-and-Support-thread
    Quote Quote  
  3. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    BluffTitler, though that doesn't easily output gif (pref is avi, but conversion is easy).
    Quote Quote  
  4. It can be done with AviSynth. But even with simple motions it's not very easy.

    Image
    [Attachment 64701 - Click to enlarge]


    Code:
    function MoveWithBounce(clip vid, clip overlay, clip mask, int x, int y, int angle, int amplitude)
    {
       radians = float(angle) / (360.0 / PI / 2.0)
       yoff = sin(radians) * float(amplitude)
       yoff < 0 \
        ? Overlay(vid, overlay, x, y + int(yoff), mask) \
        : Overlay(vid, overlay, x, y - int(yoff), mask)
    }
    
    lettera=BlankClip(width=32, height=32, Color=0).Subtitle("A", size=46, x=1, y=-7).ConvertToYV24().Greyscale().ColorYUV(cont_y=100)
    letterb=BlankClip(width=32, height=32, Color=0).Subtitle("B", size=46, x=1, y=-7).ConvertToYV24().Greyscale().ColorYUV(cont_y=100)
    letterc=BlankClip(width=32, height=32, Color=0).Subtitle("C", size=46, x=1, y=-7).ConvertToYV24().Greyscale().ColorYUV(cont_y=100)
    white = BlankClip(lettera, color=$ffffff)
    
    ColorBars(width=160, height=160).ConvertToYV24()
    
    Animate(0, 360, "MoveWithBounce", last, white, lettera, 32, 76,   0, 30,    last, white, lettera, 32, 76, 3600, 30)
    Animate(0, 360, "MoveWithBounce", last, white, letterb, 64, 76,  45, 30,    last, white, letterb, 64, 76, 3645, 30)
    Animate(0, 360, "MoveWithBounce", last, white, letterc, 96, 76,  90, 30,    last, white, letterc, 96, 76, 3690, 30)
    
    AssumeFPS(24)
    Trim(0, 35)
    Quote Quote  
  5. Freelance scientist Chemist116's Avatar
    Join Date
    May 2017
    Location
    Perú
    Search Comp PM
    Originally Posted by jagabo
    It can be done with AviSynth. But even with simple motions it's not very easy.
    You understood my requirement. However I want to know how to make those letters to say something like.

    Nursing

    The color of the letters, how do I make them to be turquoise? For reference on this please look here. In the article the color I am aiming it is hex 40E0D0.

    Also, how to make the outline of the letters to be black I mean the contour and also in the letters to have a sparkle effect, like those retro early 90s computer logos. I mean like this one, is that possible?.

    If you see in the video there are four pointed stars like sparkles around the letters. With the same colors as the video, I think it is white or silvery? with some light outline.

    In addition to that, how to make it so that the background is transparent and that the output size is 320px in width and height 200px? How I do that? Can you teach me how to do it?
    Quote Quote  
  6. Originally Posted by Chemist116 View Post
    I want to know how to make those letters to say something like.

    Nursing
    Each letter is an object in the script. Each can be moved independently and has a transparent background. I arbitrarily chose A, B, and C. You can use whatever letters you want. And you can create more letters following the given template:

    Code:
    lettera=BlankClip(width=32, height=32, Color=0).Subtitle("A", size=46, x=1, y=-7).ConvertToYV24().Greyscale().ColorYUV(cont_y=100)
    lettera is just a name for the object. The actual letter is the "A" following "Subtitle(". The size of each object is 32x32 pixels with a 46 pica font used for the letter. You could use whatever sizes you want -- but you will need to adjust the size of the box and the font used to draw it.

    Originally Posted by Chemist116 View Post
    how do I make them to be turquoise? For reference on this please look here. In the article the color I am aiming it is hex 40E0D0.
    The objects here are used as alpha (transparency) channels. I created white letters by overlaying a white block (with an alpha channel for each letter) onto a background video. The background colorbars video was created with:

    Code:
    ColorBars(width=160, height=160)
    The white block is created with:

    Code:
    white = BlankClip(lettera, color=$ffffff)
    If you would rather have turquoise letters specify the color in that call

    Code:
    white = BlankClip(lettera, color=$40E0D0)
    Of course it would make sense to name it "turquoise" rather than "white".

    Originally Posted by Chemist116 View Post
    Also, how to make the outline of the letters to be black I mean the contour
    You could overlay black with an expanded mask before overlaying the turquoise letter.

    Code:
       black = BlankClip(overlay, color=$000000) # create a black box similar to the overlay box
    
       yoff < 0 \
        ? Overlay(vid, black, x, y + int(yoff), mask.mt_expand().mt_expand()) \
        : Overlay(vid, black, x, y - int(yoff), mask.mt_expand().mt_expand())
       yoff < 0 \
        ? Overlay(last, overlay, x, y + int(yoff), mask) \
        : Overlay(last, overlay, x, y - int(yoff), mask)
    Note that the Subtitle function generates text of a specified color with a black outline. So instead of using two overlays (one with black, one with the desired color) you could create the letters the way you want in the first place. But you would also have to create a suitable alpha channel to go with it. This would be a more eloquent way of doing but bit I didn't want to spend the time on this short example.

    Originally Posted by Chemist116 View Post
    and also in the letters to have a sparkle effect, like those retro early 90s computer logos. I mean like this one, is that possible?.
    It's possible but you would have to create animated objects and overlay them.

    Originally Posted by Chemist116 View Post
    In addition to that, how to make it so that the background is transparent and that the output size is 320px in width and height 200px? How I do that? Can you teach me how to do it?
    I created a colorbar background of 160x160. You probably want to use some image as the background. You would have to import that image instead of creating the colorbars. If that image isn't 320x200 you could resize it within the script.

    But this whole process is pretty complicated if you don't know AviSynth reasonably well. You should just use an NLE with a GUI and all the bells and whistles.
    Quote Quote  
  7. Freelance scientist Chemist116's Avatar
    Join Date
    May 2017
    Location
    Perú
    Search Comp PM
    Originally Posted by jagabo
    But this whole process is pretty complicated if you don't know AviSynth reasonably well. You should just use an NLE with a GUI and all the bells and whistles.
    If you don't mind. Can you show an example of how would it look like the animation you created for the letters ABC but with the black outline and the turquoise color?.

    How would all the code look like in the end doing this modification?. Because I am not sure how to update the code you wrote earlier. Can you display the result as you did it above please?

    It is not indicated how did you positioned the ABC letters in the center of the colorbars?
    I think that the part where the colorbars are generated is on

    Code:
    ColorBars(width=160, height=160).ConvertToYV24()
    But how do I replace it with any image?. Can you please modify your code so I can learn how to do it?

    I am wondering, is it some way to create that animation using AviSynth or any other software that you know? For starters I'd like to recreate that effect with static letters as in the video but with that sparkle as it appears in the corners of the letters.

    I haven't asked but, can you change the font?. Let's say I want to use Times New Roman for example.

    By the way I don't mind learning coding or command line instructions. So if you guide me through with this example I can do it on my own.
    Quote Quote  
  8. Here's a script that adds a sparkle. The sparkle and background were stolen from the youtube video.

    Code:
    function OverlayWithBounce(clip vid, clip image, int x, int y, int angle, int amplitude)
    {
       radians = float(angle) / (360.0 / PI / 2.0)
       yoff = sin(radians) * float(amplitude)
       yoff < 0 \
        ? Overlay(vid, image, x, y+int(yoff), ShowAlpha(image)) \
        : Overlay(vid, image, x, y-int(yoff), ShowAlpha(image))
    }
    
    function MakeLetter(string letter)
    {
        image = BlankClip(width=32, height=32, Color=$000000).Subtitle(letter, size=40, x=3, y=-4, text_color=$40E0D0)
        alpha = BlankClip(width=32, height=32, Color=$ffffff).Subtitle(letter, size=40, x=3, y=-4, text_color=$000000).Invert().ConvertToYV24(matrix="pc.601")
        MergeARGB(alpha, ShowRed(image), ShowGreen(image), ShowBlue(image))
    }
    
    function ShowSparkle(clip bg, clip star, int xpos, int ypos, int firstframe)
    {
        p1 = Trim(bg, 0, firstframe-1)
        p2 = Trim(bg, firstframe, firstframe+star.framecount).Overlay(star, xpos, ypos, mask=ShowAlpha(star))
        p3 = Trim(bg, firstframe+star.framecount+1,0)
        p1+p2+p3
    }
    
    sparkle = LWlibavVideoSource("sparkle.avi", cache=false)
    turq = sparkle.ConvertToYV24().Tweak(hue=150).ConvertToRGB32()
    sparkle = MergeARGB(sparkle.ShowAlpha(), turq.ShowRed(), turq.ShowGreen(), turq.ShowBlue())
    
    # create a background video
    ImageSource("background.png", start=0, end=35, fps=30.0).RGBAdjust(rb=80, gb=50, bb=80)
    
    # create the overlay objects
    lettern = MakeLetter("N")
    letteru = MakeLetter("u")
    letterr = MakeLetter("r")
    letters = MakeLetter("s")
    lettere = MakeLetter("e")
    
    
    # overlay the letters with bouncing
    sx = 95
    sy = 145
    Animate(0, 360, "OverlayWithBounce", last, lettern, sx+0,  sy,   0, 0,    last, lettern, sx+0,  sy, 3600, 0)
    Animate(0, 360, "OverlayWithBounce", last, letteru, sx+26, sy,  45, 8,    last, letteru, sx+26, sy, 3645, 8)
    Animate(0, 360, "OverlayWithBounce", last, letterr, sx+48, sy,  90, 8,    last, letterr, sx+48, sy, 3690, 8)
    Animate(0, 360, "OverlayWithBounce", last, letters, sx+64, sy, 135, 8,    last, letters, sx+64, sy, 3735, 8)
    Animate(0, 360, "OverlayWithBounce", last, lettere, sx+84, sy, 180, 8,    last, lettere, sx+84, sy, 3780, 8)
    
    ShowSparkle(last, sparkle, 82, 129, 2)
    ShowSparkle(last, sparkle, 103, 156, 10)
    You can File -> Open Video File the script with VirtualDub2 and use File -> Export -> Animated GIF to create an animated GIF from it. I made the background image a little lighter so you could see the black outline around the bouncing text.

    Image
    [Attachment 64752 - Click to enlarge]

    A Zip file with the script and assets is attached.
    Image Attached Files
    Last edited by jagabo; 10th May 2022 at 20:33. Reason: fixed incorrect gif
    Quote Quote  
  9. I'd probably go with a GUI like a video editor for 2D text animation. It's easier for most people to use a GUI. For the most control I'd use After Effects and it has probably thousands of tutorials on YT - but it's not free

    Aviutl is decent for simple 2d animation , it has lots of presets, effects, very customizable if you want to do manual animation too. But it's "quirky" and not standard compared to most software, a bit of a learning curve. But it's free and GUI based

    You mentioned "gif", but it's limited to 256 colors. The dithering that is used makes edges look ugly. If you don't dither, you get banding and jaggy artifacts

    "animated webp" has potentially ~16.3M colors, and offers lossy or lossless compression

    This is all procedurally done within aviutl (the sparkle flares are done in scene1 and nested into the main scene) . Project file below

    GIF 759kb


    WEBP lossy 594kb
    Image Attached Files
    Quote Quote  
  10. Yes, a real editor with a GUI is much simpler than AviSynth. Especially as the OP keeps requesting additional features.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!