Project Title: Bioluminescent Water
Author: Sid Shenoy
Student Number: 101315845
Date: December 5, 2025
BioluminescentWater/
| addons.make
| config.make
| README.txt
| Sid_Shenoy_COMP4900L_Project_Report.pdf
|
+-- bin/
| +-- data/
| | settings.json
| |
| +-- shaders/
| | blur.frag
| | glow_update.frag
| | impulse.frag
| | normals.frag
| | post_composite.frag
| | sim_update.frag
|
+-- image-gallery/
| image_01.png
| image_02.png
| image_03.png
| image_04.png
| image_05.png
| image_06.png
| image_07.png
| image_08.png
| image_09.png
| image_10.png
| image_11.png
| image_12.png
| image_13.png
| image_14.png
| image_15.png
|
+-- src/
| GlowField.cpp
| GlowField.h
| GpuPingPong.h
| main.cpp
| ofApp.cpp
| ofApp.h
| PostFX.cpp
| PostFX.h
| Utils.h
| WaterSim.cpp
| WaterSim.h
- This program uses ofxGui for customization.
- The project must be set up with
ofxGuias an addon.
- The project must be set up with
- Run
projectGenerator.exe - Click Import and import the project
- Ensure that Addons is set to
ofxGui - Click Update to apply changes
- This program is an interactive bioluminescent water demo built with openFrameworks
- The screen shows a top-down view of a shallow water surface that behaves like a 2D pool
- You can click and drag the mouse to create splashes and waves that move across the surface
- Areas with strong motion light up with a bright blue glow that imitates real-world bioluminescent bays
- A simple bloom effect is used so bright glow regions bleed out softly into their surroundings
- All major visual settings (water behaviour, glow, bloom, colors, brush) can be adjusted using an on-screen GUI panel in the top right
- Several debug views make it easy to see what the simulation is doing: height, velocity, glow, and surface normals
- The window is resizable and the simulation grid automatically adjusts to match the new resolution
- Click or drag the mouse to create waves
- Ripples propagate across the pool and interact with each other
- Water motion drives a separate glow buffer
- Stronger motion creates brighter blue emission
- Glow fades over time instead of cutting off instantly
- Glow can spread to neighboring pixels so wave patterns feel smoother and more organic
- Bright parts of the glow are extracted into a bloom buffer
- A blur is applied to bloom so bright regions glow softly
- The final image is tonemapped so dark water and bright glow stay in range on a regular monitor
- Uses
ofxGuifor sliders, toggles, and buttons - Parameters are grouped into logical sections:
- Toggles
- Water
- Glow
- Post
- Brush
- Colors
- Switch between the final shaded image and several internal buffers
- Useful for understanding how each part of the pipeline contributes to the final look
- A JSON file (
bin/data/settings.json) stores the default configuration - Includes both GUI-visible parameters and extra advanced ones
- A reset button in the GUI restores values loaded from this file
The main GUI panel appears in the top-right corner of the window. All values update live while the simulation runs.
Glow Enabled
- Turns the bioluminescent glow effect on or off
- When off, water still simulates but no glow is added
Bloom Enabled
- Turns the bloom post effect on or off
- When off, bright glow areas no longer bleed into surroundings
Brush Affects Speed
- If enabled, mouse strokes also push water sideways
- If disabled, the brush only changes water height
- Wave Speed | Controls wave propagation speed
- Viscosity | Controls how quickly motion smooths out
- Global Damping | Overall energy loss per step
- Edge Damping | Extra damping near pool edges
- Normal Scale | Strength of surface shading bumps
- Edge Width (px) | Width of the border damping region
- Threshold | Minimum motion required for glow
- Half-Life (s) | Time for glow to fade to half brightness
- dt Clamp (s) | Max frame time used in glow update
- Spread Strength | Amount of glow spread to neighbors
- Spread Radius (tx) | Approximate glow radius in texels
- Clamp Max | Maximum glow value per pixel
- Exposure | Overall brightness before tonemapping
- White Point | Tonemap white reference
- Bloom Threshold | Brightness required to enter bloom
- Bloom Sigma | Blur radius for bloom
- Bloom Iters | Number of bloom blur passes
- Radius | Size of mouse brush (normalized screen space)
- Strength | Height displacement per stroke
Base Water R / G / B
- Base color of non-glowing water
Glow R / G / B
- Color of the bioluminescent glow
Clear Everything
- Clears water simulation, glow, and bloom buffers
- Does not change parameter values
Reset Parameters
- Restores values from
settings.json - Refreshes internal state so the simulation continues smoothly
Left Mouse Button (Click)
- Adds a circular splash at the cursor position
Left Mouse Button (Drag)
- Paints continuous impulses
- Useful for drawing glow paths or stirring the pool
- R | Reload all shaders from disk
- C | Clear water, glow, and bloom
- G | Toggle glow
- B | Toggle bloom
- [ | Decrease brush radius
- ] | Increase brush radius
- ; | Decrease brush strength
- ' | Increase brush strength
- V | Toggle whether the brush affects velocity
- 1 | Final tonemapped image (default)
- 2 | Height field view (grayscale)
- 3 | Velocity field view (direction and magnitude)
- 4 | Glow field view (raw glow buffer)
- 5 | Normals view (RGB surface normals)
All default values are stored in:
bin/data/settings.json
Typical users can run the app without editing this file. It defines startup values for the GUI and advanced internal settings.
- settingsVersion | Settings file format version
- viewSize | Default window size in pixels
- frameMaxDt | Maximum frame time used internally
waveSpeed,viscosity,globalDamping,edgeDamping,
edgeWidth,normalScale| Match Water GUI sliderscflSafety| Stability safety factoruseVelocityMipsForCFL| Speed estimation togglemaxSubstepDt,maxSubsteps| Substep limitscellSize| Simulation cell size in world units
threshold,halfLife,dtClamp,spreadStrength,
spreadRadiusTexels,clampMax,enabledmetric| Motion metric driving glow:HeightTimeDerivativeHeightGradient/GradientMagnitudeKineticEnergy/VelocityMagnitudeCombined
metricWeights| Relative weights for combined modemetricScale| Per-metric sensitivity scaling
bloomThreshold,bloomSigma,bloomIters,bloomDownscale,exposure,whitePoint,enableBloombaseWaterColor,lightDirection,specular,shininess,reflectionStrength,glowColor
radius,strength,affectVelocity
Any changes to settings.json take effect the next time the program is launched.
The Reset Parameters button restores values from this file.