|
GPU Framework & Rendering Engine Version 14.0.0.0 Release
This page provides a quick review of the GPU Framework & Rendering Engine tool. Version 14.0.0.0 has a number of new and exciting features including in both core architecture & rendering components.Works with modern NVidia GPUs & their latest CUDA & OpenGL drivers:
Version 14.0.0.0 Release core architecture additions:
- C++14/17 ISO standard STL-based framework with multi-platform support (Windows/Linux)
- CUDA 10.0+/NVCC component built-in with multi-platform support (Windows/Linux)
- GoogleTest 1.8+ verification framework with multi-platform support (Windows/Linux)
- Doxygen 1.8+ with LaTeX pdf support in-source documentation creation for scientific equations
- CMake 3.15+ build system automation with multi-platform support & GUI tool (Windows/Linux)
- HG/Mercurial 5.0+ repository with multi-platform support & GUI tool (Windows/Linux)
Version 14.0.0.0 Release core architecture descriptions:
- GPU Framework Short Presentation here
- GPU Framework C&C++ Language Syntax here
- GPU Framework Version 14.0 CMake Build System Diagram here
Version 14.0.0.0 Release rendering additions:
- Fast Single-Pass Order-Independent-Transparency (O-I-T) rendering methods using OpenGL 4.6: A-Buffer3D & LinkedLists with dynamic data structure size allocation
- Fast Single-Pass Deferred Shading using OpenGL 4.6 GPU-side data structures with data packing
- Fast Fresnel term (Schlick's approximation), Transparency & Translucency effects using O-I-T
- Saving screenshots and O-I-T A-Buffer3D slices information in image slices stacks
- Fast Single-Pass Particles rendering engine using OpenGL 3.3 & OpenGL 4.6 (Simple & Raytraced Impostors, tessellated LOD geometry modes)
- Impostor models include Spheres and Cylinders raytraced in double-precision with OpenGL 4.6. Impostor-based wireframe rendering mode also added
- Fast Model Loader mechanism which caches read data into binary form
- Fast Single-Pass Merged G-Buffer effects using OpenGL 3.3: Depth-Of-Field, Edge Enhancement, Hemispherical Screen-Space Ambient Occlusion (HSSAO) Plus with Weighted Sharpness Filter
- Fast procedural quad texture creation through dummy VAOs and vertex shader usage using OpenGL 3.3
- Fast BiCubic Texture Filtering
- Fast Jitter Environment Mapping used as material in 3D objects
- Fast Programmable Cube Capping using the Stencil Buffer
- Fast FXAA antialias effect
GPU Framework & Rendering Engine Version 14.0 pictures:
Version 7.0.0.0 Release additions:
- A modern GLSL shader loader library with forward compatibility & adaptivity to multiple GL versions, separate compilation & linking of external and embedded/encrypted GLSL shader text files
- 5 lighting models: Phong, Blinn-Phong, Gaussian, Toon, Gooch (more details below)
- Geometry shaders for optional triangle explosion/normal rendering (more details below)
- Tessellation shaders for crack-free manual & automatic (view dependent) Level-Of-Detail (LOD) utilizing the PNTriangles & PhongTessellation algorithms (more details below)
- Motion Blur utilizing the Accumulation Buffer
- Outline rendering utilizing the Stencil Buffer
- Texturing & Spherical Mapping with optional emboss texture filtering on the 3D objects.
- Environment mapping support utilizing the FrameBufferObject (FBO)
- Fog support, also available through the GLSL lighting shaders
- Profiling and testing all shader lighting modes against a fixed-pipeline implementation for head-to-head visual & performance comparisons
- VRAM/GPU caching using Immediate Mode, VAs, DisplayLists & VBOs with usage reporting
- Forward-compatible OpenGL/GLSL autodetecting & utilizing OpenGL versions 2.1, 3.3, & 4.5 with respective autodetection and adaptive GLSL code for versions 120, 330 & 450
- Utilizing the DevIL (formerly known as OpenIL) Image Library for image/texture loading
- Utilizing the Open Asset Import Library (assimp) 3D model loader library, with support for 40+ 3D model file formats
- Utilizing STL & Boost for current & future C++11-compatible codebase
- Stanford & GNU LGPL 3D models collection available here & here
GPU Framework & Rendering Engine Version 7.0 pictures:
Command-line usage details:
GPUFrameworkMain.exe -model ModelFileName.ModelFileType
Alternatively, it can load a set of 3D models stated in the ModelLoaderDescriptor.tsr text file with this command:
GPUFrameworkMain.exe -useModelLoaderDescriptor
Run the various tests:
GPUFrameworkMain.exe -test 7 (1 up to 7, default is 3, 7 is O-I-T tests)
Full description of console-based commands with:
GPUFrameworkMain.exe -h
If you experience any problems with running this tool please contact: thanos.theo@dotredconsultancy.com.
GPU Framework & Renderering Engine For Windows
All the relevant rendering options are shown with the onscreen text.
Below is a quick guide:
VRAM Caching Scenarios Testing keys:
F1 -> No caching Method 1 (separate glVertex/glNormal/glTexCoord calls per data point)
F2 -> No caching Method 2 (using arrays for glVertex/glNormal/glTexCoord calls in vectors of 3)
F3 -> Vertex Arrays Caching
F4 -> Display Lists Caching
F5 -> VBOs Caching
Lighting/Shading Models Testing keys:
1 -> Gouraud Lighting/Shading Model (photo-realistic, Fixed Pipeline, Gouraud's PhD thesis @ en.wikipedia.org/wiki/Gouraud_shading)
2 -> Phong Lighting/Shading Model (photo-realistic, Programmable Pipeline GLSL based, Phong's PhD thesis @ en.wikipedia.org/wiki/Phong_reflection_model)
3 -> Blinn-Phong Lighting/Shading Model (photo-realistic, Programmable Pipeline GLSL based, @ en.wikipedia.org/wiki/Blinn%E2%80%93Phong_shading_model)
4 -> Gaussian Lighting/Shading Model (photo-realistic, Programmable Pipeline GLSL based, @ en.wikipedia.org/wiki/Specular_highlight#Gaussian_distribution)
5 -> Toon Lighting/Shading Model (non photo-realistic, Programmable Pipeline GLSL based, @ en.wikipedia.org/wiki/Cel_shading)
6 -> Gooch Lighting/Shading Model (non photo-realistic, Programmable Pipeline GLSL based, Gooch's PhD / Siggraph 1998 paper @ www.cs.northwestern.edu/~ago820/SIG98/abstract.html)
Extra Lighting Model Options Control keys:
'L' -> Toggle Directional / Positional Lights for all Lighting Models (OpenGL Programming Guide aka 'The Red Book' Chapter 5 Lighting @ www.glprogramming.com/red/chapter05.html)
'D' -> Toggle Oren Nayar Diffuse Model for all Programmable Lighting Models (Siggraph 1994 paper @ en.wikipedia.org/wiki/Oren%E2%80%93Nayar_reflectance_model)
Motion Blur Testing keys:
F6 -> Toggle On/Off, press '[' & ']' keys for Motion Blur size.
Geometry Shader (GS) Performance Testing keys:
F7 -> No GS Use (GS step skipped).
F8 -> Pass-Thru GS with triangle 'explosion' animation to show geometry displacement done in real-time. 1x geometry passed to fragment shaders & being rendered.
F9 -> Creation of new geometry (the geometry's normals) when wireframe mode is turned on. 2x geometry passed to fragment shaders & being rendered.
Tessellation Shaders (TCS& TES) Performance Testing keys, press 'space' for autoLOD & 'n', 'm' for tessellation levels, '7', '8' for tessellation alpha, '9', '0' for PNTriangles (/alex.vlachos.com/graphics/CurvedPNTriangles.pdf) & PhongTessellation (perso.telecom-paristech.fr/~boubek/papers/PhongTessellation/) algorithms:
F10 -> No GS Use (GS step skipped).
F11 -> Pass-Thru GS with triangle 'explosion' animation to show geometry displacement done in real-time. 1x geometry passed to fragment shaders & being rendered.
F12 -> Creation of new geometry (the geometry's normals) when wireframe mode is turned on. 2x geometry passed to fragment shaders & being rendered.
Extra Rendering Techniques keys:
'T' -> Toggle Texturing (performed through the GLSL shaders for the Programmable Pipeline)
'S' -> Toggle Spherical Mapping (performed through the GLSL shaders for the Programmable Pipeline, @ en.wikipedia.org/wiki/Reflection_mapping#Sphere_mapping)
'E' -> Toggle Environment Mapping (performed through the GLSL shaders for the Programmable Pipeline, dual-pass rendering algorithm with an FBO, @ en.wikipedia.org/wiki/Reflection_mapping)
'J' -> Toggle Outline (performed through the GLSL shaders for the Programmable Pipeline, dual-pass rendering algorithm with an Stencil Buffer FBO, @ www.songho.ca/opengl/gl_fbo.html)
'K' -> Toggle High-Quality Outline (performed through the GLSL shaders for the Programmable Pipeline, dual-pass rendering algorithm with an Stencil Buffer FBO with 2x resolution, @ www.songho.ca/opengl/gl_fbo.html)
Control keys:
'F' -> Toggle Fog (fixed & programmable pipeline support)
'Q' -> Toggle BackFace Culling
'G' -> Toggle Gouraud/Flat shading (Fixed Pipeline only)
'C' -> Toggle Colored Objects
'B' -> Toggle White/Black background
'W' -> Toggle Wireframe mode
'A' -> Toggle Autorotate
'R' -> Toggle Reset Camera
'V' -> Toggle VSynch (make sure to have it off for profiling)
'U' -> Toggle UI information (thus not occluding the 3D view)
'Insert' -> Toggle FXAA Antialias
'Shift' -> Take Screenshot
ESC -> Exit the program
Some Technical & CodeBase Background Details for the OpenGL/GLSL Rendering Engine:
1. The code is using modern C++ OOP with the Singleton, Template & Factory Design Patterns. The test structure is using the TestInterface as a base class (is upcasted to it with the Factory Design pattern) which any test can use to get access to latest GL extensions, windowing system, mouse & keyboard for the testing of rendering algorithms.
2. The C++ code is also using Boost for C++11-style threading (mutexes & thread barriers used), unordered (hash) maps and the so much needed foreach loop for iterations.
3. The shader loading libraries are backwards-compatible with GL 2.1 (GLSL 120) and can go up to GL 4.6 & GLSL 460. This means that the shader codebase is adapted to the running GPU & compiled to be compatible with any GLSL version 120 onwards. Heavy use of the GL extension mechanisms is used along with the GLSL pre-processor in order to achieve this. Supports for Vertex, Fragment, Geometry, Tessellation Control, Tessellation Evaluation & Compute shaders (VS, FS, GS, TCS, TES & CS), thus a fully programmable GL pipeline.
4. The GLSL shader codebase itself is split into multiple directories with the idea of having a common reusable code pool of GLSL code in one place and the actual code usage (the void main() function & auxiliary ones) in another. This is using the GL specs for compiling code in stages (in multiple separate objects) and linking them at the end as one program object. Critical GLSL compilation warnings and errors are passed to the console for further inspection from the GLSL programmer.
5. The GLSL shader codebase is stored in simple text files for easy access & editing. It can reside on the compiled executable's directory, thus avoiding costly CPU-side recompilations & initializations while developing the GLSL codebase. In this case, the shader libraries are opening and loading the GLSL code just before actual compilation. For production code, the GLSL codebase can be passed as optionally encrypted strings internally from associated header files to minimize loading times and (even more critical) to protect valuable IP as they are stored in binary format.
6. Up to 8 real-time dynamic scene lights are used for the loaded 3D model. The GLSL Programmable Pipeline can handle N lights while the Fixed Pipeline can go up to 8 (or any other GL fixed pipeline hardware dependent value).
7. The 3D model loader process is storing all vertex/normal/color data in STL/Boost dynamic data structures (maps & vectors). As such, it can distinguish between different type of GL primitives (Points, Lines, Triangles, Quads, Polygons of N points), sort and store them based on their number of points keys. The VAs/VBOs are then created & stored in a similar fashion. The final rendering consists of multiple VAs/VBOs mixed together per-type and rendered in one go. All the data can be saved to a local binary format for caching loading times.
8. An image loading & saving library is used to load an image file and then use GL commands to create a texture object on the 1st texture unit (GL_TEXTURE0) and send the data to be used from GLSL within the shaders.
9. A fully featured FrameBuffer Object (FBO) class with support for offscreen texturing, antialias, shadow maps, depth render & stencil buffers is also available. This also comes with full GL debugging & error message capturing facilities, all according to the latest GL specs for FBOs. It is put into use with the Environment Mapping, Outline & High-Quality Outline dual-pass techniques. The High-Quality Outline is using an FBO 2x the current scene resolution (4x the GPU fill-rate expense) so as to calculate a higher-quality outline for the rendered object.
External (Open Source with BSD/LGPL licences) libraries used:
1. glew version 2.1 (The OpenGL Extension Wrangler Library @ glew.sourceforge.net)
2. freeglut version 3.0.0 (Free GL Utilities @ freeglut.sourceforge.net)
3. assimp version 3.0.1270 (Open Asset Import Library @ assimp.sourceforge.net)
4. DevIL 1.8 (Dev Image Library @ openil.sourceforge.net)
5. Boost 1.53.0 (for C++11 features @ www.boost.org, removed in version 9.0 onwards)
|