You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 9: Raytracing (13)
nebster100

I'm a bit confused about how a shadow would be used in terms of coloration. I understand how the ray tracing yields the shadow, but how do you determine how the shadow affects the coloration of the surface? Would this just be an additional type of shading?

kevkang

I'd imagine you could assign an alternate texture?

kevinliu64

I would image that for shadows it would be much like linear interpolation for sample colors. There would be some certain color that a shadow casts, but the actual weight of the color would depend on some sort of calculation that involves the angles of the ray and distance from it.

SeungjinYang

Hm, it seems like ray tracing can take the position of (perhaps multiple) light sources into account when rendering the image. Is there any procedure in rasterization that can also take into account light sources?

henryzxu

According to this stackexchange post, it looks like primitive lighting of the scene can be achieved when using rasterization by running a fragment shader once for each light source. There isn't a "ray traced" per se, but the combination of fragment and fragment shader should have enough information to calculate all the data that would be presented by a ray. At the end, you can just sum all the results from each run of the fragment shader to get an equivalent result to a simple ray tracer.

The issue is things like shadows won't be captured if lighting is calculated in this fashion, so preprocessing steps are employed to further add realism--the linked post gives a pretty explanation of shadow maps, which involves precomputing the depth buffer from the perspective of the light source.

Finally, it looks like there are definitely more complicated rasterization techniques that include lighting--this paper goes into a modification of multi-view rasterization for soft area lights. In the end, the paper does mention using ray tracing as its viability matures, so it looks like there are still unresolved limitations to rasterization.

letrangg

How would we decide at which angle the transmission ray and the reflection ray bounce off the object into the light source? Is it something from the previous lectures where we learned about shading and reflection?

sphindle1

@letrangg, I don't think he's gone over this topic, but here's a helpful link explaining the physics behind light reflection over both flat and curved surfaces: http://physics.bu.edu/py106/notes/Reflection.html

hilary217

how much does the intensity of rays decrease in each reflection ?

You must be enrolled in the course to comment