Welcome for Computer Graphics.
We are currently looking into lighting computations.
That is, we now don't compute colors on objects from attributes or something like that.
We don't do that where colors are directly given, but we make really something like a very simple light computation.
That means given us some light sources in our scene, typically one point light source or maybe also a parallel light source.
And then by described by material parameters, we have a material model that describes how this light from this light source is reflected towards the viewer.
This gives us a shading on the object and the impression that we see an object as we know it from the real physical world that is illuminated by lights.
And we were looking at the probably most basic lighting model, the Fong lighting model, which is not very physical based.
But yeah, it works good for different sorts of objects, mainly those that look like plastic.
But it's a kind of standard in computer graphics and very widely used.
And it has three components ambient light, which is just a constant that models all the indirect light in a scene that cannot be computed by this very simple lighting model otherwise.
So it's a kind of constant offset so that we can also see the dark side of objects, for instance, that otherwise would be completely black.
Then we have a diffuse part and a specular part.
And the diffuse part is physically based.
And we see an example here.
So the diffuse part only depends on the angle between the light source and the normal.
And yeah, it is just controlled by the cosine of the angle between the two.
And this cosine can be computed by the scalar product between n and l if both are normalized vectors.
So that one is very simple to compute.
It's independent of the view direction.
So it's the same from whatever direction we look at the object.
And if we only use that diffuse term, we get some shading, but the objects look very soft.
Yeah.
And they have a very, very special look.
But it's the first simple shading model to use diffuse.
And later on, we were also looking at specular reflection.
And the idea of specular reflection is that the surface is much more mirror like, but it has some roughness, some microscopic roughness, which we don't see at first sight.
Or if we look at it macroscopically, but microscopically, it has some structure.
And so it doesn't have a perfect reflection, but a blurred reflection.
And this blurriness is computed in the way that for every point light source, we compute the reflection vector, the perfect reflection.
And then like here, and then for a particular view direction, we measure how far away are we from the perfect reflection direction.
And so the model is that in the perfect reflection direction, we have a kind of maximum brightness.
And the further we get away from this maximum reflection direction, then the reflection is reduced.
And this is modeled in the way that we measure the cosine between r and v.
V is the direction to the camera.
And r is this perfect reflection.
We measure this angle or compute this angle.
And it's cosine.
This cosine is one.
If we are perfectly in the reflection direction and it falls to zero, the further we get away.
So that's exactly what we want.
But normally, we want the fall off to be faster.
So we also take such an exponent, n.
And with this exponent, we get something like we can see here.
So for instance, this green curve describes a fall off for an exponent of 10.
And this is a realistic value that we normally have.
So that says in perfect reflection direction here, we have maximum reflection.
And the further we get away, it falls off.
It almost looks like such a Gaussian curve.
But in fact, it's just cosine to the nth.
Presenters
Zugänglich über
Offener Zugang
Dauer
01:31:30 Min
Aufnahmedatum
2019-11-14
Hochgeladen am
2019-11-18 13:09:02
Sprache
de-DE