Mtg 23/23: Wed-04-Dec-2024

Outline for Today

Review

Administration

Today

For Next Meeting

Wiki

Link to the UR Courses wiki page for this meeting

Media

Transcript

Audio Transcript

  • Wrap. Okay, I Guess that's Working you.
  • Okay, Here
  • we are on day meeting 23 of 23
  • so we dedicated to review and questions. I
  • so the upcoming event that's important next is the
  • violent town you
  • this. Am I working? I think it is so
  • things that can get you reach the back of the room today,
  • so find the exam I
  • Monday, December 9, here in seal, 112,
  • At does that agree with your understanding? Okay? I
  • cut off for assignments and
  • for December 10, at one minute to midnight if you haven't
  • gotten assignments, if you haven't made the due dates. So
  • the first one, the third was assignment. Three was due on
  • Monday at 2359 on the second and Simon. Four is December 6 at
  • 2359
  • if you can make those you still can get
  • marks with a bit of a penalty
  • by submitting them on By the end of the day, on the 10th you
  • Okay, So I've linked to the final exams from
  • the previous two, 730, threes, and I've also included the
  • midterms
  • which
  • I am taking you at I have linked to before, and the midterm from
  • our class I
  • have you looked at these already,
  • and what do you think about
  • them helpful?
  • Do you think they're too easy.
  • Nobody's gonna say that, aren't
  • they? Anyway,
  • let's look through them. I
  • anything more to say about pixels?
  • Any questions about pixels.
  • So pixels are picture elements
  • and
  • on display screen, we have pixels that have a value That
  • sampled from the underlying phenomenon that we're sampling
  • and
  • starting from a block screen describe or sketch how To get
  • colors way, using the three primitive
  • colors
  • That looks like a little Bit of A typo. I
  • so when we're printing, we take cyan, magenta, yellow.
  • So we're starting
  • with a white piece of paper, and we're putting ink to subtract
  • light from wavelengths of light so we'd get the color that we
  • perceive on the printed page. We
  • so continuous, discrete sampling and quantization. I know that's
  • not necessarily a favorite, but I think it is. These are useful
  • concepts when we talk about computer graphics.
  • So we take a picture of the room. Let's say we're getting a
  • we're creating in discrete representation of the continuous
  • world around us. We might have mega pixels in the image, so we
  • have very high resolution
  • we have Very high spatial resolution,
  • and then we can also have a very
  • substantial
  • or very precise in This by storing a lot of bits with at
  • each pixel that we represent the sample we've assigned to a pixel
  • with a high precision,
  • a lot of bits. So if we take an RGB image, the standard has been
  • eight bits for red, for green and for blue.
  • So
  • 24 bit color gives us access to about 16 point 7 million
  • different colors. The
  • it so bits are cheap now, so we can store 12 bits per channel
  • and
  • we add alpha So
  • we can have more than we need for most purposes where we have
  • enough.
  • So are these concepts used In Web GL to do? I,
  • I say yes for short answer. How do you represent a point in
  • homogeneous coordinates? Why are homogeneous coordinates
  • important in Computer Graphics? I
  • so for 2d we're dealing with an extra component we call W. We're
  • so what's an important thing that homogeneous coordinates
  • allow us to do in computer graphics?
  • Shearing rotations, scaling
  • transformations.
  • Yeah, scaling shearing and rotation, those are all i
  • Those are all here. Yeah, the translating is the extra part
  • that's useful in computer graphics. So we can, we can
  • represent translations and rotation scalings and shears in
  • the same matrix. So we can apply transformation just by matrix
  • multiplication, instead of doing the matrix this multiplication
  • and this addition so it gives us
  • a handy, rough, handy format to store everything We need.
  • So what's an example where
  • we use a translation and rotation.
  • Just think of the rotation as an example of a transformation that
  • is in that Part,
  • think about a midterm exam question.
  • Perhaps,
  • rotate it specific
  • point, yeah, so we're going to
  • translate.
  • Say we want to rotate around this point
  • so
  • so
  • first thing we apply is moving the point from moving in the new
  • center to the origin, doing the rotation and then moving it
  • back.
  • So that's a powerful example of
  • the Use of homogeneous coordinates That makes sense. I
  • who likes this style of question where I give you code and ask
  • you to explain it. What? Oh, okay,
  • I thought maybe
  • maybe the answer would be zero.
  • Okay, so I'll think about that in a bit.
  • So robotic arm has a shaders specified and Not much else.
  • It's just just the canvas I
  • we have the interface elements
  • in addition to The Canvas. So
  • let's do
  • So we're building the
  • model
  • arm by creating A base lower arm and upper arm you
  • what is an advantage of Web GL two with Respect to interaction?
  • I
  • so We're not dealing with writing interface controls.
  • We're just we can leverage HTML and the doctrine object model. I
  • so what's the difference between grow and Farm shading? I
  • which one can be done in the
  • vertex shader? Yeah, and
  • you find shading in with the vertex shader?
  • No, I
  • so we're going to compute intensities and vertices and
  • and interpolate. So
  • the computation that the vertices involves normals,
  • and so we're computing
  • the lighting equations and using,
  • but we're only doing that the vertices, and then we're
  • interpolating the value.
  • So what makes long shading different but for using the
  • Frank and shader when advance.
  • Does that give us? I
  • so what do we interpolate with thong shade?
  • Yeah, I'm
  • so we're computing
  • normals, and we're computing the intensity per fragment.
  • So is that more expensive? Yeah, but it's worth it in many cases.
  • You
  • so interaction of a light and
  • so we can refer to the lighting equation that we use to compute
  • the intensity in the vertex shader and
  • Why is the flattened function used from The textbook Charlie?
  • So
  • flatten just gives us floating point numbers to pass to the
  • shape pass to The GPU and
  • two. So how do we get from our model of a scene to the point
  • where everything is represented inside the clipping space, from
  • minus one to plus one and X, Y and Z and you
  • Ah, sorry if anyone else had to hear that. I Transform
  • I'm
  • so we have a number of coordinate systems. So if we
  • think about the robot, robotic arm base and the lower arm and
  • the upper arm are instances of the cube
  • and the wave. So we take the position with those vertices and
  • we multiply By the model V matrix
  • and the projection matrix the
  • what is the purpose of A Z buffer? We've been over that I
  • think I
  • so we're going to keep track of the distances
  • of the values in the frame buffer. So if we're updating the
  • screen, we test the Z buffer to make sure that the new value is
  • closer than the existing one. So we can update the image. If it's
  • not closer than we don't update the image.
  • So describe bump mapping, texture mapping and environment
  • mapping. I
  • is a this thing a problem with images as textures?
  • Yes, could be,
  • we can do area sampling.
  • What is an advantage to creating models By instancing a single
  • primitive I
  • well, I
  • it keeps things simple. We just have to specify the
  • transformations as we create the instances and build our
  • description of the Model, like in a tree or a scene graph. I
  • I document the code. I don't think that's a good question.
  • Who likes that question. One person, okay, that means maybe
  • half of you like it.
  • I'll think about that as well. So then here's the code that I
  • have online and part of the exam i
  • i explain how sampling is involved in creating A computer
  • generated images, Image, image using Web GL Two,
  • from our discussion of RGB colors explain the intuition
  • behind Hue Saturation and Value,
  • what must be done to reconstruct an accurate approximation of a
  • continuous phenomenon? Them,
  • bless you.
  • So we want to sample it twice,
  • twice the resolution of the smallest object that we want to
  • represent. The
  • How would you change the center of rotation for an animation of
  • rotating square,
  • we have that on the board.
  • So we talked about this a little bit to see visible surfaces. Why
  • not just sort objects by distance from the camera and
  • draw them in order from furthest to nearest.
  • Does that
  • work? Sometimes, but when might it not work? I an
  • object that was behind
  • another object. Yeah, so if we,
  • I think I took pictures of that.
  • So from the top,
  • this would work fine. And
  • let this cause problems and
  • so the Z buffer approach, we're competing in depth for each each
  • point along those edges or those in those triangles, And we're
  • storing the depth in the Z buffer and
  • so that gives us the it shows us the visible surfaces. Does that
  • make sense? I
  • I didn't, but, well, I think it's in the code from the
  • textbook. This works from there. I I
  • don't
  • think I will include it.
  • So it's just about locating the click the mouse position
  • recorded on in the screen coordinates where we have a
  • mouse click. So the complicating factor with this that's not
  • handled in the textbook code is when the window isn't at the top
  • left of the browser window and
  • what command is needed in the render function to ensure a
  • smooth animation request animation frame And
  • so this is a take on the differences Between grow and
  • Fong shading.
  • Does that make sense? I
  • describe the difference between the interaction of a point light
  • source and directional light source, determining ambient,
  • diffuse, specular components of a computed color and
  • what conditions must be met for a surface to be lit i
  • So what's the difference?
  • So if it's a directional light, we have the angle of incidence
  • is the same for the everywhere in the scene, whereas With a
  • point light source, that angle will change the
  • so in order for the service to be lit, it has to be visible To
  • the light
  • I put the instance cubes code in The directory,
  • but we didn't really talk about it. I
  • not instance, cubes, instant tea pots.
  • So this is a way to take one object, in this case, a teapot,
  • and instance it a number of Times, and control the
  • parameters per for each instance I
  • describe, in general terms, how to model a robot arm made of two
  • cylinders.
  • Describe three features of frame buffer objects used to create
  • this image from render, FB, dot, HTML and
  • so I've made this is a little bit more complicated version of
  • the triangle on the gray background on the blue Square. I
  • So I've made two intersecting triangles. I
  • so with the frame buffer, I can do off screen rendering, and I
  • can attach a Z buffer to the off screen rendering so I can have
  • The results of the Z the correct result of the
  • of the computation of the rendering so,
  • so I can create the texture in an off screen buffer and then
  • use it.
  • Use it to apply to the background and
  • does that make sense?
  • Let's take a look at that. I
  • so the first vertex and fragment shader are creating the texture,
  • and then the second ones are using the texture and chair.
  • So we're creating an empty texture here.
  • Allocate a new frame buffer object, bind, it and attach a
  • color buffer. So we're going to use the texture as the color
  • buffer, and we're going to add a depth buffer so
  • then we're going to we have two programs, create text, triangle
  • texture and use triangle texture so we create the texture by
  • using the program enabling depth test,
  • and we do the geometry and
  • then We set the viewport clear color and set the colors so one
  • triangle is going to be red, the other one is going to be green.
  • And once we put that into the texture, we disconnect from our
  • off screen frame buffer and reconnect to the one that's from
  • the window system.
  • And then we use, use the program, use triangle texture,
  • and we draw the texture as normal here. And
  • does that make sense?
  • So we're generating a 16 by 16 texture and
  • to Explain how the animated texture particle diffusion HTML
  • is done. I
  • We didn't talk about this too much, but the idea here is we're
  • using two textures, and we're using one as a source and the
  • other as a destination, And we're flipping them so we're
  • doing the diffusion and then the other one is drawing the new
  • point, the new positions of the points. Does it look fun? More
  • fun than the other version. I
  • so there are a couple examples. I went, oh,
  • did I get through?
  • Yeah, that's it. Okay. I
  • so this a fun shaded cube with texture and
  • you see that
  • better now. This is a particle system,
  • deferred rendering so
  • so this was mentioned as an application of the frame buffer,
  • Using frame buffers to do multiple passes of rendering and
  • what do you think about that.
  • So we're just doing depth of field, as you can Tell, and
  • we're using instance drawing here. I believe you
  • So blending with transparency and
  • that's doing A similar I
  • ambient occlusion. That's another example that was
  • mentioned for the multiple render passes in The textbook.
  • And so in WebGL two we can make occlusion queries, so
  • simplifying our model so we can exclude the parts that aren't
  • going to be rendered. Here you get to see a little overview at
  • the bottom left. I
  • so I put a couple links in there for ray tracing and radiosity.
  • So the old joke was i i guess it's not, maybe an old joke, or
  • it's
  • so the journey the high quality image takes a day or two. So
  • the standard of the seven, the seven weeks per day or two, is
  • much bigger. A day or two is much different than standard
  • defense now. So
  • as we get more power, we can
  • do more things. I
  • I was going to just highlight suggestions for the final exam
  • questions. I invite you to post them on this discussion, I had
  • you write some for the quizzes last couple days, so
  • I invite you to share them with the class, and if you have
  • new ones that come up after our discussion today, let me know
  • you can post it here. There are some
  • questions on old exams if you don't want to see the so
  • I won't be sure to put those on I love to be assured that I
  • wouldn't. I will take your feedback
  • for the questions you want to see and you don't want to see
  • seriously. So
  • by the end of Friday, I'll
  • accept suggestions you if there are questions you don't like,
  • let me know that you and I will
  • do my best to create an exam that will be
  • a fair assessment about
  • your learning today.
  • Thank you very much for today
  • and for the semester. Any final thoughts you
  • motion to
  • adjourn. Okay, thanks again.
  • Take care, everybody. Applause.
  • Take care, everybody. Applause.

Responses

What important concept or perspective did you encounter today?

  • The most important concept that we discussed in the meeting is about the final exam. We went over old exams questions such as Explain how sampling is involved in creating a computer-generated image using WebGL2, etc. We also went over a lot of answers including subjects on pixels, RGB, homogenous coordinates, roboticArm code, etc.
  • I found that what Dr Hepting provided us with as study tools for the final was very informative and helped me understand what I need to do for the final
  • Today, I learned the importance of the continuous, discrete, sampling, quantization question. Like taking a picture, we are taking a continuous phenomenon and discretizing it. This will depend on the number of samples and the precision where each sample stands.
  • Review and potential material for the final exam
  • That we need to make and suggest some exam questions for the final
  • We looked at some old final exam questions.
  • discussed previous years papers
  • We looked at all previous exams and midterms to study for the final
  • learn about old questions, robotarm and particle diffusion
  • The review of the final exams of lasts semester

Was there anything today that was difficult to understand?

    Was there anything today about which you would like to know more?