4 ms·
From the fundamental point of view, the cost of raytracing grows proportional to the number of pixels rendered times log(scene size), whereas rasterization grow
by ihaveajob 6y ago
From the fundamental point of view, the cost of raytracing grows proportional to the number of pixels rendered times log(scene size), whereas rasterization grows linearly with the scene size. So raytracing enables much more complex scenes at a fraction of the cost of rasterizing, which explains why it's being used more and more in real time rendering.
- ccmonnett 6y agoFor others interested in why ray tracing scales O(log N), this is covered in an earlier video in the NVIDIA "Ray Tracing Essentials" series, specifically this one: https://youtu.be/ynCxnR1i0QY?t=173 https://youtu.be/ynCxnR1i0QY?t=173 It's timestamped to the discussion of why this is true, but the whole video (like the series, IMO) is very informative, this one focused on "Rasterization vs Ray Tracing".
- sudosysgen 6y agoFor someone that doesn't want to watch, the essence of it is that space is world-space is divided in a tree-like structure, which makes traversing the scene as costly as traversing the tree, thus log(n) operations.
- CyberDildonics 6y agoThis is only true from a naive approach to visibility. With rasterization you can rasterize geometric values like normals and positions to an image buffer and shade only what is visible. Rasterization in old versions of renderman would do a lot of shading that was thrown away once scenes became more complex. Real time games eventually followed a similar pattern and now do 'deferred shading'. Rasterization can also be used to cull polygons that aren't visible when they are going to end up hidden by opaque objects. In theory ray tracing the first hit visibility can scale better, but in practice that part isn't a big deal and rasterization will probably win anyway. Not only that, but the idea that more polygons will make something look better is another trap. High quality lighting and high resolution textures become more important once polygonal geometry has enough polygons to not have faceting artifacts.
- dahart 6y agoYou make some good points, but culling doesn’t really work for complex on-screen geometry like foliage, hair, volumetics, crowds, etc, and games are pushing in those directions. Raster is currently cheaper for well tuned video game assets, that is true, but is not cheaper for film quality assets, and that’s where games want to go in the future. Filtering is a very important issue, and you’re right that more polys is not automatically better from a quality standpoint. Still, ray tracing can enable rendering of geometric complexity that is not possible with raster in real time, as long as you have a way to filter. Games aren’t yet really pushing on the boundaries of instancing, but they will down the road. The other appeal with ray tracing is being able to consolidate all the various tricks and algorithms into a single path tracing framework. Ray tracing architectures don’t need deferred shading (though they may choose a similar wavefront approach), and they don’t have a collection of difficult and separate ad-hoc methods for each effect they want (shadows, AO, reflections, indirect lighting, volumetrics, etc. etc.). Ray tracing gives you a unified framework where getting new lighting effects is easier to add, generally speaking.
- CyberDildonics 6y ago> but culling doesn’t really work for complex on-screen geometry like foliage, hair, volumetics, crowds, etc, and games are pushing in those directions. Just because something doesn't work in all situations doesn't mean it doesn't work in general. Games putting polygonal leaves and crowds full of furry creatures would be a waste, it isn't going to happen without level of detail. It is actually cheaper for film quality assets, but the camera visibility rays aren't where most of the time is spent. Still, things like REYES / renderman architecture decouples all the sampling required for motion blur and defocus so that the visibility samples don't have to be shaded. > The other appeal with ray tracing is being able to consolidate all the various tricks and algorithms into a single path tracing framework. My reply was about ray tracing not actually being faster than rasterization for first hit visibility in practice. I didn't say anything about ray tracing in general here.
- DavidVoid 6y agoThe problem is that although it scales better than rasterization, the computations involved in tracing are much more expensive (on current hardware at least). Another big drawback of ray tracing is that you can't use conventional occlusion and view frustum culling [1] with it. So significantly reducing the scene size, as you do in a rasterization renderer, is just not possible. If you have access to the GDC Vault I can recommend DICE's 2019 talk about reflections in Battlefield V. The slides are available for free [2]. [1] https://media.giphy.com/media/xUPGcgiYkD2EQ8jc5O/source.gif https://media.giphy.com/media/xUPGcgiYkD2EQ8jc5O/source.gif From the game Horizon Zero Dawn. Only geometry that might end up on the screen is actually sent through the rasterization pipeline. [2] https://gdcvault.com/play/1026282/It-Just-Works-Ray-Traced https://gdcvault.com/play/1026282/It-Just-Works-Ray-Traced Talk about culling starts on slide 56. Occlusion and Frustum culling aren't an option, so new techniques had to be developed.