Introduction

This project is a GPU-accelerated particle simulation built with OpenGL. Motion is calculated using vertex and compute shaders, where each particle follows defined rules of interaction and evolution.

The playground allows experimenting with different particle behaviors, from simple spawning to complex N-body simulations and mesh surface interactions.

Features

  1. Spawning Particle Program
    Particles spawn with random lifetime, velocity, and color within a defined area.

  2. Single Attractor
    Particles are drawn toward a movable attractor point on the screen.

  3. Multi Attractor
    Particles respond to multiple attractor points, each influencing their trajectory.

  4. N-Body Simulation
    Particles interact with one another using an inverse-square law, simulating gravitational-like forces.

  5. Mesh Surface Estimation
    Particles are guided toward random points on a mesh surface, creating a surface-filling effect.

Conclusion

The Particle Simulation Playground highlights the versatility of GPU programming with OpenGL. By leveraging shaders for motion, interaction, and rendering, it creates visually rich simulations that can scale efficiently while offering diverse particle behaviors.

Copyright Notice

Author: Abhishta Gatya Adyatma

Link: https://abhishtagatya.github.io/posts/particle-simulation-playground-in-opengl/

License: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Please attribute the source, use non-commercially, and maintain the same license.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut