Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: How can I achieve this effect with OpenGL?

  1. #1
    Newbie Newbie
    Join Date
    May 2013

    How can I achieve this effect with OpenGL?


    I'm currently working on my program for my bachelors degree: I'm going to do a comparison of various (simpler) ways one could run a gravity simulation (with the most complex being Barnes-Hut ran with CUDA). I'm also including a GUI, witch which I'd like to display the simulation (or a playback of a precomputed simulation). I've got a control set up nicely and displaying the simulation simply as GL_POINTS:
    What I would like to have is something like this:
    I find the simulation visualizations above absolutely beautiful and would like to know how I could go about implementing them (or something similar to them) into my own program.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    Jan 2012
    These look like they have used a simple colour lookup for each data point and just coloured the vertices. If you don't want discrete points you have much bigger problem because you will need to to create a boundary surface around you data.

  3. #3
    Super Moderator OpenGL Guru dorbie's Avatar
    Join Date
    Jul 2000
    Bay Area, CA, USA
    If you are plotting points then color coding them could get you closer but there should be so many points in a serious simulation that rendering like this becomes impractical. One option is to construct a 3D texture of density and visualize that using volume rendering, and use a color look-up or ramp on the density (or other parameters like velocity, you are not limited to a volume of a single parameter)

    OpenGL only draws the results as you know, for the actual simulation it seems like you understand what you need but it is not directly relevant to OpenGL.

Posting Permissions

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