Mtg 7/26: Tue-28-Jan-2025

Outline for Today

Geometry and Transformations

Administration

Today

For Next Meeting

Wiki

Link to the UR Courses wiki page for this meeting

Media

Transcript

Audio Transcript

  • How's everyone today?
  • Good?
  • So I've tried To take the feedback. I
  • so I've specified chapter four, section one, and I have a link
  • to that for next class reading, as well as the PBR key version
  • for User's Guide and PBR key version for file format the
  • so a word about assignments. Since I said I'd talk about them
  • this Week, I
  • so there were 30 marks and
  • I think that adds up to 30.
  • Oh, I didn't.
  • So the first one will be to familiar, familiarize yourselves
  • with pbrt Making some,
  • some simple, some straightforward changes to the
  • example input file that generated the sphere floating
  • over the checkerboard and
  • is there any interest? So I see the second and third assignments
  • about Gen dealing with generating more complex images.
  • Is there any interest in providing an option to instead
  • of two and Three, do
  • Some implementation And
  • it. So I'm thinking option C,
  • so we're not putting all your eggs in one basket.
  • I'll make a choice on your courses for this. Does that any
  • discussion about this to begin with? Yeah, explain what that
  • option C is. A
  • bit i I'm thinking to give you a bit more variety of
  • opportunities to get marks so so this isn't weighted as much,
  • yeah, so do a variation of assignment of one of the bigger
  • assignments, two or three, And then the implementation is worth
  • a bit less. I
  • okay So I Will. I
  • I thought I had a bigger version of this. I
  • it. Usually, if you open it in a new tab, you can zoom in on it.
  • So this was done before 3d printers were really a thing. So
  • this was done with a program called Ray shade, written by
  • Craig Cole and
  • he was once considering doing his PhD at the University of
  • Regina,
  • thinking he went to Stanford instead. I
  • anyway, so one of
  • one of the assignments will be to take that shape and
  • reinterpret it. Take this image and reinterpret it. I
  • I don't know how many hours it took to compute this. I don't
  • recall, but it would not be long. Would be a few seconds
  • These days, I'm sure you
  • Does that seem okay. I'm
  • okay, let's Talk about The quiz. I
  • spherical ordinance and
  • yeah, octahedral encoding an equal
  • area mapping,
  • an equal area. So what about spherical coordinates. So it's a
  • nice representation, but if we're going to there are some
  • drawbacks, because we there's distortion of the poles. And if
  • we want to think about set uniform sampling using that
  • parameterization, we'll get A we'll get a
  • very equal distribution of points I
  • So the reasons are talking about octahedral encoding as a way to
  • be more efficient in terms of storage and
  • I've Never tried to draw an octahedron on the board.
  • And How does that look? I
  • so the idea is, we're going From the top, we're going To do
  • so this I'm
  • this is the upper part, and then we Fold out The bottom and
  • and the equal Area mapping
  • is a way to the
  • Instead
  • of I'll bring up the picture
  • here. So I'm just curious, is anyone able to click on the
  • links to the pictures and actually have something show up?
  • What are you using for a browser? Yep, fireproof. I have
  • them on Chrome. You're
  • just talking about big in Chapter pictures, right?
  • Yeah. So there, let me see,
  • there was An open image In your tab. I
  • I wonder
  • what the problem is. Anyway,
  • It's good to know you're still not numbered. The way they
  • advertise. I
  • So the third prioritization. So the idea is we're Taking the
  • unit square and we're
  • so we create the mapping from unit square to the unit disc,
  • and then we can
  • so we do the mapping so that we're preserving area, and the
  • points on the disk are mapped to the hemisphere for
  • so here's a link in the text to an appendix talks about sampling
  • a unit disc.
  • So this is about the spherical prioritization of spherical
  • coordinates. So we get a using that parameterization, we get a
  • collection of points at the pole, at the center, so we're
  • not getting uniform distribution over the whole disk. We're
  • so a correct map, it gives uniform distribution of light.
  • So I
  • So what about the Class, direction, code?
  • Oh, God. That direction from that's the it's similar to what
  • we talked about yesterday, when, when light rays are popping out,
  • it calls them right away, so you don't have any calculations on
  • them. So it keeps them sort of like in A spotty direction or In
  • the Correction direction. Yeah.
  • So then we can
  • bound the directions so that we know that we're going to do.
  • Using to reduce complexity. So here's something about the
  • constructor for the direction cone I
  • here for finding an angle then, so we want to create the
  • directions we so we can create a cone. So we have a point, p and
  • a bounding, in this case, a sphere. So we want to determine
  • the size of the cone that includes the directions here, so
  • we have point P and then the center of The sphere. And
  • so this is u of R equals one. So
  • so the idea is, we get, we can find the cone, which will
  • include the directions from point P and including that
  • bounding sphere and
  • so then we can look at whether these bonding cones, these
  • direction cones, are included in One in the other. So we can
  • simplify our calculations that way.
  • And similarly, we could take cones that are not inside the
  • other but we can Find a new cone that bounds both of them and
  • so what are two interpretations of the matrix transformation
  • in Frame and Frame too frank, yeah, That's right. You
  • so within frame means we're describing how points are points
  • and geometric objects are positioned within the same
  • frame. In that tetrahedron, example, had a bunch of spheres
  • that were transformed to create that shape. And then so that's
  • within frame and between frame
  • that's like when we're setting up the camera. So we specify an
  • arbitrary position for the camera, an orientation, so then
  • we can set up.
  • We can set up a matrix to go from the world coordinate frame
  • to the camera coordinate frame. We
  • and we'll talk about that.
  • So homogeneous coordinates and so we have a fourth element to
  • our vector. Instead of x, y and z, we have x, y, z and w.
  • So that w is generally one and so you can see in the textbook
  • to talk about making things more efficient
  • by omitting the division by W in some cases. So it's really the
  • projection, the projective transformations, that we'll be
  • talking about chapter five, that's the case where we need to
  • be concerned with W and do that division and
  • so what's the benefit? What's a practical benefit of using
  • homogeneous coordinates for Lyd geometry? I
  • You're asking. What's the point of keeping that last bit? Is
  • that what
  • you're asking? Well, I has
  • to do with multiplication. For instance, if you want to, if
  • everything is on zero, then you won't be able to save whether or
  • not it's scaled to a certain degree, and it will just kind of
  • ignore that bit. It's just a way of returning everything back to
  • its origin. I can
  • you explain that a bit more?
  • If you take a shape and you perform a bunch of
  • multiplications on its dimensions, so it's like three
  • times bigger. That last bit will give you the ability to divide
  • it by three. It sort of is. It will remember that was sort of
  • multiplied by three, and it allows you to say, Oh, this
  • thing is scaled by three. You could tell, by the way, the
  • weight variable is three, for instance.
  • Ok. So if you want to scale by 3x, Y and Z, I,
  • so if, if this last entry, it's a three as well, then It's, it's
  • really, this is Really the identity matrix.
  • You so we're talking about three dimensions here, so x, y and z,
  • and this last column is the so we can think of these as as the
  • basis vectors for our frame, and this is the origin i
  • Okay, so I
  • so we're representing three dimensions. Why is it a four by
  • four matrix and
  • well, because we have
  • x, y, z and w, I, I
  • so let's do some multiplication on the board. This is shout out
  • when I make a mistake, although this is pretty straightforward,
  • so we have three times x and nothing else i
  • three times y and nothing else, three Times said and nothing
  • else that we just Want. Nothing
  • so let's say w equals one. I'm
  • so that's the scaling.
  • What if we want to
  • what if we wanted to move the point as well, instead of just
  • scaling it, I
  • it. That's like the last column on
  • the right. Yes, so if we just have,
  • if we have three by three matrix, we have 3x
  • reduce the multiplication We
  • so if you want to translate to 123, and
  • so we're doing not just the multiplication, But we're doing
  • an addition here. So if we If
  • here We get i
  • so we get the addition just by the matrix multiplication. Does
  • that make sense?
  • Any questions or concerns about that? I
  • Okay, so there's a translation matrix that we just talked
  • About.
  • So there's a distinction here, applying transformations to
  • points and to vectors. So w equals one is a point and a
  • vector w is zero because we can think of a vector being defined
  • as The difference between two points.
  • So x1, y1, z1, one. And
  • so x1, minus x2, y1, minus y2, z1, minus z2, and then one minus
  • One, if equals zero and
  • so if vector, we have the W set term equal to zero, then we
  • don't get in
  • the get in these terms, because the plus one is because of The
  • one here.
  • So 3x plus zero, y plus zero, z plus one times zero, so that's
  • zero.
  • So the translation affects points, not vectors. Does that
  • make sense? I
  • it. So we can do a scaling where it's uniform, like we did here,
  • or we can assign different values for each term so they
  • have a function as scale to determine whether there's a
  • scaling component in the transformation. And so they're
  • testing the the length if it's greater, if the difference in
  • length after the transformation has been applied is greater than
  • A tolerance.
  • So then we have rotations as well.
  • So if we rotate around the x axis. So we can see the first
  • column is just what we'd expect. It's it doesn't do anything to
  • the x coordinate, it just multiplies the x coordinate
  • value by one, so it leaves it unaffected.
  • So Y and Z axes are changed. So base take the cosine of theta,
  • the sine of theta, that's how the y axis is transformed, and
  • then minus sine theta, cos theta is what the that access becomes
  • so.
  • So we're combining X and Y or Y and Z values with cos and sine
  • functions and
  • so the x coordinate stays the same, and we have Y And Z here,
  • and then we see the rotation I, a theta.
  • So here, for rotating around the Y axis, the Y column is the
  • identity, so it's unchanged. And for the Z axis, Z for rotating
  • about the z axis, the z coordinate is unchanged, but
  • then the X and Y are modified by those trig functions.
  • So we can rotate around an arbitrary axis and
  • so a is the vector we want to rotate about, and V is the
  • vector We'd like to rotate about that
  • so we find
  • V c by projecting v onto a, and that's the dot product. So
  • so one vector we can determine by subtracting V from
  • subtracting V C from V so that's v1 and then v2 you can take the
  • cross product v1 and a, a is normalized, so v1 and v2 have
  • the same length. And and then we can compute the angle and
  • so we can convert that into a matrix. Here's part of that,
  • that transformation in matrix form we
  • I can also rotate one vector to another. And then I just want to
  • talk about the lookout transformation. I
  • so we can specify Camera Orient, position and orientation and
  • so sometimes we get, we have one vector here, defined by the
  • difference between the look at and the i point, and we have the
  • vector from the up, and we do a cross product, and then we get a
  • third vector.
  • Then here they re compute up by doing a cross product so that If
  • well. So to get an ortho orthonormal basis, I
  • it. So I just wanted to point out in the last minute here that
  • we have that we were transforming normals. So if we
  • scaled the circle to be half as tall in the y direction, then we
  • think we're doing the right thing in B to get the normal to
  • transform the normal, but we've lost the property that normal is
  • perpendicular to the surface, so we need to do a bit of work to
  • handle the transformation of normal vectors.
  • So the takeaway is that normals must be transformed by the
  • inverse transpose of the transformation matrix, And
  • that's our time for today.
  • Any questions or concerns.
  • Thank you for today, and if you're doing Wiki pages, please
  • post the ID of your wiki page or your just the link to your Ricky
  • page to the class discussion so that I can add it to the
  • meeting, please. And thank you. Great. Rest of your day and see
  • you Thursday.
  • How did you meet? Meeting. Thanks.
  • How did you meet? Meeting. Thanks.

Responses

No Responses