Results 1 to 6 of 6

Thread: How can I create nice looking 2D glowing lines?

  1. #1

    How can I create nice looking 2D glowing lines?

    I'm trying to create a very simple 2D game that uses retro vector graphics like in the games Defcon and Project Vex. The effect I'm trying to get is glowing lines and the transparent color inside of a color.

    See the screenshots here:
    http://devimg.net/?Post=448
    http://www.introversion.co.uk/defcon...reenshots.html

    I'd like to game to be playable on shader model v1.3 or lower graphics cards so most bloom effects won't work...

    So... my question is this:

    Is it possible to have glowing lines on a video card that only supports pixel shader model v1.3 or lower? I'm open to using any graphics API as long the effect is somewhat easy to create and looks really nice

    If there isn't a nice way to do this on shader model 1.3 cards, what is the easiest/best way to do it on SM2.0 cards?

    Thanks,
    John

  2. #2

    How can I create nice looking 2D glowing lines?

    use a texture for glowing line.
    This is my game project - Top Down City:
    http://www.pascalgamedevelopment.com...y-Topic-Reboot

    My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
    http://www.pascalgamedevelopment.com...source+manager

  3. #3

    How can I create nice looking 2D glowing lines?

    Thanks for the reply!

    I'm a little confused though... can you explain a little more?

  4. #4

    How can I create nice looking 2D glowing lines?

    You could render lines to a temporary render-to-texture buffer. This buffer you then blur using some gaussian blur scheme. Then just add it using additive blending after your last pass.

    Keywords: P-Buffer, FBO(Framebuffer Object), gaussian blur, draw buffers

    This may be overkill though. You could, as Delfi, suggested use a texture
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  5. #5

    How can I create nice looking 2D glowing lines?

    Well, if you were working in OpenGL or DirectX you could draw the line (or multiple lines) two or three times using glLineWidth (or the directX equivalent) to make it narrower, varying the transparancy as you go.

    If you had a sprite mapped out as a single set, you could render it multiple times in varying widths and transparancies to do the whole thing a hair faster/more efficient than one line at a time as well.

    OpenGL actually makes REALLY SWEET 2d vector games.
    The accessibility of a website from time to time must be refreshed with the blood of designers and owners. It is its natural manure

  6. #6

    How can I create nice looking 2D glowing lines?

    Like Delfi mentioned, textured quads work nice. Simple 8x8 texture for example that has white middle and fading to black up and downwards.

    If using OpenGL, this sets a nice additive blend mode on:
    glBlendFunc(GL_SRC_ALPHA,GL_ONE);

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •