Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Thunder effect How to begin ??

  1. #1
    Newbie Newbie
    Join Date
    Dec 2012
    Posts
    2

    Thunder effect How to begin ??

    I'm learning OpenGL programming with C/C++.

    I want to create a 2D Thunder effect but i don't know how to start or a sample code that teach me how to modify it and customize it.

    Thanks in advance.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2012
    Posts
    129
    Here is how I would do it: Take a starting point, and then randomly branch out from there to some random number of branches or distance, drawing lines (made out of quads) as you go. You can bias the expansion towards a point. To do this, create a 2D vector with random x and y coordinates, normalize it, and add the bias vector. If you render it to a FBO, you can also blur it to make it look brighter (bloom): http://www.gamerendering.com/2008/10...filter-shader/.

  3. #3
    Newbie Newbie
    Join Date
    Dec 2012
    Posts
    2
    I will try your ideas and the concepts i see in the link.

Posting Permissions

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