Outline for Today
Sampling and Assignments
Administration
Today
- gaskets (and tetrahedra)
- Assignments 2, 3 (and alternative project)
- sampling
For Next Meeting
Wiki
Link to the UR Courses wiki page for this meeting
Media
Transcript
Audio Transcript
-
Okay, so since I didn't
have the recording on right
-
away, so I want to talk about
sampling and the rest of the
-
assignments, so we'll look at
how to construct, sir pin ski
-
gaskets and tetrahedra. Look at
those assignments, and then talk
-
about sound.
-
So I created an image here, and
-
anything you notice about the
image?
-
The circles are pretty loaded,
yeah,
-
I suppose
-
I are they bigger than they need
to be? So if we think in two
-
dimensions and
-
so we have a circle, a unit
circle at the origin, and then
-
an equilateral triangle and
-
is inscribed inside the circle,
so When we translate to the Vert
-
towards the vertices and
-
I'm not doing a good job. Okay?
-
So they should be touching,
-
but not overlapping. You
-
Does that make sense? So Do
-
Yes, here they're overlapping. I
-
so what I did in this image was
I, I made
-
an object instance that's
floating in front and not to the
-
top, and then I transformed that
three times to make the shape in
-
the background upon which the
shadow is being cast and
-
it missed opportunity to call it
that scare ginsky gasket. I
-
so you can have that.
-
So the way I've set up the pbrt
file is I'm looking that I
-
position is two and y looking at
-
so we're just x is zero, y is
two and Z is zero, and looking
-
at the origin, was the Z vector
being the up direction.
-
So this is all COVID From the
simple pbrt. And then I'm
-
including gasket dot PBR key,
which defines the instance
-
called gasket. And then I'm
scaling
-
I'm trying translating the
object three times, and then I'm
-
just after that, I'm translating
once more With the original,
-
with the original instance, not
scale
-
So this is what the gasket
object looks like.
-
So it's material, diffuse,
material translate, and we're
-
scaling well. We say the sphere
has a radius of point 03125,
-
so I believe There's 240 43
spheres. I
-
I have a little piece of code
here. Let me show you where it
-
is on
-
the website and
-
so I didn't do very well with
documentation. Sorry about that.
-
So we're doing, I'm defining a
function gasket that will take a
-
level so it's, it's recursive
function.
-
So if level is greater than
zero, we're going to call the
-
function with the image
-
of the
-
of the point that we start with.
And so in our case, the original
-
point is 000, because that's,
that's this point here. And
-
and then I'm
-
outputting the details.
-
Nothing so
-
if levels gradients are up
calling it, I'm recursively
-
calling it with each of the
three transformations for the
-
vertices that correspond to the
vertices of the triangle or the
-
gasket. And if I'm at the leaf
node, then I,
-
then I print, then I Do the last
transformation and print out The
-
scaling. So
-
Did That make sense? I
-
CS Third Way. The details of the
transform of the program are in
-
this last little bit. So we
defined three transformation
-
matrices so we scale from the
coordinate of the vertex to the
-
origin, and then we scale by a
half.
-
And then we scale, or translate
back to the from the origin to
-
the sent fixed point.
-
Okay,
-
and then so we do object begin,
and then SP is a starting point
-
which is 000,
-
and then we say starting point
identity matrix, and then we're
-
giving it five levels. So I did
this. There's room for
-
improvement in the code, but
gives you an idea of How it can
-
proceed. I
-
so we start with zero, then We
have the sphere, The unit
-
sphere, I
-
I'm curious why It's good. It's
taking so long. I
-
maybe it's too close. The eye
point is too Close. We'll see. C
-
I,
-
that's A bit too close. I
-
too far away. Let's Try That. I
-
click theory is going To be too
Large. I
-
so it won't be very easy To see
the Initial sphere, but do
-
It looks like they're really
stuff in there, doesn't it? But
-
it seems to be correct. I
-
so the problem is with My
diagram here, Isn't it? I
-
should we try? Let's try another
intermediate size. Should have
-
added a command line argument
for This. I
-
i was expecting the spirit to be
still a little more visible on
-
the other side. Is there? Do I
See it? This time? I
-
Okay, that's two. One
-
More, 1010.
-
So I think it's retracting from
the sphere, because I just did
-
approximation, and I did four
decimal places of the
-
transformation.
-
Okay, does that make sense? Is
that helpful? I
-
so how do we make a tetrahedron
out of this? I
-
Are we able to, like,
instantiate points and stuff
-
like that? Because I know how to
do it with just points, but with
-
spheres, you'd have to, you'd
either have to, again, use
-
points, or you have to start to
collate the faces.
-
Can I meet? You're a little bit
over complicating this. So how
-
do we get a tetrahedron instead
of a triangle,
-
three extra, you'd have to do a
-
transform on the other like you
do the one, and then you would
-
have to do a trend, basically a
duplicate of it, but that
-
duplicate would be overall,
transform to
-
be different. How to position
different? Appear to be
-
different, position differently
so it would come out. Basically
-
your object space
-
would be slightly different
transformations.
-
So how about it? So what do we
have now to make this triangle?
-
We got to replace all those
spheres with the littles, except
-
we got to make it three
dimensions, because it's still
-
only one dimension or two
dimensions.
-
Now, yes, how many
transformations are we using to
-
make this triangle? Two
dimensions, three?
-
So how many transformations do
we need to make a 3d object
-
form? Yes.
-
So we can think of the triangle
being in the sphere at the
-
try not To confuse this. So this
is just too deep. I
-
and then at this point we have
-
triangle. And then we want to
put the other transformation
-
there,
-
but At the Top we're
-
I'm sorry I wrote that so small.
So the fourth transformation is
-
at the center of the triangle at
a different height.
-
So that means we can have, so
this is one triangle here, and
-
then we have another triangle.
And
-
so both triangles one and two
and three and four.
-
So if we just take the triangle
and copy it. You get the right
-
side looking properly bussing,
but
-
it wouldn't have the interior
structure. So that's why we're
-
iterating with four
transformations instead of
-
three. Does that make sense? So
what are some other ways you
-
could instead of using spheres,
how could we describe the
-
tetrahedra shape the serpent ski
tetrahedra He drawn
-
triangles.
-
Yeah, we Could do triangles,
cubes, oh,
-
here so we can define
-
the shape and then transform it
instead of A sphere
-
How About cylinders? I
-
or you could do boxes as well, I
guess so. Originally I did
-
spheres.
-
One is 35 years old, and
-
if you do cubes, you might have
the opposite problem, where
-
there's gaps and they're not
actually touching, just because
-
where the points are around the
cube. I Right? Because, maybe
-
not because the triangle, but if
we actually use the triangle,
-
there would be the height would
be less than the width, so you
-
end up getting like, so you have
to, like, sort of account for
-
that little gap and you face
together, so maybe you wouldn't
-
have that same cubic gap. It's
like the soft mother triangle is
-
smaller than the width of the
side. All
-
the lengths are the same. All
the sides are the same
-
length, but the interior height
is different than that side
-
length. You have, I think, root
three for a length of two, and
-
then the height of the pyramid
is root two. I've done all these
-
calculations already because I
made it out of points. So
-
points. So then it's, it's easy
to do points instead of spheres
-
instead of points, because we
Just placing this under the
-
sphere at the point. Okay?
-
So is 10 levels of recursion.
Much
-
it gets a little worried. I
-
so what do we see? Let me zoom
in here. I
-
blurring surface key. That's
good. I
-
What was your answer?
-
How did You describe them first?
Oh, okay. Do
-
so we have jagged edges from
aliasing. I
-
So where we have,
-
where we have blurring. When we
look at the image at Greg,
-
intended resolution. We don't
see this. I
-
It looks fine there for that
resolution, but once
-
you hit so many recursions, you
can't really see the next ones
-
anyway, regardless of what
-
resolution. So 10 is probably
too many, because you get to the
-
point where you just can't see
the recursion anymore.
-
Yeah. So there are a couple
ideas here
-
the larger screen. Do
-
so,
-
so we see a staircase effect,
but also the different colors of
-
the pixels indicate
-
that we're
-
applying some anti aliasing here
to compete. The blur is it's
-
compensating for the AVIC And
-
so question is, what size is
sphere? I
-
so that question makes sense, so
what? How big a sphere do we
-
need, so that we're making the
most of our display, but not
-
adding
-
adding extra detail that, what
kind of can we think of an
-
expression to or attest to
-
do that I use,
-
like a radius of half the
-
height short, yeah, Okay, so
Let's Say you
-
so what are the world
coordinates that we have In this
-
image? And
-
so We can figure out what
-
how much world how much spaces
and world coordinates in the
-
image, and We divide that so we
figure out how much we
-
how Much of that space is
covered by A Pixel i
-
So conceptually, as we find out
how much world space is being
-
covered by a pixel, and then,
-
and then, we find the
relationship between the size of
-
the sphere and the size of the
pixel and
-
so should the sphere be the same
size as The pixel, or should it
-
be half as Big or
-
so I went to lead This into a
discussion about sampling if
-
I so we think about it in terms
of a signal. How
-
many samples do we need to take
to reconstruct that signal?
-
Does that question make sense?
-
Let's think about CD audio,
compact disc audio. You still
-
familiar with compact discs?
-
Okay, yeah,
-
is that what C stands for? Yes.
Oh, yeah, well, oh, good God,
-
the answer
-
might be all
-
over. I mean, I knew the Fauci
so just didn't know that what CS
-
stand
-
for, yeah, I once asked somebody
what an LP was. This is a few
-
years ago, and someone and they
said, LP, it's a lumbar
-
puncture. They said they were
watching house at the time, if
-
you remember that show. Anyway,
LP stands for long play, 33 and
-
a half third revolutions per
minute on the turntable. Anyway,
-
I digress a little bit. See
-
answering machine all over
again. I
-
so this CD audio standard is the
sample at 44.1 kilohertz.
-
Can people hear up to 44.1
kilohertz.
-
They tried really hard.
-
Most People can hear around 22 i
-
So have you ever heard of
Nyquist?
-
Sometimes it's also, have you
heard of Shannon Claude Shannon?
-
Anyway? Sometimes it's referred
to as Nyquist Shannon, but in
-
the text, it's called Nyquist.
So Nyquist, the Nyquist sampling
-
rate is the rate we need to
reconstruct the signal. So if we
-
sample it at twice the highest
frequency, then we can
-
reconstruct the sound, or you
can reconstruct a signal. If
-
it. So there are a couple quiz
questions here that we can bring
-
In
-
to Review And
-
I so there is a question, Is it
useful to think of pixels as
-
squares, true or false? Anyone
think it is useful? So I said,
-
covered by a pixel. So I'm just
thinking about the area that
-
we're sound from which we're
drawing samples. So there's no
-
geometry with the pixel. The
value we compute for the pixel
-
is a sample, and if it's seen
with the ray tracer, we might
-
have more than one sample per
pixel that we average together
-
to come up with the value that
we assign to that the image
-
pixel. So
-
So Elvie Ray Smith, who was at
Pixar, I believe, made an
-
emphatic argument for pixels not
being squares. That was back in
-
1995 I think so that reference
is only 30 years old. So
-
so why don't we just increase
the number of samples per pixel
-
when we're ray tracing?
-
At some point, you're going to
be just taking way too long, but
-
you're also not going to be
seeing any gains from additional
-
sampling.
-
So yeah, so as we take more
samples, the time goes up and we
-
get better images, but there's
still noise in them.
-
So is there if we didn't have to
worry about the time? Let's say
-
we had a super duper computer
that made that first point not
-
so important. I
-
Is there a number of samples we
could take that would say, Okay,
-
Well, this is enough to
reconstruct the image.
-
Yeah, I
-
try that one again. I'm
-
so the Nyquist works in the
audio case because people can't
-
hear, generally people can't
hear above 22,000 hertz. So that
-
gives us a limit on the
frequency that we need to
-
reconstruct get the signal of
the audio. But in the case, when
-
we have things in computer
graphics, if it's we may not be
-
band limited, So that means we
can never take enough samples. I
-
CS, does That make sense? I
-
I said, Yes, where do you get
the signal?
-
Or reconstruct is
-
not band limited. So if it's
not, if there isn't a maximum
-
frequency that we can double the
i
-
Okay, and So about the
assignments
-
I've linked up things, so
there's a place to get a
-
description, and I'll work on
bit more detail for the
-
descriptions,
-
but they're there in your
courses, and they link Back to
-
my website,
-
so I'll film the details, but
the idea is linked to A small
-
version of the Web of The
picture. I
-
it Okay, so keep on filling them
in. Well, it won't be a
-
continual process, but I'll get
more detail. So I fixed the
-
links and by Tuesday, well, we
can discuss final versions of
-
the assignment with the rubrics
and so forth. Does that sound
-
okay? So they're both. The two
assignments are due on April 8.
-
Cut off date will be April 15.
-
Okay, so we're out of time.
Thank you for today. You
-
does the did that? Exploration
of gaskets and pbrt help clarify
-
some things, very polite. And
let me go on about that. I think
-
you're all very polite anyway.
Anyway, thanks for today. Have a
-
good weekend. See you on Tuesday. Bye.
Responses
No Responses