Skip to content

wortelus/opengl-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZPG

In the days of academic endeavors, a project was conceived under the esteemed halls of the Faculty of Computer Science at VSB - Technical University of Ostrava. This undertaking was a testament for the course Principles of Computer Graphics.

"Let there be a 3D realm," it was decreed, and thus, using the sacred tools of OpenGL and GLSL, a scene was birthed.

Current state

  • Camera
  • Transformations
  • Chaining transformations matrices (Scene graph)
  • Movement & Gravity
  • Lighting - ambient, diffuse, specular components, attenuation
  • Point lights, directional lights and spotlights
  • Dynamic shader loading
  • Dynamic model loading
  • Materials, textures
  • Global illumination, constant, Phong, Blinn-Phong point lights
  • Multiple scenes
  • Animations
  • Bézier curve, Bézier chain, Linear animations with different modes
  • Object selection, deletion, creation in runtime

Scenes

  • Phong shader test
  • Solar system with planets and moons
  • Forest with trees and grass

  • Phong creep specular test
  • Directional and spotlight test

Sacred GLSL Scripts of Luminescence

  • Constant
  • Lambert
  • Phong
  • Blinn-Phong

Building the Shrine

  1. Invoking the Oracle, CMake

With reverence and a dash of bravado, navigate thy terminal to the root temple (directory) of "zpg". Then chant the incantation:

mkdir build
cd build
cmake ..
  1. Summoning the Constructor, Make

With the prophecies of CMake now revealed, call forth the ancient builder:

make

Behold, as "Make", the grand architect, brings "zpg" to life, forging executables from the ethereal realm of source code.

  1. Rejoice and Run

With the rites completed, the executable artifact is now amongst us. Run it, and bask in the glory of your creation. For it is the digital alchemy, turning lines of text into a mosaic of pixels and logic, painting stories in real-time.

Controls

Camera

  • Wander with W/A/S/D.
  • Ascend with the gift of Space.

Global transformations

  • arrows to translate
  • E/F for spin along the X-axis
  • R/G for rotation along the Y-axis
  • T/H for rotation along the Z-axis
  • Z/X for scaling

Scene selection

  • F2 for the next scene

Interaction modes

  • N for the tree plantation mode (default)
  • B for the Bézier curve positioning mode

Tablets of Future Endeavors

  • Observer on transformations is currently not used. We call globally directly in scene all transformation operations (no notify).
  • After update on U_LIGHTS, all lights are updated, not only the one that was changed. This work is WIP.
  • and more in-code TODO's

The Sacred Relics

Seek the Scribe

Daniel Slavík, keeper of the chronicles.

The digital temple - wortelus.eu