Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

COMP4900 Computer Graphics | Term Project

Project Title: Bioluminescent Water
Author: Sid Shenoy
Student Number: 101315845
Date: December 5, 2025


Project Structure


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


Additional Setup Notes

  • This program uses ofxGui for customization.
    • The project must be set up with ofxGui as an addon.

Setup Steps

  1. Run projectGenerator.exe
  2. Click Import and import the project
  3. Ensure that Addons is set to ofxGui
  4. Click Update to apply changes

Description

  • 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

Main Features

Interactive Water Surface

  • Click or drag the mouse to create waves
  • Ripples propagate across the pool and interact with each other

Bioluminescent Glow

  • 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

Bloom and Tone-Mapped Final Image

  • 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

GUI Control Panel

  • Uses ofxGui for sliders, toggles, and buttons
  • Parameters are grouped into logical sections:
    • Toggles
    • Water
    • Glow
    • Post
    • Brush
    • Colors

Debug Visualization

  • Switch between the final shaded image and several internal buffers
  • Useful for understanding how each part of the pipeline contributes to the final look

Settings File

  • 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

GUI Parameters

The main GUI panel appears in the top-right corner of the window. All values update live while the simulation runs.

Toggles

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

Water

  • 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

Glow

  • 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

Post

  • 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

Brush

  • Radius | Size of mouse brush (normalized screen space)
  • Strength | Height displacement per stroke

Colors

Base Water R / G / B

  • Base color of non-glowing water

Glow R / G / B

  • Color of the bioluminescent glow

GUI Buttons

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

Controls

Mouse

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

Keyboard | Simulation and Visual Toggles

  • R | Reload all shaders from disk
  • C | Clear water, glow, and bloom
  • G | Toggle glow
  • B | Toggle bloom

Keyboard | Brush Shortcuts

  • [ | Decrease brush radius
  • ] | Increase brush radius
  • ; | Decrease brush strength
  • ' | Increase brush strength
  • V | Toggle whether the brush affects velocity

Keyboard | Debug View Selection

  • 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)

Configuration File (settings.json)

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.

Top-Level Entries

  • settingsVersion | Settings file format version
  • viewSize | Default window size in pixels
  • frameMaxDt | Maximum frame time used internally

water Section

  • waveSpeed, viscosity, globalDamping, edgeDamping,
    edgeWidth, normalScale | Match Water GUI sliders
  • cflSafety | Stability safety factor
  • useVelocityMipsForCFL | Speed estimation toggle
  • maxSubstepDt, maxSubsteps | Substep limits
  • cellSize | Simulation cell size in world units

glow Section

  • threshold, halfLife, dtClamp, spreadStrength,
    spreadRadiusTexels, clampMax, enabled
  • metric | Motion metric driving glow:
    • HeightTimeDerivative
    • HeightGradient / GradientMagnitude
    • KineticEnergy / VelocityMagnitude
    • Combined
  • metricWeights | Relative weights for combined mode
  • metricScale | Per-metric sensitivity scaling

post Section

  • bloomThreshold, bloomSigma, bloomIters, bloomDownscale, exposure, whitePoint, enableBloom
  • baseWaterColor, lightDirection, specular, shininess, reflectionStrength, glowColor

brush Section

  • 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.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages