Skip to content

Elarwei001/ocean-forest-3d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒŠ Ocean Forest - Interactive 3D Marine Educational Experience

An immersive 3D ocean ecosystem educational website built with Three.js, showcasing the magical world of South African kelp forests.

Ocean Forest Three.js License

๐ŸŽฏ Project Features

๐Ÿ™ Core Functionality

  • Controllable 3D Octopus - WASD movement with mouse camera control
  • Authentic Marine Life - Seals, penguins, sharks, reef fish, and more
  • Natural Ecosystem Behaviors - Schooling, predation, foraging behaviors
  • Educational Interactive System - Click marine animals to learn
  • Immersive Audio - Ocean waves, bubbles, marine life sounds

๐ŸŽฌ Cinema-Quality Visual Effects

  • Advanced Material System - PBR materials with iridescent fish scale effects
  • Dynamic Lighting - Volumetric lighting and caustic effects
  • Particle Systems - Bubbles and bioluminescent plankton
  • Post-Processing Effects - Depth of field and motion blur
  • Cinematic Camera System - Multiple professional camera modes

๐ŸŽจ Advanced 3D Model Generation

  • Photogrammetry System - Multi-image 3D reconstruction for hero species
  • AI Depth Estimation - Single-image depth mapping for fish textures
  • Procedural Generation - Biologically-accurate procedural marine life
  • Intelligent Model Selection - Automatic best-method selection per species
  • Performance Optimization - LOD systems and memory management

๐ŸŽฎ Performance Monitoring

  • Real-time FPS Display - Performance tracking
  • Marine Life Counters - Live animal counts
  • System Status - Module loading indicators

๐Ÿš€ Quick Start

Live Experience

๐ŸŒ Visit the live demo: https://elarwei001.github.io/ocean-forest-3d/

Local Development

# Clone the repository
git clone https://github.com/Elarwei001/ocean-forest-3d.git
cd ocean-forest-3d

# Start local server (recommended)
python3 -m http.server 8000
# Or using Node.js
npx http-server

# Visit http://localhost:8000

๐ŸŽฎ Controls Guide

Basic Controls

  • WASD - Move octopus
  • Mouse Movement - Camera view control
  • M Key - Toggle mouse control mode
  • Spacebar - Swim up
  • Shift - Swim down

Educational Interaction

  • Click Marine Life - View detailed information
  • ๐ŸŽฌ Cinema Control Panel - Upper-right control panel
  • Camera Modes - Follow, cinematic, orbit, documentary modes

๐Ÿ  Marine Life

South African Endemic Species

  • ๐Ÿฆญ Cape Fur Seal (Arctocephalus pusillus)
  • ๐Ÿง African Penguin (Spheniscus demersus)
  • ๐Ÿฆˆ Great White Shark (Carcharodon carcharias)
  • ๐ŸŸ Yellowtail Amberjack (Seriola lalandi)
  • ๐Ÿ  Hottentot Fish (Pachymetopon blochii)

Ecological Behaviors

  • Schooling - Fish separation, alignment, and cohesion behaviors
  • Predation - Shark hunting patterns
  • Territorial - Seal habitat protection
  • Avoidance - Escape responses to predators

๐Ÿ“ Project Structure

ocean_forest/
โ”œโ”€โ”€ index.html              # Main page
โ”œโ”€โ”€ src/                     # Source code directory
โ”‚   โ”œโ”€โ”€ core/               # Core systems
โ”‚   โ”‚   โ”œโ”€โ”€ OceanForest.js  # Main application class
โ”‚   โ”‚   โ””โ”€โ”€ ModuleManager.js # Module manager
โ”‚   โ”œโ”€โ”€ models/             # 3D models
โ”‚   โ”‚   โ”œโ”€โ”€ OctopusModel.js # Octopus model
โ”‚   โ”‚   โ”œโ”€โ”€ MarineAnimals.js # Marine animals
โ”‚   โ”‚   โ””โ”€โ”€ ReefFishModel.js # Reef fish model
โ”‚   โ”œโ”€โ”€ systems/            # System modules
โ”‚   โ”‚   โ”œโ”€โ”€ AudioSystem.js  # Audio system
โ”‚   โ”‚   โ”œโ”€โ”€ EducationSystem.js # Education system
โ”‚   โ”‚   โ”œโ”€โ”€ RenderEngine.js # Render engine
โ”‚   โ”‚   โ”œโ”€โ”€ PhotogrammetrySystem.js # 3D reconstruction
โ”‚   โ”‚   โ”œโ”€โ”€ AIDepthEstimation.js # AI depth mapping
โ”‚   โ”‚   โ”œโ”€โ”€ ProceduralModelGenerator.js # Procedural models
โ”‚   โ”‚   โ””โ”€โ”€ Advanced3DModelSystem.js # 3D model hub
โ”‚   โ”œโ”€โ”€ ui/                 # User interface
โ”‚   โ””โ”€โ”€ tests/              # Testing system
โ”‚       โ””โ”€โ”€ 3DModelGenerationTest.js # 3D model tests
โ”œโ”€โ”€ assets/                 # Resource files
โ”‚   โ”œโ”€โ”€ styles/            # CSS styles
โ”‚   โ”œโ”€โ”€ images/            # Image resources
โ”‚   โ””โ”€โ”€ sounds/            # Audio files
โ””โ”€โ”€ docs/                  # Documentation
    โ””โ”€โ”€ 3D-Model-Generation-Guide.md # Complete 3D model guide

๐Ÿ“š Documentation

3D Model Generation System

For comprehensive information about the advanced 3D model generation system, see:

  • 3D Model Generation Guide - Complete documentation
  • Testing Guide - Automated testing with src/tests/3DModelGenerationTest.js

Quick Start Guide

  1. Hero Species - Use photogrammetry with 3+ reference images
  2. Standard Fish - Use AI depth estimation with single reference image
  3. Background Species - Use procedural generation with biological parameters

๐Ÿ”ง Technology Stack

  • Three.js r128 - 3D graphics rendering
  • WebGL - Hardware-accelerated graphics
  • Web Audio API - Spatial audio
  • ES6+ JavaScript - Modern JavaScript
  • CSS3 - Modern styling and animations
  • Modular Architecture - Scalable code structure

๐ŸŽฌ Cinema-Quality Features

Visual Effects

  • Physical Rendering - PBR material system
  • Dynamic Lighting - Real-time shadows and reflections
  • Particle Effects - 200+ bubbles, 150+ bioluminescent plankton
  • Post-Processing - Depth of field, tone mapping

Camera System

  • Follow Mode - Smooth octopus following
  • Cinematic Mode - Professional camera movements
  • Orbit Mode - Orbital cinematography
  • Documentary Mode - Handheld camera effects

๐Ÿ› Troubleshooting

Common Issues

  1. Page Loading Stuck - Check browser WebGL support
  2. Abnormal Fish Swimming - Refresh page to reset state
  3. Control Panel Not Showing - Ensure all scripts are loaded

Performance Optimization

  • Reduce particle density
  • Disable advanced lighting effects
  • Reduce marine life count

๐Ÿค Contributing

  1. Fork the project
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details

๐Ÿ™ Acknowledgments

  • Three.js Community - Powerful 3D library
  • South African Marine Research Institute - Behavioral references
  • Marine Conservation Organizations - Educational content support

๐ŸŒŠ Experience the Mysterious Ocean Forest World! ๐Ÿ™

Developed with assistance from Claude Code

About

๐ŸŒŠ Interactive 3D Ocean Forest Educational Experience with South African Marine Life

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages