Lecture 3 : 2D Rasterization
Download as PDF

Chris

In this slide the samples per pixel are each in neat rows but in actuality the quality of the image is increased if the samples are jittered. But this raises the question of how jittered the samples are vs how many samples are taken. Is it better to have fewer samples that are very highly jittered or is it better to have more samples that are more ordered/less jittered? Is there a way to find the optimal balance in order to get the best quality image while taking into consideration performance issues?

mmp

The lectures on May 2 and May 9 will finally dig into this topic; by the end of them, you should have lots of answers to this question.

(At a high level, for a given number of samples, 'jittered enough to spread them out but not enough to make them clump together' is the best--we'll see ways to talk about this tradeoff more rigorously then.)

In rendering, the time to compute the positions of samples is almost always dwarfed by the time it takes to evaluate the value of the function of interest at a given sample position, so it's almost always a win to use "good" sample points. You are right to be thinking about it in terms of quality for a fixed amount of computation time, though--if sample generation time was actually high and prevented taking as many samples as less well-distributed samples, the trade-offs would be different....

Tianye

Since e0, e1, e2 are projected from the 3D model, I think the orientation of the front facing faces are maintained while the orientation of the back facing faces are not. So about the orientation of e0, e1, e2: do we need to justify it before each rasterization or is there somehow a guarantee of the correct orientation after projection?

Tianye

Ah, I guess we don't need to rasterize back facing triangles...

Tianye

What would happen if we simply hit line twice? Will there be some kind of artifact or just a performance issue?

mmp

The main concern for a double-hit is if the triangles are partially transparent; in that case you'll get two hits and thus that sample can come out with a noticeably wrong color. (It's a rare enough case that the perf. impact should be pretty minimal...)

clemire

It would also be pretty weird if your final image could be changed just by changing the order in which triangles are processed, even if the triangle positions/geometry were to stay the same.

Tianye

"split/cull ensures no triangles spanning z=0" does this mean the micro polygon is small enough that it's either fully visible or not, so that we don't have to worry about the clipping of each micro polygon ?

clemire

In the Reyes paper, they talk about how, if an object passes through the both the near plane and the z=sigma (where sigma is close to 0) plane, then the object cannot be diced - it must be split. This way, an object is never diced if it is both in the image and crossing the z=0 plane. Thus, any object that does cross the z=0 plane will be culled before it reaches the dicing/shading stage.

mmp

To add to @clemeire's fine explanation: this is an area where Reyes theory and practice can get messy. Consider a camera low to the ground and moving forward rapidly--there can very well be some grids/micropolygons that are both visible (in front of the z=hither plane) during some of the time the shutter is open while also being behind z=0 for part of the time the shutter is open. Continuing to split does no good for these.

The upshot of this is that the Reyes renderer generally has to just give up splitting and discard those grids, which in turn can lead to image errors.

See Section 1.5.1 of this PDF for some more info.

Chris

Is transparency needed for this sample image of the creature in the grass? Because technically you shouldn't be able to see through any individual blade of grass and the creature should only be visible through the gaps in the grass which could be handled through normal occlusion culling. Or is there something I'm missing?

eye

I think the transparency is to help with anti-aliasing, like what Matt described with hair? Since the blades are so thin, the hit tests can miss them and you don't want just jagged edges/chunks missing where green pixels aren't being rendered. In that case, you can see the creature because the grass is supposed to be thin/scarce enough to see through.