Path tracing in games

Practical and theoretical implementation discussion.
cignox1
Posts: 12
Joined: Mon Jan 30, 2012 10:11 am

Path tracing in games

Postby cignox1 » Mon Jan 30, 2012 10:19 am

I've just seen one of the latest video of the amazing path tracer developed by Jacco and I'm wondering: isn't path tracing possibly the worst (computationally-wise) rendering algorithm out there? Wouldn't other algos or even hybrid approaches (traditional RT with some sort of quick and dirty GI) be better choiches for a game, given that the power required by PT will be available only in several years, at least for production quality games?

Just curious, as I'd love to see a move towards those algos but I fear that this will be only possible if people starts to see them as valid alternatives...

ingenious
Posts: 279
Joined: Mon Nov 28, 2011 11:11 pm
Location: London, UK
Contact:

Re: Path tracing in games

Postby ingenious » Mon Jan 30, 2012 11:53 am

cignox1 wrote:...given that the power required by PT will be available only in several years, at least for production quality games?


It will actually never be available. This is a very common misconception. In movies, rendering times increase over the years, even though the hardware and algorithms continuously get better. Is anyone in production interested in real-time rendering of the scenes that were challenging in the 90's? No.

Jacco's tech demos are simply trying to push the technology to the limit. Be sure he's well aware of the limitations. We need these demos for the benchmarks and the knowledge what's possible.
Image Click here. You'll thank me later.

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

Re: Path tracing in games

Postby cignox1 » Mon Jan 30, 2012 1:05 pm

That's true, and yet sfx are starting to use RT and even GI instead of the old algos available at the time of JP. Isn't there a threshold (of quality requirements or scene complexity) above which is more convenient to leave rasterization in favour of other techniques? After all, even per pixel lighting was considered unfeasible 15 years ago...

I just wonder if the switch to more 'advanced' algorithms could be closer, if only the right compromises were found...

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

Re: Path tracing in games

Postby Dade » Mon Jan 30, 2012 6:03 pm

cignox1 wrote:Isn't there a threshold (of quality requirements or scene complexity) above which is more convenient to leave rasterization in favour of other techniques?


Ray tracing complexity is supposed to be O(log n) while rasterization should be O(n) so there should be some point where rasterization really starts to have some problem.

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

Re: Path tracing in games

Postby dbz » Mon Jan 30, 2012 9:09 pm

Also, when looking at games like GT5 on the ps3 it is amazing how realistic rasterization can be. Despite the very old graphics hardware in the ps3, for some scenes the gameplay is near photo realistic. With next generation consoles coming in the near future, graphics may even look better. In the end technologies like path-tracing may not be necessary at all for games, when rasterization is capable of producing photo realistic images. If it looks photo realistic to the human observer, who cares whether the renderer is 'physically-based' or (un)biased or not.

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

Re: Path tracing in games

Postby Dade » Mon Jan 30, 2012 9:56 pm

dbz wrote:who cares whether the renderer is 'physically-based' or (un)biased or not.


"Unbiased" rendering has gained some acceptance in the off-line rendering field more than for the quality (i.e. it can be achieved also with "Biased" rendering) because it is easier to use for the artists. This may become a factor in game market too :idea:

I guess producing all the high quality material included in today games is quite expansive (and not having to handle all the tricks required by rasterization it could reduce the costs).

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

Re: Path tracing in games

Postby PauloAndrade » Mon Jan 30, 2012 10:18 pm

dbz wrote:Also, when looking at games like GT5 on the ps3 it is amazing how realistic rasterization can be. Despite the very old graphics hardware in the ps3, for some scenes the gameplay is near photo realistic. With next generation consoles coming in the near future, graphics may even look better. In the end technologies like path-tracing may not be necessary at all for games, when rasterization is capable of producing photo realistic images. If it looks photo realistic to the human observer, who cares whether the renderer is 'physically-based' or (un)biased or not.


Dbz, considering the render process, I believe rasterization isn't capable of simulate all light effects in order to create photorealistic images. Am I wrong or every light effect could be simulated using rasterization, if you have enough processing power ? I would love to find an article or book where all the rendering techniques are compared considering photorealism...

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

Re: Path tracing in games

Postby dbz » Mon Jan 30, 2012 11:38 pm

PauloAndrade wrote:Dbz, considering the render process, I believe rasterization isn't capable of simulate all light effects in order to create photorealistic images. Am I wrong or every light effect could be simulated using rasterization, if you have enough processing power ?

I don't see why rasterization could not handle global illumination effects. In a pixel shader you could calculate global illumination per pixel if you had all the materials, lights and geometry available in textures. You could even use the z-buffer for the primary rays. However, it would be much more cumbersome to use glsl or cg instead of cuda or opencl. (I tried once and it didn't work because of problems with the glsl drivers on Linux).

What I actually meant in my previous post is that the average gamer probably doesn't care whether a renderer uses rasterization instead of path tracing as long as the scene looks photo realistic enough. I am not sure how it is done in GT5. Some scenes look amazingly photo realistic, especially the outdoor scenes, whereas the tunnel scenes still look rasterized.

I think the NVIDIA GPU Gems and real-time rendering books are good reading material in general.

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

Re: Path tracing in games

Postby cignox1 » Tue Jan 31, 2012 11:03 am

In the end technologies like path-tracing may not be necessary at all for games


I agree that it is amazing the quality reached by games nowadays and that there is still room for improvements. But what about reflections (wich are important for many surfaces)? In racing games you usually have the environment reflected on the cars, but no car to car reflections (or even self reflections). For that you should to a prepass for each car, but still, you would miss 2 level reflections (and still no self reflections).

Same thing for shadows: they are quite nice (I've seen those in Crysis 2 PC + quality pack) and they are absolutly amazing. But far from perfect, and every new improvement requires new tricks and huge amount of memory stolen from textures.

Todays engines are a stack of tricks trying to overcome the limitations of the rasterization. I'm quite sure that once the graphic hardware is ready, suddently companies will say "why should I spend 3 years for a 1 million loc engine where I can spend (let's say) 1 year for a 50k one?" or "Why should I set n different shaders, n different techniques, n different execution paths for the different GPUs, and the different performances offered when I can limit rays here and there, recursion depth, BRDF?"

I know, those arguments have been discussed thousands of times here. Actually, I think that this is the right time, for those skilled enough (this put me aside, sorry :-), to show that new algorithms could soon replace the rasterization. It's just that pure PT is not what is needed, something more affordable. Such demo could also be used to constantly test the new hardware, until that threshold is crossed.

Something similar to the intel quake 3 arena raytraced, jsut on the right hardware :-)

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

Re: Path tracing in games

Postby PauloAndrade » Tue Jan 31, 2012 10:03 pm

cignox1 wrote:
In the end technologies like path-tracing may not be necessary at all for games


I agree that it is amazing the quality reached by games nowadays and that there is still room for improvements. But what about reflections (wich are important for many surfaces)? In racing games you usually have the environment reflected on the cars, but no car to car reflections (or even self reflections). For that you should to a prepass for each car, but still, you would miss 2 level reflections (and still no self reflections).

Same thing for shadows: they are quite nice (I've seen those in Crysis 2 PC + quality pack) and they are absolutly amazing. But far from perfect, and every new improvement requires new tricks and huge amount of memory stolen from textures.
...

Cignox1, the self reflections and shadows are examples. I recently read the article "A Hybrid GPU Rendering Pipeline for Alias-Free Hard Shadows", and I liked a lot the results. Are there any other visual effects that are still not implemented in raster based renderers but could be done in Ray Tracing ? I am burning my mind here to think about others but no luck. I hard to be a newbie in the rendering field :).


Return to “General Development”

Who is online

Users browsing this forum: No registered users and 4 guests