Re: Path tracing in games back
Board:
Home
Board index
Raytracing
General Development
(L) [2012/02/01] [ost
by jbarcz1] [Re: Path tracing in games] Wayback!Just read that paper too.  Its pretty neat stuff.  The thing is though, alias free hard shadows aren't really what you want.  What you want, visually, is a convincing soft shadow (not a physically correct one, per se, just a fuzzy one that isn't visually jarring).
One of the strengths that shadowmaps have is that the PCF filter helps to take the crispy hard edge off of the shadow and fake the look of soft shadows.  We get a good approximation at little additional cost. Its possible to do even better with additional trickery (widening PCF kernel based on occluder distance, etc).   If we really wanted crisp hard shadows, we'd have taken a clue from Doom3 and just kept improving on shadow volumes.   
I do agree about reflection/refraction though.  This IMO, is the one compelling use for game raytracing in the near term.  Everything else can be adequately faked with much less effort and cost.  This wouldn't justify moving the entire renderer to raytracing (which is fraught with more peril than most people realize), but I could imagine somebody building a hybrid renderer just to get at it.
(L) [2012/02/02] [ost
by PauloAndrade] [Re: Path tracing in games] Wayback!I already read two or three articles where primary ray collision is generated using raster and ray tracing is only used for secondary rays. As far as I can remember, the articles point good results. It seems to me that this strategy will be used more frequently in comercial engines, to get reflections and small, detailed, shadows. What you guys think ? Is this the future of ray tracing in commercial engines for real time rendering ?
(L) [2012/02/03] [ost
by toxie] [Re: Path tracing in games] Wayback!Amdahl's law will haunt you in that case.. Of course, if you only have subtle reflections and refractions for only a fraction of the screen (and maybe even calculate them on a different LOD than the primary rays/raster), then it makes perfect sense, but whats the point then? [SMILEY ;)] These subtle effects are already possible today, using raster-hacks/trickery.. So, as soon as you start tracing rays on glossy surfaces and maybe even 1 or 2 bounces of indirect (and use same geometry for all these effects), these will clearly dominate the overall rendering time, and the amount you save by replacing primary rays by raster is then mostly not significant to the overall frame time..
(L) [2012/02/03] [ost
by PauloAndrade] [Re: Path tracing in games] Wayback!Toxie, considering realtime render, I believe the advantages will come if the time spend on primary ray generation is muvh bigger than the time to do rasterization on order to have the same first hits. I am thinking about a GPU ray tracer, where the GPU use it's rasterization power to compute the presumable first hits and then a cuda kernel, for example, will ray trace these effects...
Since NVidia offer Optixs, I am thinking if they will not make this hybrid raster/ray tracing process interesting in future GPUS ...
Trying to predict de future [SMILEY :)] with the help of people that has more knowledge than me [SMILEY :)].
(L) [2012/02/03] [ost
by dbz] [Re: Path tracing in games] Wayback!>> PauloAndrade wrote:
Since NVidia offer Optixs, I am thinking if they will not make this hybrid raster/ray tracing process interesting in future GPUS ...
Some gi effects in a rasterizer may be possible but otherwise I think the gpu is overrated for the use in path-tracing or other global illumination. If you look at the Luxmark 2.0 topic elsewhere on this board it becomes clear that for the same OpenCL code, a high end gpu is less than twice as fast as a high end cpu. Luxmark even seems to have been developed for gpu's so an optimized cpu version might decrease the difference even further. It would have been nice if the gpu would have lived up to the '10 - 100x' speed increase over the cpu, but unfortunately it doesn't for path tracing.
For a low resolution image that would take say 120 seconds to render noise free with a path tracer, hardware would have to be 120 * 50 = 6000 times faster than today to render the image at 50 fps for a game. That isn't going to happen anytime soon, neglecting even that games are in high definition, have ever increasing scene complexity etc. It is obvious that path tracing will not be the solution for games.
(L) [2012/02/04] [ost
by PauloAndrade] [Re: Path tracing in games] Wayback!>> dbz wrote:... It is obvious that path tracing will not be the solution for games.
But what do you think about Brigade 2 ? There is no information about it's tecnology in the Brigade Tech link, but I believe it uses both GPU and CPU and the results look good. Also, Daniel Poln have this Wolfenstein Ray Traced ([LINK http://www.wolfrt.de/]) site that shows very nice results. I know he probably run this demo in a monstrous computer with Intel's help but, anyway, don't you think it's just around de corner ? I am asking because I see a good number of papers about interactive or real time ray tracing stuff, and I ask myself : if it's not possible in a near future, why people is still trying Ray Tracing for real time or interactive render ? I am missing something ?
Keep in mind that  I am a newbie asking for illumination [SMILEY :)].
Thanks !
(L) [2012/02/04] [ost
by Dade] [Re: Path tracing in games] Wayback!>> dbz wrote:It would have been nice if the gpu would have lived up to the '10 - 100x' speed increase over the cpu, but unfortunately it doesn't for path tracing
This myth has been debunked many time on old ompf.org however you have to factor that a game PC can have 2 or even 4 GPUs while it can not have 2 or 4 CPUs (i.e. it would be too expansive).
In my opinion, the borderline between CPUs and GPUs is become less and less defined every year (looks at AMD GCN architecture and the incoming Intel Haswell rumors: they started from opposite places but it looks like the are converging to the same solution). I hope in a future with NUMA architectures where you can just plugin as many PUs as you need (who care if they are called CPUs or GPUs) ... just dreaming.
I think the real "revolution" will not be path tracing in games but a totally custom pipeline tailored for each game (i.e. someone will use rasterization, someone path tracing, someone something hybrid, etc.) The real revolution will be to have the hardware and the software eco-system capable to support such a freedom.
(L) [2012/02/14] [ost
by cignox1] [Re: Path tracing in games] Wayback!Why do everyone keep talking about path tracing? There is a wide range of algos with a different tradeoff between quality and speed. Couldn't a first step towards RT GI make use of one of them?
(L) [2012/02/14] [ost
by HungryBear] [Re: Path tracing in games] Wayback!>> cignox1 wrote:Why do everyone keep talking about path tracing? There is a wide range of algos with a different tradeoff between quality and speed. Couldn't a first step towards RT GI make use of one of them?
My guess it's simplicity and generality are the answer. And if you ask about tradeoffs , in my opinion production pipeline is waaaaay more clearer when you don't use "tricks"
(L) [2012/02/22] [ost
by davepermen] [Re: Path tracing in games] Wayback!what i like about starting with pathtracing is you start with a perfect solution for everything. and then, you start to cheat for speed where you want.
with stuff like rastericing, you start by a very fast, but bad quality visaulisation, and then have to cheat each step towards more quality. and still will never reach perfection.
if games would have had pathtracing with thousands of quality reducing cheats years ago, we could now just play those games at highest quality and highest res. 100% scalable towards perfection. no old game can do that, sadly.
(L) [2018/09/24] [ost
by cignox1] [Re: Path tracing in games] Wayback!I think that many of the ideas expressed here several years ago could be now revisited with the new RTX in mind.
For example, the complexity level reached by rasterizazion engines is something that has been discussed a lot recently. Or the hybrid approach that I considered in the opening message seems to be the path choosen by nVidia to introduce RT in games.
What do you think about it?
(L) [2019/03/26] [ost
by andersll] [Re: Path tracing in games] Wayback!Things seem to be progressing the exact same way we did in the offline world: start introducing raytracing to capture certain effects that are difficult to get looking right with rasterization techniques, then when the hardware catches up move to full path tracing and do away with the massive ball of complexity that's caused by all the hacks upon hacks to try and recreate stuff that just falls out of the rendering equation naturally.
Might take a little longer for games though - in feature work render times have gotten significantly longer since the shift to path tracing but we put up with it because the results are better and things generally require less artist time to reach a certain level of quality. For games you've got a hard frame time limit to hit.
(L) [2019/03/26] [ost
by cignox1] [Re: Path tracing in games] Wayback!>> Things seem to be progressing the exact same way we did in the offline world
Yes, that's what I think it is happening (and will happen with some luck = if nVidia don't give up due to the warm reception).
 >> Might take a little longer for games though - in feature work render times have gotten significantly longer since the shift to path tracing but we put up with it because the results are better and things generally require less artist time to reach a certain level of quality. For games you've got a hard frame time limit to hit.
And on the top of that, in the offline world you can "just" upgrade your hw so that it is up to the task for your next feature film, but you can't force 10 millions players to upgrade their hw 2  or 3 times in a few years. And since you still need to keep your "old" rasterization code unless your target players already have capable hw, many years might be required before we see the first RT only AAA game (but I bet we will see some experimental/indy games in the meantime).
(L) [2019/03/26] [ost
by friedlinguini] [Re: Path tracing in games] Wayback!I think the hope is that it will follow roughly the same trajectory as programmable shading, which was also once an extravagant feature from the offline world. Unlike with Cg, I think there’s a bit more of a push for multi-vendor adoption of the interface as seen from getting it in DirectX early, along with various game engines.
Disclaimer: NVIDIA employee expressing my own opinion, and not privy to the meetings where this might have been discussed.
(L) [2019/06/26] [ost
by capagot] [Re: Path tracing in games] Wayback!Interesting discussion. As friedlinguini has pointed out, it seems that rendering, for interactive applications, is following the same path as in the movie industry. Also, I agree that, as pointed out by cignox, it may not be that easy due the hardest constraints imposed by the gaming industry (frame time and the heterogeneous hardware at the hands of the consumers, which can not buy new hardware at will).
However, it would be interesting to consider into this scenario the possibility of game-streaming (e.g. Google Stadia), which would reduce the hardware cost for the end user. In this scenario, the game-streamers would be in charge of maintaining and upgrading its own hardware. It would be a situation similar to that of the movie industry (one company responsible for the software and hardware) except that, in this case, the rendering demands would be *much* (more emphasis here!!!) higher because the rendering farm would have to render every frame of every game for every (potentially thousands) user.
At a first glance it may suggest that, given the higher rendering power available at the rendering farms, the evolution of the rendering engines towards pure ray tracing would be faster. However, every small increase in the computational demands of the rendering engines must be scaled by thousands of game players which would, in turn, keep the evolution of the rendering engines as slow as it would be if the consumer would be the responsible for his own rendering hardware. Certainly these distributed rendering engines will take advantage of coherence in order to reduce computational demands, by I have no idea how well that would scale.
All in all, I am really curious and excited about what is going to happen, but I am really bad at predicting [SMILEY :)]
(L) [2020/02/20] [ost
by koiava] [Re: Path tracing in games] Wayback![IFRAME n/a]
Here is my path traced table pool game: https://www.shadertoy.com/view/MttfW
It's pure path tracing with NEE and MIS. Uses simple material(lambert+microfacet with fresnel), simple shapes(spheres, cone, rectangle), single rectangular light and thin lens camera with DoF and Motion Blur. Motion blur also works for objects.
I only calculate single scattering for volume. Equiangular sampling is used to illuminate volumetric particles(https://www.arnoldrenderer.com/research/s2011_equiangular_slides.pdf).
Additionally I use Area Preserving parametrization for Spherical rectangles(https://www.solidangle.com/research/egsr2013_spherical_rectangle.pdf) to sample proportional to solid angle.
As you might know all the geometry and textures are procedurally generated on the fly per pixel per pass so obviously it's very far from optimal.
Shader is quite heavy and compiler requires time to do all the loop unrolling and optimizations to generate optimal code. Some browser can crash because of internal timeout for compilation. Because of that settings are set to low quality, so if it doesn't crash and you want to see better image you can change resolution at beginning of the 'Common Tab', sampling parameters at 'Buffer B', press Compile Arrow button and wait for compilation fingers-crossed.
P.S It's not really a finished game as title says. There is no clear goal. It's just PoC to show what is possible.
Hope you like it. [SMILEY :)]
(L) [2020/03/04] [ost
by dawelter] [Re: Path tracing in games] Wayback!Oh yes! With volume rendering! Looks very pretty overall. A great start for a game [SMILEY :-)]
back