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 6 of 6

Thread: Simple simulations - need advice

  1. #1
    Guest

    Simple simulations - need advice

    I'm a relative newbie to OpenGL and I'm planning to develop simple simulations of astromonical events - e.g. solar eclipse, asteroid hurtling toward earth, gas cloud collapsing for form a star, etc.

    How would you go about writing systems like these with OpenGL? I've got simple programs working now, but they hardcode the geometry and don't use any kind of scene graph or bsp-tree for scene manipulation (and I'm not sure they need to).

    I'm not sure where to start. Any references would be greatly appreciated.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    184

    Re: Simple simulations - need advice

    definitely not bsp trees. they are used for hidden surface removal and work best with indoor environments. sounds like you should start looking at particle engines, gravity, physics, etc.

    b

  3. #3
    Senior Member OpenGL Pro
    Join Date
    Feb 2002
    Location
    Bonn, Germany
    Posts
    1,633

    Re: Simple simulations - need advice

    Check out the spec section about vertex arrays. It's pretty straight forward once you manage to wrap your mind around it. This will remove the need for hard-coded geometry.

    Animation and culling falls into the realm of software engineering challenges though. OpenGL is too low level to handle it all.

  4. #4
    Member Regular Contributor
    Join Date
    Jul 2001
    Posts
    442

    Re: Simple simulations - need advice

    For a space sim however, you might consider researching Octrees or at least frustum culling. I'm sure the former isn't particularly `easy' or at beginner level (intermidiate). There are `scene graphs' available all over the place that hook into OpenGL though - so you might consider using one of those (if you want to learn how they work, its best to try and write your own however).

  5. #5
    Guest

    Re: Simple simulations - need advice

    Thanks for the tips. I should amend my original "newbie" statement. While I'm a newbie to OpenGL, I've been programming in C and C++ for 8-10 years.

    My OpenGL experience is currently the basics I've learned with the Red Book and Super Bible - transformations, matrix stacks, simple camera operation, texture mapping, lighting, materials.

    I'm just stuck on where to go next for the "higher level" stuff involved in building/rendering a scene. The Graphics Gems books seem to be too low level...Real Time Rendering and the 3D Game Engine Design book look promising. OpenInventor seems like overkill for what I would like to do.

    Anyway, thanks again, and I hope this gives a better picture about where I currently am in my experience.

  6. #6
    Intern Newbie
    Join Date
    Aug 2001
    Location
    Vancouver, British Columbia, Canada
    Posts
    35

    Re: Simple simulations - need advice

    You could check out some VRML tutorials (google search: vrml tutorial)

    Coding the graph is easy once you see how it's done, and VRML does it.

    HTH

Posting Permissions

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