- Target Platforms
- Windows XP
- Windows Vista
- Windows 7
- Windows 8.X
- Windows 10
- Hardware Acceleration
- Hardware accelerated via OpenGL
- Based on OpenGL 3.2 core profile (programmable pipeline/shaders) using the
new OpenGL core context (without forward-compatible flag as recommended)
- Using OpenGL extensions to access features from OpenGL 4.3.
Available extensions and features are detected before the application starts and presented in a WinAPI dialog including meaningful failure informations
- Developer mode: using new OpenGL debug context for extended warning/error logging
- Using the OpenGL Shading Language (GLSL) version 1.50.11 core
- Supporting all display resolutions and frequencys (Hz)
- Autodetection of current display frequency for prefiltering the selection list
- Aspect ratio in selection list makes it easier to pick unstretched resolutions
- Double buffering
- Renderer
- Hybrid forward/deferred renderer:
- Combines forward rendering with deferred rendering techniques
- Goal: unified rendering pipeline for opaque and transparent objects (less shaders)
rather than handling as much as possible light sources per frame
- Cutting edge G-Buffer/MRT based rendering effects
- Multi-pass scene rendering:
- Collect and render visible reflection (cube) maps. For each reflection:
- Collect visible objects and lights
- For each light, render only depth values into shadow (cube) map(s):
- Collect visible shadow casting objects
- Render opaque objects, sorted front to back
- Render special objects, sorted front to back
- Render into the G-Buffer, filling two FBO attachments:
- RGBA texture storing [encoded normal, normalized eye space z]
- R32F texture storing [raw eye space z]
- Render opaque objects, sorted front to back
- Render transparent objects, sorted back to front
- Render special objects, sorted front to back
- Generate the SSAO buffer using data from the G-Buffer
- Render opaque objects (*), sorted front to back (without reflections)
- Render transparent objects (*), sorted back to front (without reflections)
- Render special objects (*), sorted front to back (without reflections)
- Collect visible objects and lights
- For each light, render only depth values into shadow (cube) map(s):
- Collect visible shadow casting objects
- Render opaque objects, sorted front to back
- Render special objects, sorted front to back
- Render into the G-Buffer, filling two FBO attachments:
- RGBA texture storing [encoded normal, normalized eye space z]
- R32F texture storing [raw eye space z]
- Render opaque objects, sorted front to back
- Render transparent objects, sorted back to front
- Render special objects, sorted front to back
- Generate the SSAO buffer using data from the G-Buffer
- Render opaque objects (*), sorted front to back
- Render transparent objects (*), sorted back to front
- Render special objects (*), sorted front to back
- Apply DOF (Depth Of Field)
- Apply FXAA 3.11
- (*) Multi-pass object rendering:
- If no light was collected, add a global ambient light. Otherwise the first
collected light will include global ambient lighting
- If the object has an own render handler assigned (a particle system for instance),
execute the handler, passing informations about current pass (G-Buffer/shadow)
- If requested, render object as wireframe
- If object casts volumetric light:
- Render front faces to a utility color buffer
- Render back faces to main color buffer with volumetric lighting shader
- Otherwise render object as follows. For each material:
- If material is tagged to keep the current shader, render with current active shader
- If material requests a material pass, render object without any lighting using
its material-only shader (for instance a dispersion shader where some "lighting" already comes from a reflection map)
- If material requests a lighting pass, then for each light:
- Bind the shadow (cube) map of the light
- Select the proper lighting shader for the given material and light type
- Render object with selected lighting shader. First light is rendered with
BlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)
and the following lights with
BlendFunc(GL_SRC_ALPHA, GL_ONE)
which produces the same result as if rendering all lights in one shot. Every time a fragment color is written which includes specular light, luminance of the specular part is stored in the 2nd color attachment
- Render targets
- Framebuffer objects (FBO) with multisampling (MSAA) and mipmapping support
- Packed depth-stencil FBO texture attachments (shared buffer for depth and stencil values)
- Support for non-power-of-two (NPOT) FBO dimensions
- FBOs connected to cube map sides
- Multiple render targets (MRT)/color attachments per FBO
- Shader Manager
- Shaders are loaded from files
- Support for '#include' statements to include common shader code from other files,
greatly reducing the amount of code and thus increasing maintainability
- Validation errors and warnings are presented in a WinAPI dialog
- Runtime insertion of '#define' statements to generated different versions of a shader
(e.g. a multisampled and a non-multisampled version)
- Central shader collection class. C++ macro based registration of shaders
in the collection class as engine core shaders
- Inheritable C++ shader program front-ends, making it easy to:
- Quickly define new uniforms, not part of the engine's core uniform list
- Inherit and define new shader logic on C++ side
- Smart uniform uploading to minimize uniform uploads (e.g. for ModelViewMatrix and
other global uniforms)
- Lighting / Shadowing
- Multi-pass phong shading (per-pixel/per-fragment lighting) with
SSAO and shadow factors integrated into the lighting formulas
- The SSAO shader is sampling inside normal-oriented hemispheres to
approximate the amount of ambient occlusion
- Light types:
- Omni light
- Directional light
- Spot light
- Rectangular spot light
- Global ambient light (with ambient cube map for normal mapping)
- Volumetric lights (see "Special Effects")
- Emission maps (emissive textures)
- Lighting parameters:
- Vertex normals (optionally smoothed)
- Material properties (ambient, diffuse, specular, specular shininess, two-sided)
- Normal maps to simulate texture depth (bump mapping)
- Ambient occlusion factor (from the SSAO buffer)
- Shadow factor (from shadow map)
- Specular intensity (from specular map)
- Light type specific parameters
- Robust shadow maps and shadow cube maps for each light type with thin soft
edges achieved via Percentage-Closer-Filtering (PCF) and hardware filtering. An interface allows the user to define the shadow quality.
- Special Effects / Shader Effects / Post-Processing Effects
- Depth Of Field (DOF) in GLSL based on the paper "Advanced Depth Of Field"
from Thorsten Scheuermann (ATI/AMD)
- True real-time reflections in GLSL. A special double buffering system allows
to spread reflection cube map generation across multiple frames
- Refraction/dispersion for glass materials in GLSL using fresnel factors
so that each R,G,B channel refracts at different angles
- Per-pixel crepuscular rays (god rays) in GLSL with depth value analysis. The light intensity
is also stored in the 2nd color attachment for later use in the dirty lens effect
- Real volumetric light in GLSL (no cheap billboards) using volume ray casting
and shadow map data
- Fast two-pass gaussian blur effects with different kernel sizes in GLSL
requiring minimal texture sample lookups
- Glow/bloom in GLSL using specular light information stored during lighting passes
in the MRT attachments of the main render buffer
- Dirty lens effect in GLSL using specular light information stored during lighting passes
as well as direct incoming light information stored during post-process light effects (for instance god rays)
- Distortion effects in GLSL with depth value analysis to avoid that unwanted objects,
which lie between the camera and the AOE, are bleeding into the effect
- Particle based effects like fire, smoke, rain, snow or flying leaves
- Realistic lens flare effects using occlusion queries
- Particle System
- Advanced particle system which can be rendered separately or as part of the scene graph
- Batching of triangles for maximum rendering performance
- Static or random texture selection
- Easy loading of textures into a texture atlas
- Color (RGB) fading
- Alpha fading
- Dynamic resizing
- Gravitation and wind simulation
- Origin and direction vector randomization
- Constant or random particle lifetimes
- Dynamic speed control
- Billboards or rotating (two sided) quads
- Pre-initialization of particle positions possible
- Easy translation and rotation of complete particle system
- Anti-Aliasing
- Fast Approximate Anti-Aliasing (FXAA). Using the official and improved FXAA3 (v.3.11)
implementation from Timothy Lottes which creates less blurry frames than previous versions of FXAA. Before applying FXAA3, the engine converts the linear RGB values to perceptual color space (gamma 2.0 encoded) and computes luminance for each pixel in the same space. After applying FXAA3, the output is converted back to linear RGB. Application settings allow user to set:
- The amount of sub-pixel aliasing removal
- The minimum amount of local contrast required to apply algorithm
- Legacy support for application controlled High-Resolution-Anti-Aliasing (HRAA),
also known as Multisample Anti-Aliasing (MSAA). Only legacy support since it does not work well with the SSAO part in the hybrid forward/deferred renderer and commercial deferred renderer also tend to use post-processing based anti-aliasing filters. Supported sampling:
- 2x Samples 2 Taps
- 4x Samples 4 Taps
- 6x Samples 6 Taps
- 8x Samples 8 Taps
- Texturing
- Bilinear, bilinear mipmapped and trilinear mipmapped texture filtering
- 2x, 4x, 8x and 16x anisotropic texture filtering
- Multitexturing
- Smart texture management system
- Hardware accelerated mipmap generation for color textures as well as
software mipmap generation for normal maps
- Support for multisampled color and depth texture FBO attachments using
GLSL #ifdefs to create shader versions with sampler2D and sampler2DMS
- Support for non-power-of-two (NPOT) texture dimensions
- Support for S3 Texture Compression (S3TC) methods DXT1, DXT3 and DXT5
- Compressed texture files (e.g. JPG) can be uncompressed to disk to make
the next application start faster
- DOT3 bump mapping using normal maps, normalization cube maps and TBN matrices
to convert light vectors from world to tangent space. To generate the normal maps from common RGB images, the "NVidia Normal Map Filter" plug-in for Adobe Photoshop or the "Height Field to Normal Map" plug-in for Paint.NET could be used
- Scene Graph and Object Management
- Linear and hierarchical (tree based) representation of the scene/objects
- Hierarchical representation allows fast recursive view frustum culling and
furnishs the base for rapid collision/intersection tests and rendering
- For leaf objects, oriented bounding boxes (OBB) are calculated
- For parent objects, the OBBs are constructed by merging the OBBs of the children
- The OBBs are used for view frustum culling. If an object's OBB is outside the view frustum
no further culling tests are wasted on the children. View frustum planes are individually deactivated for all the descendants of an object if its OBB lies on the positive plane side
- Light sources can be defined in the world to illuminate only a subtree of the scene graph
by placing the light sources at desired positions in the tree. Running the application in "developer mode" enables a (WinAPI based) tree view window besides the main window which represents the scene graph and includes icons for geometric data, cameras, target spot lights, point lights, directional lights, grouping dummy objects and particle systems. Also informations about the render state (RS) and the collision handling (CH) are displayed
|
- Each object holds a local and a world transformation matrix which represent its local and
its world orientation. In combination with the scene graph manager this makes it possible to transform whole worlds and object groups by just changing the values of a single matrix and calling the scene graph manager to recursively update the subtree. The smart scene graph manager reduces the update time for multiple modified objects by determining the minimal object group that has to be updated
- Model transformation is by default done on GPU but can also be done on CPU. This can be
changed at run-time, the engine will automatically select local or world space VBOs and adjust the model matrix in the shader to be either the identity matrix or to the model matrix of the mesh
- A view class and view stack system controls the whole Model-View-Projection flow as
well as camera/viewport/frustum states to keep everything in a well and trackable state even during complex cascaded rendering operations which setup different views for reflections, shadow maps, cube maps and many others
- Render data is stored in Vertex Buffer Objects (VBO)
- The required VBO setup to render an object is stored in a Vertex Array Object (VAO)
- Front-to-back z-sorting on opaque objects to exploit the depth buffer
- Objects can be linked to groups to receive commands distributed to the group members
- Recursive deep cloning of objects with only one function call
- Easy integration of special render handlers (e.g. particle systems) into the scene graph
- Intersection Testing
- The hierarchical (tree based) scene representation allows fast recursive intersection tests
- Further each object owns a separate OBB-tree which is automatically and recursively
generated during the loading process. Given a triangular mesh with corresponding oriented bounding box, the mesh can be split into two submeshes. The algorithm splits the mesh by a plane orthogonal to the longest axis of the OBB. This splitting plane is calculated by using the median value of the projections of each face center onto the longest axis as plane-center and the longest axis as plane-normal. The faces are then partitioned based on the side on which their centers lie
- The final OBB-tree reduces the time to test if a line segment (e.g. gun shot) intersects a
triangle of a mesh with possibly thousands of triangles
- For collision detection purposes it is possible to make intersection tests between moving
OBBs, OBB-trees and triangles. Again the hierarchical (tree based) scene representation allows fast recursive collision tests. Two OBB-trees are tested for intersection using double recursion. Then (optional) intersection tests between the triangles in the intersecting leaf nodes of both OBB-trees can be performed
- Animation System
- Character bone animations using object hierarchies
- Linear and hermite spline interpolations fully compatible with the TCB position controller
in 3dsmax/gmax and the 3DS format
- Linear rotation interpolation with quaternion math
- Smooth bezier spline rotation interpolation with quaternion math fully compatible with
the TCB rotation controller in 3dsmax/gmax and the 3DS format
- 3DS Loader
- Fast and entirely self-developed 3DS importer written in C++
- Processes for all objects, lights, point lights, spot lights and cameras
the full material, object and keyframer animation block
- Supports smoothing groups and optimizes vertex, texture and normal array data to
minimal array sizes to provide lowest video memory usage
- Mesh data check for vertices with bad #QNAN00 (not a number) values
- Mesh data check for vertices with corrupted values leading to #INF000 errors
- Mesh data check for isolated vertices
- Mesh data check for bad faces which have equal vertices including automatic repair
- 3DS object hierarchy used/combined with engine scene graph hierarchy
- 3DS scene can be loaded as subtree of existing nodes in the scene graph
- Support for normal maps, environment maps, specular maps and self-illuminating maps
- Self-developed extension to allow loading of different LOD
- 3D Sound
- Utilizing the high-end FMOD sound engine to produce full DOLBY 5.1 3D surround sound
- Font Rendering
- Internal font class
- Batching of triangles
- Fast anti-aliased text rendering using OpenGL alpha testing
- Easy font style loading from different texture sets
- Leading
- Kerning
- Line breaks/text block rendering
- Image Formats
- Using the outstanding C++ library CxImage by Davide Pizzolato to
allow texture loading of popular and advanced image file formats
- Supported formats:
- JPG (JPEG - the most famous image format worldwide)
- JP2 (JPEG2000 - best compression format worldwide for photo-like images)
- PNG (best losless compression format with alpha channel)
- TGA, TIFF, BMP, GIF, PCX, ICO, WBMP, WMF, ZLIB, MNG, JBIG, PNM, PPM, PGM
- Self-developed PCX decoding
- Realtime Statistics
- Current time
- Frames per second (fps)
- Activated features (VBO, VSync, MSAA samples, anisotropic filtering, ...)
- Cam position and view angle
- Rendered objects (opaque/transparent, smoothing groups, ...)
- Rendered triangles (opaque/transparent)
- Reflection maps
- Shadow maps
- Performed culling tests (against FOV or a single view plane)
- Current textures in GPU memory
- Memory informations (current allocated memory, highest allocated memory)
- Active light sources
- Intersection tests (tested obbs/triangles, last intersection position/distance, ...)
- OpenGL renderer, vendor and version
- Camera System
- Unlimited easy to activate cameras
- Animations loadable from 3DS files
- Each camera can be controlled via mouse/keyboard (up/down/forward/strafe/mouse look)
- Rendering Modes
- Easy real-time switch between different visualizations using F1-F11 function keys:
- Visualize wireframe, vertex normals, face normals, face tangents and bounding boxes
- Visualize the (linearized) depth buffer content
- Visualize the content of shadow and reflection (cube) maps
- Visualize the content of each color attachment of the main FBO
- Visualize the content of the color attachments of the G-Buffer FBO
- Visualize the content of the utility color buffers used for SSAO and volumetric light
- The fat red axes visualize the object's pivot point and the blue axes the center.
The thin red axes visualize the object's current rotation. The white fat boxes are the oriented bounding boxes for culling against the view frustum
- Miscellaneous
- VSync (vertical synchronization) support to avoid screen tearing
- Tidy windows configuration interface
- OpenGL clip planes for particle based real-time fire/smoke/electro shock
effects and OpenGL scissor tests for 2D related clipping purposes
- Skybox background rendering
- Internal user interface for gamma correction
- Programming, Development and Design
- Programmed with Microsoft Visual Studio in Visual C++
- Compiled into a static library to make the engine usable across different projects
- GMax by Autodesk is utilized which is a free 3D modeling and animation tool based on
Discreet's award-winning 3ds max.
- Smart application controlling reduces CPU usage to nearly 0%
when the program is minimized or does not have the input focus
- The whole engine consists of roughly 139 C++ and 113 shader source files (GLSL)
- Optional nearly all of the rendering modules (e.g. lensflare/level/skybox) can be
controlled by XML script files. The XML parsing and DOM creation is done using the Xerces C++ Parser from The Apache XML Project
|
|