Path tracing in games

Practical and theoretical implementation discussion.
jbarcz1
Posts: 6
Joined: Sun Dec 11, 2011 11:47 pm

Re: Path tracing in games

Postby jbarcz1 » Wed Feb 01, 2012 6:50 pm

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.

PauloAndrade
Posts: 9
Joined: Mon Jan 30, 2012 5:25 pm

Re: Path tracing in games

Postby PauloAndrade » Thu Feb 02, 2012 5:50 pm

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 ?

toxie
Posts: 118
Joined: Mon Nov 28, 2011 12:30 pm
Location: germany
Contact:

Re: Path tracing in games

Postby toxie » Fri Feb 03, 2012 9:05 am

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? ;) 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..
Better you leave here with your head still full of kitty cats and puppy dogs.

PauloAndrade
Posts: 9
Joined: Mon Jan 30, 2012 5:25 pm

Re: Path tracing in games

Postby PauloAndrade » Fri Feb 03, 2012 2:22 pm

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 :) with the help of people that has more knowledge than me :).

dbz
Posts: 46
Joined: Wed Jan 11, 2012 10:16 pm
Location: the Netherlands

Re: Path tracing in games

Postby dbz » Fri Feb 03, 2012 4:53 pm

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.

PauloAndrade
Posts: 9
Joined: Mon Jan 30, 2012 5:25 pm

Re: Path tracing in games

Postby PauloAndrade » Sat Feb 04, 2012 1:14 am

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 (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 :).

Thanks !

Dade
Posts: 206
Joined: Fri Dec 02, 2011 8:00 am

Re: Path tracing in games

Postby Dade » Sat Feb 04, 2012 8:35 pm

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.

cignox1
Posts: 12
Joined: Mon Jan 30, 2012 10:11 am

Re: Path tracing in games

Postby cignox1 » Tue Feb 14, 2012 2:42 pm

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?

HungryBear
Posts: 2
Joined: Tue Feb 14, 2012 2:59 pm

Re: Path tracing in games

Postby HungryBear » Tue Feb 14, 2012 3:33 pm

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"

davepermen
Posts: 48
Joined: Fri Dec 02, 2011 12:21 pm

Re: Path tracing in games

Postby davepermen » Wed Feb 22, 2012 11:26 pm

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.


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 8 guests