Skip to content

Latest commit

 

History

History
111 lines (92 loc) · 3.96 KB

README.md

File metadata and controls

111 lines (92 loc) · 3.96 KB

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.

Crafted upon the foundation of Debian 12 bookworm, the steadfast and unyielding, using the scriptures of CMake.

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 Scripts of Luminescence

  • Constant: The foundational beacon, it emanates unwavering light, gracing every form with steadfast illumination.
  • Lambert: Echoing the wisdom of yore, it scatters diffuse reflections with equanimity, painting every crevice and crest with its gentle touch.
  • Phong: Renowned as the luminary elite, it ushers in a dance of specular reflections, lending a glint reminiscent of stars.
  • Blinn-Phong: An evolved descendant of Phong, it merges the essence of view and light, casting reflections that dazzle with a sophistication only matched by its predecessors.

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, known in revered circles as wortelus, keeper of the chronicles.

The digital temple - wortelus.eu