GithubHelp home page GithubHelp logo

ashiningray / cgfinal-a_calm_neighborhood Goto Github PK

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

A simple project that worked as the last practical exam of my Computer Graphics course.

License: GNU General Public License v3.0

C++ 79.62% GLSL 20.38%

cgfinal-a_calm_neighborhood's Introduction

In-Engine Screenshot

CGFinal-A_Calm_Neighborhood

A simple project that worked as the last practical exam of my Computer Graphics course where it was required that a project contained at least the principles of OpenGL's graphics rendering pipeline, which are comprised of:

  • Lighting (in its static form, shadows not required),
  • Shading (gouraud or phong, implemented in shaders)
  • Texturing
  • Camera (to look around the environment)

I decided to go the extra mile and also implemented multiple light types, moving lights, a skybox, a ton of static lights, vertex shaders that allow the renderer to manipulate a gigantic amount of grass blades and tree leaves without tanking performance and also implemented a lighting model closer to PBR through shaders that support specular, height, emission and normal maps besides the default diffuse texture. (maybe a few other things, but i can't remember).

I'm sure a lot of optimizations could be done to make it render much faster, but this project was a sole effort and had around one month of development time so compromises had to be made.

So, how does one compile such a project?

Since this is the windows branch, a lot of dependencies are already in the repository, including the dlls for less hassle... and also because i started using linux as my main OS long before i decided to put this project here, so it would take a long time to redo everything on windows and check for incompatibilities. Due to that, while it's "easier" to compile it on windows, i can guarantee it'll work

Basically, you will need the following extra dependencies to compile it:

  • Code::Blocks IDE, since it's the one i used to set up the project.
  • TDM-GCC or Code::Blocks internal GCC compiler
  • A graphics card with support for OpenGL4.3 and at least 256MB of VRAM.

While the GL 4.3 requirement is a bit high for such a project, you can set the version as low as 3.3 in the main.cpp file and not face any major problems.

Having all of those in hand, you just need to load up the project in the IDE on your windows installation, link glfw3 and libassimp by right-clicking the "CG-Final" project in the left side dropdown, going to "Build options->Linker settings" andd adding them in the "link libraries menu" if needed, compile it (hopefully shouldn't bring up any problems since i'm unable to fix them now and it's been a while since i even opened this version of the project), and it will give you a .exe in Compiled/bin/Release. Note that it will be alogside a libassimp.dll, so get those 2 files and paste them in the root of the project, alongisde the project's .cbp and it should execute fine. There's a cmd window besides the main render one in case you get no 3D graphics, so you can look for info there. You can also Compile and Run it right from the Code::Blocks window.

After having the project running, there's some ways to control it

It will capture your mouse by default, but you can alt+tab to remove it's focus. The following keys are used by the camera:

  • WASD -> Movement
  • Shift -> Move faster
  • Ctrl -> "Crouch" (basically, move slower, i was trying to make a mini game at the start)
  • Esc -> Exit

cgfinal-a_calm_neighborhood's People

Contributors

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