GithubHelp home page GithubHelp logo

santipaprika / gtr_framework Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jagenjo/gtr_framework

0.0 0.0 1.0 228.14 MB

OpenGL C++ Framework for the realtime rendering course

License: MIT License

C++ 36.04% C 63.82% Objective-C 0.13% Rich Text Format 0.01%

gtr_framework's Introduction

Real Time Realistic Renderer

Main Concept

This program renders a scene in real time built in the context of a final project for the UPF course "Real-Time Graphics", held by Javi Agenjo. The following features have been implemented (most of them can be tuned through the visual debugging interface):

Rendering Pipelines

  • Forward
  • Deferred

Deferred illumination optimization

  • Compute light only on projected points contained inside the light area of effect.

Dynamic lights

  • For Point, Spot and Directional lights.
  • Color, Intensity, etc.

Dynamic Shadows

  • Real-Time shadowmaps.
  • Working for Spot and Directional lights, and partially working for Point Lights.

Light Dependant Materials

  • Phong
  • PBR

Screen Space Ambient Occlusion

  • SSAO texture
  • Blur SSAO texture
  • Blur parameters (ImGUI): Kernel size (0 = no blur), number of blurs to apply.
  • Other parameters (ImGUI): Use hemisphere aligned to normal (SSAO+), number of points generated in the sphere, radius of the sphere.

Irradiance:

  • Irradiance weight (ImGUI parameter).
  • Irradiance probes (visible via ImGUI).
  • Coefficient texture (visible via ImGUI).
  • Irradiance ignored at points outside the probes grid.
  • Irradiance recomputation “in-game” (ImGUI button).
  • Probe normal distance (ImGUI parameter): distance to add in the normal direction before choosing the closest probe (each unit will choose the next probe).
  • Probe interpolation (toggled via ImGUI).
  • Write / Read probes coefficients from disk: If there is an existing “irradiance.bin” file in the root project directory, the spherical coefficients for each probe will be loaded from it (on start). Otherwise, a new “irradiance.bin” file will be created at the same root directory. When the “regenerate irradiance” button is pressed, a new coefficients file is generated overwriting the previous one, so it is recommended to delete the “irradiance.bin” file if it has been recomputed in-game with a modified scene.

Volumetric light

  • Working for directional and spotlights.
  • Jittering: non-uniform start of rays using noise (to avoid banding) by reading to a 2D texture.
  • Undersampling: we store the light shafts in a lower texture.
  • Apply blur to the volumetric texture.
  • Parameters (ImGUI): quality (number of steps of the raymarching algorithm), air density (contribution in alpha at each step), and distance of field (how far the sample of the ray takes to goes completely opaque).

Tone Mapper

  • Param (ImGUI): gamma value, luminance intensity, tone mapper scale, and the average luminance of the frame.

Decals

  • Both the color and material textures of the decal being used can be found in the textures folder.
  • Material texture: [occlusion, roughness, metalness].

Reflection

  • Reflection probes (ImGUI parameter)
  • Probe normal distance (ImGUI parameter): distance to add in the normal direction before choosing the closest probe.

Any material physical behavior (roughness and metalness) can be modified via ImGUI inside each specific node.

Software Engine

This program has been developed using the framework provided by Javi Agenjo (in C++, and using shaders via OpenGL) and with his assistance.

Demo video

IMAGE ALT TEXT HERE

Contributions

Software Developers: Santi Paprika, Víctor Ubieto
Framework developer: Javi Agenjo (UPF teacher)
Assistance: Javi Agenjo (UPF teacher)
Maps: Renafox - Sketchfab

gtr_framework's People

Contributors

santipaprika avatar jagenjo avatar victorubieto avatar

Forkers

victorubieto

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.