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

I would wonder if there is a more efficient way to approach calculating the ray intersections for all of these objects. Perhaps if we calculate the z depth earlier in our rendering pipeline, we could then only worry about objects that we know are in view compared to objects or parts of objects that are hidden or only partially in view of the current camera projection.

youtuyy

The cost of ray casting is the cost of the intersection algorithm. Each object should be checked in the recursion step until a hit. To expand on the above point, if the z depth values of objects are known and sorted, we can then check less objects when we know they are hidden. Perhaps we can also skip checking for objects that are obviously too far away to reduce computation.

kavimehta

I wonder how many orders of magnitude of computation are saved by limiting ray-casting based on z depth (as suggested above). With heavily layered scenes, this would reduce computation a lot, but in simple scenes it would hardly make a difference.

kavimehta

I wonder how many orders of magnitude of computation are saved by limiting ray-casting based on z depth (as suggested above). With heavily layered scenes, this would reduce computation a lot, but in simple scenes it would hardly make a difference.

peterqiu1997

Following up, I wonder how limiting ray-casting based on z depth would work for transparent objects/objects that may refract light? We wouldn't be able to forget about them, and it might even add additional work.

go-lauren

@peterqiu1997 That's a really good point! If we have to consider light refraction or reflection, with the recursive ray model it would be equivalent to considering a new eye point, which would mean we would have to sort the z-buffer again starting at this eye point, so it would add a lot of additional work.

fywu85

Speaking of the recursion, generally what is the minimum depth of recursion required to generate realistic ray tracing? Is the depth dependent on the characteristic of every specific path? That is, do we do more recursion for complicated scenes and less for simple ones?

You must be enrolled in the course to comment