Create an account


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bringing the raytracing experiment to Xonotic

#1
To be clear from the start: I'm obviously not suggesting this as some new default feature, the technology is nonviable to most players for at least another potential decade. I'm thinking of it solely as an experiment that would be really cool to make... most likely as a fork of the engine, though a hidden feature in the default code would be neat if it weren't too hard to maintain. It also wouldn't be recommended for any competitive online gameplay for obvious reasons. The idea is inspired by videos popping up of fans editing the engines of their favorite old titles to implement realtime raytracing, from Quake 2 to Serious Sam.

We have an open source engine, good code and assets to use it with, a development team of cool geeks who understand... don't see why we shouldn't consider seeing how Xonotic with raytracing would look like! And of course other games that use Darkplaces, as this would also make Quake RTX a possibility with anything else using the engine.

The obvious hurdle would be code and driver support, making sure this works on both Nvidia / AMD / Intel and under both Windows / Linux / IOS. We'll surely need Vulkan for this, though to my knowledge Vulkan has the basics for shooting light rays builtin and ready to use? As far as textures go we don't have PBR materials and prolly no one willing to redo all the images and shaders, though we should be able to get away with interpreting the current texture setup intelligently and not even having to recompile any existing maps: Standard texture remains albedo, normal / bump map unchanged, gloss texture as roughness (inverted), reflect texture as metallicity (may be unnecessary for now), glow texture as emission. Light source entities and lightmaps would be ignored by this renderer, the glow textures of lamps / neons in the map now responsible for casting light alongside the sky cubemap where one is available... maps will obviously be much darker but like I said this would be a gorgeous experiment not some official graphical upgrade we can expect to be always playable and look the same as the ridiculously ancient lighting system we presently use.
Reply

#2
Reply

#3
Reply

Reply

#5
id love to run a super fast arena fps at 30fps
Reply

#6
A little something I unfortunately need to say before continuing: Expect me to put this and other Xonotic related things on second place for the time being. Don't want to dive in detail but some unsolicited personal drama was thrown straight into my face out of nowhere by someone with admin status last night, while I was trying to work on this with other engine developers in the chat. I don't know when and how it's going to be resolved, but at the moment I'm out of a place to even communicate with the DP team properly because of it. Thank you for understanding.

What I managed to do before things unfolded: I've been playing with the existing bouncegrid implementation, which as someone accurately pointed out is the closest thing we already have to realtime raytracing. Its downside is it requires rtlights / dlights to work, no support for emission map tracing from *_glow surfaces... even if it had that its performance is understandably abysmal at high settings, making it viable only for calculating bounce light at a low detail. After a few hours of playing with the settings, I managed to come up with some good options for the dynamic implementation, which appears to offer great bounce lighting at great performance for stuff like projectile lights. Create a bouncegrid.cfg and paste the following in, use exec to run it from the console at startup:

Code:
set r_shadow_realtime_world_lightmaps 0

set r_shadow_bouncegrid 1
set r_shadow_bouncegrid_blur 4
set r_shadow_bouncegrid_dynamic_bounceminimumintensity 0.05
set r_shadow_bouncegrid_dynamic_culllightpaths 1
set r_shadow_bouncegrid_dynamic_directionalshading 1
set r_shadow_bouncegrid_dynamic_dlightparticlemultiplier 1
set r_shadow_bouncegrid_dynamic_hitmodels 0
set r_shadow_bouncegrid_dynamic_lightradiusscale 8
set r_shadow_bouncegrid_dynamic_maxbounce 4
set r_shadow_bouncegrid_dynamic_maxphotons 4096
set r_shadow_bouncegrid_dynamic_quality 1
set r_shadow_bouncegrid_dynamic_spacing 128
set r_shadow_bouncegrid_dynamic_updateinterval 0
set r_shadow_bouncegrid_dynamic_x 64
set r_shadow_bouncegrid_dynamic_y 64
set r_shadow_bouncegrid_dynamic_z 64
set r_shadow_bouncegrid_floatcolors 1
set r_shadow_bouncegrid_includedirectlighting 0
set r_shadow_bouncegrid_intensity 1
set r_shadow_bouncegrid_lightpathsize 256
set r_shadow_bouncegrid_normalizevectors 1
set r_shadow_bouncegrid_particlebounceintensity 4
set r_shadow_bouncegrid_particleintensity 1
set r_shadow_bouncegrid_rng_seed 0
set r_shadow_bouncegrid_rng_type 0
set r_shadow_bouncegrid_static 0
set r_shadow_bouncegrid_static_bounceminimumintensity 0.05
set r_shadow_bouncegrid_static_directionalshading 1
set r_shadow_bouncegrid_static_lightradiusscale 8
set r_shadow_bouncegrid_static_maxbounce 4
set r_shadow_bouncegrid_static_maxphotons 16384
set r_shadow_bouncegrid_static_quality 16
set r_shadow_bouncegrid_static_spacing 64
set r_shadow_bouncegrid_subsamples 1
set r_shadow_bouncegrid_threaded 1
Here are some screenshots of what I get on my map with those, albeit other maps don't seem to work as accurately so far. Lightmaps are turned off on purpose with "r_shadow_realtime_world_lightmaps 0", that's not necessary with this setup so don't worry about everything looking dark: It's for experimenting with the idea of using only realtime lights together with the bouncegrid, something that would need to be implemented separately and wisely to get it automatically working with all existing maps.

[Image: GsMuxYr.jpg]
[Image: znwEME1.jpg][Image: lZu4cpq.jpg]
[Image: fiz1XaX.jpg]
[Image: q9SMtAh.jpg]
[Image: 2rc6x7y.jpg]
[Image: eSWXz4r.jpg]
[Image: w5MGSQP.jpg]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  [SUGGESTION] Bringing back a few assets from Nexuiz as well as digging through the maps section Lee_Stricklin 1 3,894 12-08-2014, 10:15 PM
Last Post: Mario
  [SUGGESTION] Bringing the Sci Fi to Xonotic, don't look at Pinkrobot's bird Rad Ished 13 10,166 04-06-2010, 07:19 PM
Last Post: lecithin

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-