Skip to content

Latest commit

 

History

History
77 lines (58 loc) · 1.93 KB

readme.md

File metadata and controls

77 lines (58 loc) · 1.93 KB

3d rendering from scratch

Amelichev Konstantin, with Dmitry Trushin mentorship, CS HSE

Components

  • World
  • Camera
  • Screen
  • Objects
  • Renderer

What it can do:

  • Load .off-object as 3d object
  • Decompose objects into triangles
  • Perform projective transformation
  • Rotate, translate camera
  • Apply diffusal lighting

Demo app

Camera rotations: WASD + QE Camera translations: arrows + ZX Move objects: IJKL + UO.

There is also a test first-person "game" with mouse-controlled camera and walking using arrows.

Have a look:

First-person "game"

Output sample

Mesh viewer

Output sample

Different .off-models

Output sample Output sample Output sample Output sample

Build (Linux):

                # this is optional as done in github actions 
                # apt-get -y install \
                #            cxxtest \
                #            libsfml-dev
                 git clone --recurse-submodules git@github.com:kik0s/3d-framework.git
                 cd 3d-framework
                 mkdir build && cd build
                 cmake ..
                 make
                 ./3d-drawer

Also probably these packages should be installed:

  • freetype
  • x11
  • xrandr
  • udev
  • opengl
  • flac
  • ogg
  • vorbis
  • vorbisenc
  • vorbisfile
  • openal
  • pthread

Если что-то не работает, есть смысл свериться с Dockerfile.