Welcome for computer graphics.
In the last remaining two weeks, until Christmas, we will speak about ray tracing.
And in fact, ray tracing is an alternative rendering paradigm.
It's an alternative to rasterization.
Up to now, when we spoke about rendering a triangle, we were always thinking about a
rasterization algorithm that for every triangle computes which pixels are covered.
Yeah, we learned about the scanline algorithm, for instance.
And with such an algorithm, we rasterized triangle by triangle.
We used the set buffer to compute occlusion.
And in the end, we got an image of our scene.
This is rasterization.
And ray tracing is a different rendering paradigm.
It allows us to generate the same images as with rasterization, only slower.
Yeah, that's not an advantage.
But the advantage is that with ray tracing, we can achieve illumination effects that are
very difficult to achieve with rasterization.
For instance, shadows, indirect light, reflections, refractions, and so forth.
So ray tracing is in general slower than rasterization.
It's also barely used for interactive computer graphics.
The major application of ray tracing is to generate high-quality images.
So if you want to produce images for advertisements, for instance, or for movies, then usually
these are generated by ray tracing.
And a ray traced image can require many minutes or maybe even hours.
But it also has special effects in it.
And this is what we will speak about for the following two weeks.
And today, we will look at the basics of ray tracing, what is the idea.
And then we will add some more and more complicated effects and see how ray tracing helps to get
these effects.
OK, so what's the difference with rasterization?
Essentially, in the end, ray tracing and rasterization only differ by the outer loops of the entire
render process.
What does that mean?
So in a very simplified view, we can describe rasterization as follows.
We say in a loop for each triangle, we process triangle by triangle.
And then we determine the pixels inside each of these triangles.
And we shade the according pixels.
So we have that scene here with two triangles, a blue one and an orange one.
So we start with a blue one.
We project the blue one onto our image plane.
We know how to do that with a projective matrix.
And then we find the pixels within that triangle and rasterize these pixels.
That's what we learned up to now.
And then we process the next triangle.
We project it onto the screen.
Forget about the 3D version and rasterize the 2D version.
And the set buffer tells us which pixels are in front, which overwrite the blue ones, and
which not.
OK, that's how we generate our pixels.
And you see the outer loop is for each triangle.
And then in the inner loop for each triangle, we find the pixels inside.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:30:08 Min
Aufnahmedatum
2019-12-09
Hochgeladen am
2019-12-15 23:29:04
Sprache
de-DE