GithubHelp home page GithubHelp logo

jacob-pro / computer-graphics Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 3.3 MB

Bristol COMS30020 - Computer graphics, 3D Rendering

CMake 0.57% Shell 0.05% C++ 99.36% C 0.02%
sdl2 rendering cpp17 3d-graphics undergraduate

computer-graphics's Introduction

Computer Graphics

Bristol COMS30020_2020 Computer Graphics (Y3), Coursework option

Confirmed mark: 72

Usage

Run with arg --animation to render and save the video frames (see animation.sh)

Otherwise launches a keyboard controllable window: Use args 0-5 to choose which model to load (Textured, Cornell, Soft shadow, Hackspace, Sphere, Mirror)

Features

  • OBJ geometry file loading

  • OBJ material file loading

  • Wireframe rendering

  • Triangle rasterising

  • Perspective corrected texture mapping for rasteriser

  • Keyboard control of camera position

  • Changing camera orientation (using orientation matrix)

  • Camera LookAt

  • Diffuse lighting (proximity and angle-of-incidence)

  • Specular lighting

  • Hard Shadow with Ambient lighting

  • Gouraud shading

  • Phong Shading

  • Soft shadows

  • Reflective Materials - A Mirror

Building on Windows

git clone https://github.com/microsoft/vcpkg
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\bootstrap-vcpkg.bat
.\vcpkg\vcpkg install sdl2:x64-windows

Set -DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake

Ensure working directory is set so the obj/mtl files can be found.

Building on MVB Centos7

C17

This project depends on C++17. However I later realised MVB machines do not support C++17

The ./mvb.sh script can be used to download and compile GCC 10 (without root) and then run this project

computer-graphics's People

Contributors

jacob-pro avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.