This repository was archived by the owner on Feb 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
OpenGL & Cuda project that simulates fish shoals.
License
Manomenu/fish-shoals-gpu
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Shoal of fishes OpenGL + Cuda simulation project ------------------------------------------------------------------------------------------- Overview ------------------------------------------------------------------------------------------- You can watch the simulation of loads of fishes forming shoals. You can manipulate group behaviour by changing some parameters in graphical user interface. User can fly around the simulation with free camera. (Improvement idea: camera independent from scene rendering) ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- IMPORTANT ------------------------------------------------------------------------------------------- Run program in RELEASE mode! If you are lacking some libraries/include files go to properies of a project, in VC++ Directories add 'Incude Directories' folder that I put inside project (fish-shoals-gpu\fish_shoals-gpu\includes). Respectfully add proper folder to 'Library directories' (fish-shoals-gpu\fish_shoals-gpu\libraries). ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- CONFIGURATION ------------------------------------------------------------------------------------------- GPU - by default CPU - go to config.cuh file and uncomment #define CPU at line 5 number of fishes - find and change lines 49 and 47 in config.cuh (#define FISH_COUNT 50000) other meaningful parameters can be changes in program's gui ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- OPTIMALIZATION ------------------------------------------------------------------------------------------- Mainly I use dynamically adjustable to fishes view range unit grid, so every fish only check its close neighbourhood, not all the fishes in the simulation. For quick rendering i use instanced drawing, one fish model is rendered many times with different model matrices. Those matrices are computed in cuda kernel. For quicker data flow computation data stays in gpu memory all the time, I used cuda-openGL interop. ------------------------------------------------------------------------------------------- ------------------------------------------------------------------------------------------- VIDEO ------------------------------------------------------------------------------------------- https://www.youtube.com/shorts/P9PdMS1-Ul0 -------------------------------------------------------------------------------------------
About
OpenGL & Cuda project that simulates fish shoals.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published