Giter Site home page Giter Site logo

jcfgonc / cg-shadow-project Goto Github PK

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

The OpenGL project I did for the Computer Graphics course back in 2007. Uses the fixed pipeline.

License: MIT License

SWIG 0.01% Shell 0.03% C++ 4.81% C 95.15%
catmull-rom-spline depth-buffer fbo opengl shadow-mapping wavefront-obj

cg-shadow-project's Introduction

Shadow Mapping Engine

OpenGL Computer Graphics project I developed back in 2007 for the corresponding course at DEI/University of Coimbra. Got a score of 96/100.

couple of screenshots

This project was written in C/C++ and is a simple 3D engine. The main focus was providing a base engine with shadow mapping, multi-texturing, transparency support, Wavefront 3D object loading, multiple viewports, and "first-person-shooter" controls for further work. The work supports cubic interpolation (Catmull-Rom spline) that is used for controlling the path and direction of both cameras and of the lights composing the scene. The shadow mapping algorithm is done using the fixed-pipeline with a three pass rendering, where the first pass creates the depth buffer from the light view, and both the second and third passes render the scene with the objects either in the shadow or lit. In order to show detailed shadows the engine renders the first pass in a Frame Buffer Object and then uses the depth texture in the following passes.

You can do whatever you want with this code. Just give proper credit.

Controls

Press space to enable/disable automatic camera. Keys AWSD and arrows for movement, Q/E for rolling, Page Up/Down for moving up/down, C to debug camera position and ESC to quit. Alt+Enter toggles full-screen mode.

Future work

  • Convert C'eish code to proper C++ and improve memory management (I suspect there may be some memory leaks somewhere)
  • Abandon old deprecated GLee and move to a better OpenGL extension loading library
  • Reduce the shadow algorithm to two passes
  • Use cube mapping to produce shadows for the entire scene
  • Use a more extensive 3D model loading library
  • Change code so that it uses the programmable pipeline instead of the fixed one

Dependencies

Back then I got a GLM version that makes use of the DevIL library to load textures in other file formats. I don't remember where I got it and I could not find it on the internet. That "rare" version is included in this project.

Credits

Contact

João Carlos Ferreira Gonçalves [email protected] OR [email protected]

cg-shadow-project's People

Contributors

jcfgonc avatar

Stargazers

 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.