[Open-graphics] What I think is needed.
Nicolas Capens
nicolas_capens at hotmail.com
Thu Dec 2 18:05:00 EST 2004
Hi Timothy,
> Apparently, there are ways of getting around that, but we get back to the
> patent issue. In order for this design to be unencumbered, we're going to
> have to make some sacrifices.
There are sacrifices you don't want to make, and patents you do want to
break...
> I don't have formal training in signal processing, but if I understand the
> question right, the answer is obvious. If you have a sample rate of N per
> second, then the highest frequency you can represent is one where the
> samples alternate between two numbers (0, 255, 0, 255...), which is half
> the sample rate.
>
> Now that I think about it, if you were to exceed that, I think you'd get
> some sort of reflection in terms of the input signal versus what you can
> get back out, relative to the maximum frequency you can represent.
Your reasoning goes into the right direction, but I think you do want to get
some formal training in signal processing...
> You're going to have to be more specific with your question. I don't
> think I understand it. However, we do have serious problems associated
> with the fact that we have a fixed, rectangular array of pixels, and as
> you scale things up and down, you get weird artifacts.
I'll just give you the answer, in formal signal processing theory. 3D
graphics uses bilinear filtering for texture sampling. That's a tent filter.
That's not a very good approximation of the optimal sinc filter, but it's
fast. Because it is limited in width, you'd actually need an infinite number
of samples to get a good result. But that's obviously not feasible. The
specifications still require Nyquists rate, because taking less samples will
result in much worse aliasing problems.
Lately, NVIDIA got a bit of critique because it was following the
specifications so closely. The competition does a bit of over-sampling
(sacrificing performance). But the problem really only appeared when
applications used a negative mipmap LOD bias, forcing the use of higher
frequency mipmaps. This creates aliasing on current NVIDIA chips sooner than
on ATI's chips. Either way, the problem is on the application's side...
> Here's a challenge for YOU:
>
> We are all taught how to compute affine transform matrices. We know how
> to compute a rotation, translation, scale, or skew matrix. We know how to
> combine them. But that still leaves the matrix as a black box of 16
> numbers that you're supposed to perform some algorithm over.
>
> The challenge for you is, what do the numbers MEAN? Specifically, explain
> the meaning of each of the four columns. The meanings can be explained
> briefly in simple language.
I prefer the mathematical standard of pre-multiplying the matrices. With
this convention, the rows represent (homogeneous) planes. When computing the
dot products, we get the distances to these planes.
> Next, we know that the lower right corner is supposed to have a 1 in it,
> in part because the identity matrix has a 1 there. But that's the lame
> answer. Explain why the bottom row has the numbers it has.
That depends on the transformation. But I'll assume an affine
transformation. Then the last column has to be of the form [x y z 1] and the
last row [0 0 0 1]. The one is required because 4D vectors project to 3D
vectors using (x / w, y /w, z / w) and when w isn't kept 1 this introduces
an extra scale.
> Finally, in a homogeneous coordinate, explain the W value. Explain what
> it is when the value is zero. Explain that it is when the value is 1.
> Explain what it is when the value is something else.
Homogeneous coordinates are exactly what they say they are, homogeneous. For
example the 3D plane equation A * x + B * y + C * y + D = 0 plane equation
can be homogenized by using a fourth coordinate: A * x + B * y + C * y + D *
w = 0. Essentially it's about simplifying the math because the plane
equation has now become a dot product with very interesting algebraic
properties. From the projection formula we can see that when w becomes zero
it represents a point at infinity. When w is one the homogeneous coordinates
just map to 3D coordinates.
Ok, my turn again. :-) How many mathematical operations (addition and
multiplication in particular) are required to compute the distance of a
homogeneous point to all six frustum planes, assuming an optimized
implementation, not counting any matrix operations for change of base?
Cheers,
Nicolas
More information about the Open-graphics
mailing list