Forward, Deferred and Raytracing rendering in openFrameworks and web

Currently, there are three basic approaches for rendering computer graphics scenes:
forward rendering,
deferred rendering,
raytracing.

1. Forward rendering
It's that OpenGL does, you create vertices, then make faces, and rasterize them, all passing via shaders.
The rendering process is straightworward and fast, but rendering shadows, making degree-of-field effect and drawing clouds is hard here.

Most of openFrameworks examples use forward rendering.


2. Deferred rendering
It's the same as forward rendering, but additionally some extra data is rendered for computing shadows. The lighting pass is performed after the scene geometry is drawn.
Shadows, degree-of-field effect and some kind of reflections are possible with deferred rendering.

Unreal Engine 4 and Unity currently (2019) are based on deferred rendering.

openFrameworks:https://github.com/perevalovds/ofxDeferredShading (my fork from nenama-gatsuoallows)

Web: nunuStudio, see its list of render pass effects here.

Physical-based rendering is a light calculation method, based on modelling of physical light reflection properties. See theory here: https://learnopengl.com/PBR/Lighting.
It can be used in all types of rendering (forward, deferred, raytracing).

openFrameworks: ofxPBR addon (my fork from yasuhirohoshino) allows to render objects with metallic (reflection) and roughness properties, and apply shadows, see image below:
PBR materials:
free: https://cc0textures.com/
paid: https://www.textures.com/browse/pbr-materials/114558



3. Raytracing

Raytracing/raycasting/raymarching are based on the different paradigm. The scan the scene by rays and compute pixel color using information about density (clouds), reflections (mirrors) and other things. This is most "natural" way to visualize scene, but also most resouce-consuming.

Modern video cards (RTX) support real time raytracing, but it's not spreaded widely yet (2019).




Comments

Popular posts from this blog

Computing ray origin and direction from Model View Projection matrices for raymarching

Forward and backward alpha blending for raymarching