Skip to content

pili01/grafika3D

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

3D Graphics Project - Island Scene

A 3D graphics project created with OpenGL, featuring an interactive island scene with dynamic lighting, weather effects, and various 3D objects. This project was developed as part of a Computer Graphics course.

Features

3D Scene Elements

  • Island - Textured terrain with sand textures
  • Water - Animated water surface with adjustable transparency
  • Sun & Moon - Dynamic day/night cycle with realistic movement
  • Stars - 500 randomly positioned stars in the night sky
  • Palm Trees - Multiple palm trees with bark and leaf textures
  • Clouds - 10 animated clouds with varying speeds and directions
  • Shark - Animated shark swimming in the water
  • Fire & Smoke - Interactive fire effects with smoke animation
  • Airplane - Detailed 3D airplane model with multiple components
  • Sky - Spherical skybox with textured environment

Interactive Features

  • Dynamic Day/Night Cycle - Time progression with sun and moon movement
  • Water Ripple Effect - Click on water to create expanding ripple circles
  • Fire Interaction - Click on fire to trigger airplane appearance and smoke effects
  • Camera Controls - First-person style camera with rotation and movement
  • Projection Switching - Toggle between perspective and orthographic projections
  • Adjustable Time Speed - Control the speed of the day/night cycle
  • Water Transparency - Toggle water transparency for better visibility

Technologies Used

  • OpenGL 3.3 - Core profile rendering
  • C++ - Programming language
  • GLFW 3.3.8 - Window and input handling
  • GLEW 2.2.0 - OpenGL extension loading
  • GLM 0.9.9.800 - Mathematics library for graphics
  • Assimp 3.0.0 - 3D model loading (OBJ files)
  • stb_image - Image loading for textures
  • Visual Studio 2019/2022 - Development environment

Building the Project

Prerequisites

  • Windows 10 or later
  • Visual Studio 2019 or later with C++ support
  • Graphics card with OpenGL 3.3 support

Build Steps

  1. Open the Solution

    • Open Sablon/Sablon.sln in Visual Studio
  2. Restore NuGet Packages

    • Right-click on the solution in Solution Explorer
    • Select "Restore NuGet Packages"
    • Wait for packages to download (GLFW, GLEW, GLM, Assimp)
  3. Build the Project

    • Select configuration: Debug or Release
    • Select platform: x64
    • Build → Build Solution (or press Ctrl+Shift+B)
  4. Run the Application

    • Press F5 to run in debug mode
    • Or navigate to Sablon/x64/Debug/ and run Sablon.exe

Note

Ensure that all resource files in the res/ folder are present and that the executable runs from the Sablon/ directory (where shader files are located).

Controls

Camera Movement

  • W / S - Move camera up / down
  • A / D - Move camera left / right
  • Arrow Keys - Rotate camera view
    • ↑ / ↓ - Pitch (look up/down)
    • ← / → - Yaw (look left/right)

Projection Modes

  • P - Switch to Perspective projection
  • O - Switch to Orthographic projection

Rendering Options

  • 1 - Enable depth testing
  • 2 - Disable depth testing
  • 3 - Enable face culling
  • 4 - Disable face culling
  • B - Toggle water transparency

Time Control

  • + - Increase time speed
  • - - Decrease time speed

Mouse Interaction

  • Left Click on Fire - Trigger airplane appearance and smoke effects
  • Left Click on Water - Create expanding ripple effect at click location and all sharks will swim to the clicked location

Other

  • ESC - Exit application

Author

Duško Pilipović

Project created for Computer Graphics course, 7th Semester.

License

This project is created for educational purposes.

About

A 3D graphics project created with OpenGL, featuring an interactive island scene with dynamic lighting, weather effects, and various 3D objects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors