You are viewing the course site for a past offering of this course. The current offering may be found here.
Lecture 6: Rasterization Pipeline (14)
austinapatel

Intuitively it seems like between consecutive frames of a video game, the relative Z depth of objects likely is very similar to the last frame of the game (with perhaps only a few differences). Is there any way to leverage this fact when rendering consecutive frames, or is everything recomputed each frame of the game?

vhlee7

If multiple triangles have the same z value, how does the algorithm choose which triangle's rgb to use? In this pseudo code, it looks like it will just use the first triangle it reads.

chetan-khanna

Are there any performance optimizations we can make here? I suppose quite often there we will be dealing with triangles situated on an object in a scene that will have relatively similar z-values. Let's say we're in the process of drawing one of these objects, and we've already seen that some of the z-values are larger than the min value for the corresponding (x,y) points in the Z-Buffer. Would it be possible to skip some the checks for some of the neighboring triangles on the same object during rasterization?

Staffethanweber

@chetan-khanna, that's an interesting question. Later in lecture, we'll talk about acceleration structures for ray tracing, which may get at the ideas you are mentioning. We can use hierarchical bounding volumes to group objects and restrict our search to triangles within these volumes. That being said, maybe there are additional techniques like the ones you are thinking of.

pinkchihua

If we were in a 3D world and we were rotating our view point, do you essentially use this same algorithm for x and y? Like if we were turning the view point around the y axis, would you need both z and x depth buffers to see which objects are closest to the view point on those planes? Or is it always just dependent on a z depth and you never have to consider two variables at a time when converting 3D to 2D?

Staffjamesfobrien

If multiple triangles overlap with same depth then you get an artifact called “z fighting”

You must be enrolled in the course to comment