Code Monkey home page Code Monkey logo

opengl_3d_scene's Introduction

Overview

This is a 3D recreation of a 2D picture of a teacup and an orange on a wooden table. The rendering was generated using C++ and the OpenGL library API. The user can navigate the scene with intuitive mouse and keyboard controls.

Depth of Project

The project explores linear algebra, model transformations, complex texturing, lighting with the Phong model, and input devices for navigation.

Programmatic and mathematical techniques are used to generate primitive shapes such as a sphere, cube, plane, and cylinder in order to recreate the original photograph's objects.

YouTube Link to Project Demo

https://www.youtube.com/watch?v=_Ou3yA71gnU

Sreenshots

Front: Left: Left: Back: Right: Top Left:

Tools Used

  1. C++ - an object-oriented and lower-level programming language. For more information about this language, visit https://www.cplusplus.com/
  2. OpenGL - a widely popular graphics API used for many industries and applications. The C++ OpenGL libraries GLEW and GLFW are used in this project. For more information about OpenGL, visit https://www.khronos.org/opengl/
  3. OpenGL Mathematics (GLM) - a header-only library that allows linear algebraic calculations to be performed for graphics processing. Such calculations include model transformations by multiplying vectors and matrices. For more information on GLM, please visit https://github.com/g-truc/glm
  4. stb_image.h - a header-only library for loading images of various file-types. This library is available at https://github.com/nothings/stb

Scene Navigation

Keyboard:

W, A, S, D - moves camera forward, left, back, right
Q, E - moves camera up and down
P - changes scene between orthographic and perspective projection matrices

Mouse:

Cursor - adjusts camera pitch and yaw
Scroll - adjusts speed of camera movement

opengl_3d_scene's People

Contributors

gaut2172 avatar

Stargazers

 avatar  avatar  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.