copelandmaster
Member
By Edd Biddulph
Link - Console Commands and Gallery (old)
GitHub Page - Source code
EXE - Prepackaged EXE using the Quake 2 Demo (August 2017 version)
Further Details - Post by Pathtracing Enthusiast Sam Lapere that goes into great detail about the version released last year.
By default, it looks worst than the video, so you have to do some settings tweaks in the console (press ~ while in game) to make it look better. The default settings are not listed, so to find them enter the command without a value (you might turn off/on something that affected performance/visuals heavily and want to go back). This is important because, for some reason, no matter if you delete the files/replace the files and folder/use a different copy of the folder or files, your changed settings are somehow retained. It's weird.
settings ending with 'enable' are on/off only (1=on, 0=off)
pretty much everything else is a strength value (with 0=off)
e.g.
gl_pt_enable 1
gl_pt_bounces 1
gl_pt_shadow_samples 1
gl_pt_light_samples 1
gl_pt_static_entity_lights_enable 0
gl_pt_recompile_shaders
vid_restart
Meaning: PT is enabled, light bounces 1 time in the scene, shadows are sampled at a rate of 1, the lights are sampled at a rate of 1, static entity lights are disabled. Shaders are recompiled, and the graphics engine has been refreshed (does not affect progress in the level). Recompile shaders is a requirement for changing most settings. Vid restart is required for changing static entity lights on or off.
Pro Tips:
You can change all settings with PT disabled, but to see any changes, it must be turned back on.
Static entity lights are required for full visibility in at least one room in the demo. Beware, it is a performance killer and is disabled by default.
Outside areas are darker and harder to render. Perhaps the key lies in tuning the skybox/skybox lighting settings?
The in-game options menu works as intended. Changing your resolution affects performance and image clarity.
Link - Console Commands and Gallery (old)
GitHub Page - Source code
EXE - Prepackaged EXE using the Quake 2 Demo (August 2017 version)
Further Details - Post by Pathtracing Enthusiast Sam Lapere that goes into great detail about the version released last year.
This is a from-scratch GPU-based pathtracer created specifically for Quake 2. It has several optimisations which are only viable due to the typical characteristics of Quake 2 such as support for parallogram-shaped lightsources, BSP ray traversal, and special handling of sky 'surfaces' (portals). It doesn't officially have a name, but you can call it Raylgun.
Supports all static and dynamic light types that were used in the original game, for which illumination was originally baked into static lightmaps.
All objects can cast shadows.
In terms of graphics API support, only OpenGL 3.3 is required.
Requires no offline pre-processing of input data, so any mod or level which works with Yamagi Quake 2 (which is a no-frills port) should work.
Still uses the rasterisation capabilities of the GPU anywhere that it makes sense.
All code modifications reside within the refresher (Quake 2's rendering subsystem) and the pathtracing codepath can be averted entirely at runtime without qualitative detriment to the original renderer's results.
Sam Lapere (of Ray Tracey fame) made a great post putting together a lot of my answers to his questions about this project, and also provided some useful tips on getting it running yourself. Sam is quite passionate about raytracing in videogames, be sure to check out his other posts and past projects.
Update Log
August 2017
Improved sampling with blue noise dithering and Halton sequence sample points.
Added TAA (temporal anti-aliasing) using raytracing to detect disocclusions, rather than colour history or G-buffer data.
Added support for moving lightsources attached to level objects such as elevators.
Added bump mapping, with bumpmaps generated on start-up from diffuse texture brightness.
Added Simple Reinhard tonemapping with exposure control, and a gamma correction parameter.
Added specular reflections of light sources and indirect lighting.
The player's own weapon no longer casts shadows on the level geometry (it can still receive shadows, and it still casts shadows on itself).
Fixed a significant slowdown caused by GL buffer usage flags, in relation to dynamic entity lights.
Added more console variables.
Fixed numerous minor bugs.
Here are some average framerate measurements as measured by Quake 2 itself along with the graphics hardware that was used:
AMD FirePro W8100 - 49.3 fps
NVIDIA Quadro K6000 - 32.8 fps
GeForce GTX 960 - 31.1 fps
AMD FirePro W7100 - 29.3 fps
GeForce GTX 680 - 22.1 fps
Links
YouTube Video 4 (new for August 2017) / HQ Direct Feed (1.2 GB) - This one was run on a GTX Titan Xp
Out-dated Links
YouTube Video 1 (old)
YouTube Video 2 (old)
Youtube Video 3 (old)
By default, it looks worst than the video, so you have to do some settings tweaks in the console (press ~ while in game) to make it look better. The default settings are not listed, so to find them enter the command without a value (you might turn off/on something that affected performance/visuals heavily and want to go back). This is important because, for some reason, no matter if you delete the files/replace the files and folder/use a different copy of the folder or files, your changed settings are somehow retained. It's weird.
settings ending with 'enable' are on/off only (1=on, 0=off)
pretty much everything else is a strength value (with 0=off)
e.g.
gl_pt_enable 1
gl_pt_bounces 1
gl_pt_shadow_samples 1
gl_pt_light_samples 1
gl_pt_static_entity_lights_enable 0
gl_pt_recompile_shaders
vid_restart
Meaning: PT is enabled, light bounces 1 time in the scene, shadows are sampled at a rate of 1, the lights are sampled at a rate of 1, static entity lights are disabled. Shaders are recompiled, and the graphics engine has been refreshed (does not affect progress in the level). Recompile shaders is a requirement for changing most settings. Vid restart is required for changing static entity lights on or off.
Pro Tips:
You can change all settings with PT disabled, but to see any changes, it must be turned back on.
Static entity lights are required for full visibility in at least one room in the demo. Beware, it is a performance killer and is disabled by default.
Outside areas are darker and harder to render. Perhaps the key lies in tuning the skybox/skybox lighting settings?
The in-game options menu works as intended. Changing your resolution affects performance and image clarity.