7935 Boids simulation in a GeForce8800GT

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
10,389
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Feb 25, 2008

It is just one test in a simple implementation of boids simulation over the gpu. The CamStudio(the program that I use to record videos) makes the program runs about 36fps. The simulation compute all N*N iterations between all boids. In the PC that I run this program the PCI-e was running at 2x... and the result is good yet.

Link to this comment:

Share to:
see all

All Comments (14)

Sign In or Sign Up now to post a comment!
  • Very clever implementation!

  • @BinaryReader The third is using the shader API. You can render the "area" to activate the processing pipeline and discard some pixels from the pipeline. In the main program (outside the shader) you can use the occlusion query from graphics API that counts the pixels written in the framebuffer. This can be faster, considering you make more than a single query. You can also prepare the rendering to do more than just a quad.

  • @BinaryReader The second is using CUDA too. You can declare a "boolean buffer", and write on it with the addressing of the thread. After the writing you can apply a binary reduction to a single element. You must implement a kernel to sum the values in the reduction. At the end you will have the sum of the theads that have made something.

  • @BinaryReader I know 3 ways (one is a trick on graphics API).

    The first is using CUDA. You can declare a global memory variable, initialize it and every thread can write on it by using the atomic operation. This is not very efficient, but works.

  • @EdynWardenhari I've used the boids simulation algorithm proposed by Reynolds as basis to make my algorithm. There are a lot of other models to compute behavior, each one aplied to a specific kind of population. (fish, bird, human, gaseous, ...).

  • I have a quick question with regards to CUDA / Compute frameworks.

    Do you know any tricks to enable say, a count that increments every time a fragment shader is run during a single pass.

    I hear this "shared/global memory" is something unique only to compute frameworks.

    I'm really yet to dive into compute specific code (have played with GPGPU via OpenGL and DirectX), im not really keen on them in their current state.

  • @spdoido eh, i don't really mind working my own stuff from stratch even if it means more work. Helps alot understanding how everything works ^^.

    Do you suggest any algorythm for boids like this or should I try thinking of my own way to do it?

  • @EdynWardenhari I suggest you to learn any GPGPU language or coding in windows with DX computing.

    Its very, very...... very easy to make parallel algorithms using those APIs than using the raw graphics API.

    The code might be slower, but you can make a lot of things with it.

  • It could have been anything. But the white box reminds me of some openGL works I have for my CG course :P, lucky pick i guess!

    looks really good, I am starting to learn the GLSL right now, can't wait to see what i can do with it.

  • @EdynWardenhari How did you know this program runs over opengl? lol. I don't remember the version of the OpenGL API I've used. But probably it was the OpenGL2.0. I've written the shaders using the the CG/CGFX API, and the final code runs according the profile selected.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more