Intro to Graphics 11 - Surfaces

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right well thank you all for joining to another lecture for introduction to computer graphics today's lecture is going to be fun well not like other lectures we're not about today's lecture i'm hoping it's going to be particularly i'm going to talk about finally surfaces yay that's going to be fun so it's going to be i'm saying it's very fun because today's actually is going to be sort of a light lecture we're going to talk about um how things are done in computer graphics it's going to be a little more philosophical than the other lectures it's going to involve less math well there's going to be a little bit of math come on this is a computer graphics first i have to introduce some math but not much math it's going to be just a little bit but most of it is going to be flight so sit back and relax this is going to be not a very hard one but hopefully uh informative nonetheless all right so where do we start surfaces what are we trying to do so what we're trying to do is to get some 3d models like this guy remember this guy we've seen this guy when we were talking about 3d transformations right so yeah this is just an example of a model uh so what's what's important here and the reason why i'm showing this i'm going to show you a few more models is that yo this may look like something but it's actually just a surface it's just that 3d surface because that's what we do with with 3d models and it's not exclusive to this model um anything we have in computer graphics like i don't know this model why not uh everything is just just the surfaces that you see but of course when we look at this what we perceive is something else right when we imagine that this is especially if it's realistically prepared when we look at this what we imagine is something that actually has some substance in it because that's how it is in reality objects have some substance in them to have some material in them but in computer graphics we don't necessarily care about what's inside because we don't really get to see what's inside most of the time right we just get to see the surface and this is this is an important point now i'm going to spend a little bit of time just talk about this very very simple concept because i i think that so it sheds a light on how things are done in computer graphics and what computer graphics is all about like imagine for example a character like this now do you think this character has a skeleton um well actually probably because we use skeletal animation and we sometimes put some skeleton in in the model so that we can animate it nicely but not necessarily a detailed skeleton like this but something that resembles a skeleton may exist okay skeleton maybe yes maybe but how about um a brain well not a fully functioning one at least well you could say oh i have some ai code and that sort of serves as this brain okay whatever but we don't really model this this brain and put it inside its head right unless your application is doing brain surgery to this guy you're you're not gonna model its brain right all right you're not satisfied with brain how about how about a stomach and the whole digestive system like why would i do this i am never going to feed this character ever so why do i need to model this right i obviously want i don't i don't care uh for for a lot of things i i don't care what why am i talking about this here's an important topic that and that's really general to computer graphics as a whole in computer graphics a lot of things that we do is representing reality in one way or another and then reality is really complicated there's so much complexity out there so much hidden complexity and sometimes obvious complexity and some of this complexity is entirely irrelevant i simply don't care and i will never care about this character when i'm when i'm using this character i don't care that because it's lacking a digestive system right and and there's so much details like this in reality so don't think about computer graphics as a way of representing reality or our imagination as a as a whole it's we're just interested in the part that's relevant to us in the way that we can we can perceive that we're just interested in the visual part of things and that distinction is very very important and we and it's it's not like we're trying to cut corners or we're trying to just trick things uh we tried just trying to you know just uh you know hacking things together that's not the point the point is that reality is immensely and unnecessarily complicated you can even say that this is not the limitation of our current technologies i would even say that a computer a fictional computer that exists in some reality cannot fully simulate that very reality with its whole complexity at real time it just cannot do that you have to draw the line somewhere you have to simplify the reality it could be actual reality could be some fictional reality you have to simplify it so that you have enough computational power to represent it at at reasonable uh within a reasonable configuration time right so that's at the very heart of computer graphics and because of that when we're dealing with 3d models which is we just represent their services we don't care about what's inside of them we don't even try to model them of course there are exceptions like of course like when you're if you can sort of see through the the character a little bit yeah maybe you model what's under the surface or maybe you just model the appearance of what's under the surface not necessarily what's under the surface but just its appearance right so there are some some exceptions to not modeling anything inside a model but nonetheless when we think about 3d models in computer graphics we're talking about we're talking about surfaces like balloons it's completely empty and they don't have to look like politics i i think about them like things like like this right this is this is my understanding of what a computer graphics 3d model is it's just a a surface and it's a i think it's a good mental model when you think about computer graphics models right so our topic for today is surfaces so by surfaces i mean 3d models last time we talked about curves so it kind of makes sense that we're talking about surfaces today all right this is the whole philosophical part of this lecture i'm gonna move on and actually talk about surfaces now all right so what's the surface how do i represent services remember when we started talking about curves we said probably i good way of representing curves would be using implicit formulations right well we can do the same thing for surfaces why not so that brings us to implicit surfaces so i can define an implicit function like this such that in this case x is just a a vector the solutions to that function can be a surface now this is a very powerful notation this is exactly the identical notation we had for curves right the only difference here is this function f here so in this case the function f the solution to the function f is a surface not just the curve and for representing curves the function f was representing something that was a curve for representing surfaces that's going to be representing a surface in 3d or whatever dimensions that you're interested in and in you know so this implicit formulation is actually very very powerful and you can represent a lot of interesting things with it so what can i do with an implicit function i can actually do a lot of crazy things i can for example represent some some fractals fractals can be written in a implicit function for some particles anyway and you can render them and get some really interesting looking surfaces like this and you know trying to model something like this with all its detail without using an implicit definition would be very very difficult actually but you know we don't always render fractals right this sounds like something very like why would you okay some people were are interested in rendering fractals and you know they're doing that but it's not like what we do in computer graphics every day right just you know something we can do but we don't always do that so implicit services a lot of people think that they're not very popular they don't really use all that often and to some extent they're correct but to some extent there are some implicit surfaces that we do use very very often can you think of an example i'll give you a second girl here's one how about a sphere yeah so we have a lot of ways of representing spheres or approximations to spheres in computer graphics but nothing is as perfect as the implicit formulation so the implicit formulation of what's the formula for sphere you have to remember x squared plus y squared plus z squared is is equal to r squared right so if you can write it in implicit formula look like this right so this is a sphere centered at the origin um i prefer writing this equation like in in vector form in vector form you can write the very same equation the very same equation in this form so this position dot product with itself minus the radius squared is going to be zero so any point that satisfies this equation would be a point on the sphere and that's actually a very very convenient representation uh in for for a lot of cases and we do use that this representation implicit spheres a lot for all sorts of different purposes and we do use them for rendering as well not we don't often use them for rendering on the gpu because gpus are designed to render triangles and pretty much nothing else but you know we we do use them for other kinds of blender operations and we we are going to use them actually we're going to we are going to use implicit spheres in this course when we're doing ray tracing so we'll we'll get to that much later all right so sphere is one example the other one some of you uh mentioned in the chat the other one is a plane an infinite plane an infinite plane is infinitely difficult to represent using anything else but if you have an implicit formulation and infinite flame is actually fairly easy to represent so what's the equation of an implicit implicit plane like this in an infinite plane like this the implicit equation could be if it's the surface normal is z well it could be z is equal to zero so any point with this that satisfies the equation would be a point on the x y plane where z is equal to zero right of course you know i don't have to i can rotate this plane however i like but i could maybe go look at this plane right in this case the the equation would be just that any point that's dot product is equal to zero would be on this plane of course this plane if this satisfies this equation then this plane is going through the origin if it's not going through the origin then you know we can move this plane in this normal direction just a little bit and the equation becomes this all right so these are simple surfaces that we do use in computer graphics for all sorts of purposes implicit infinite planes and implicit spheres but those are not the only ones that are typical examples of what we use but we we do use them for relatively simple shapes like this although the implicit formulations the implicit surfaces i'm not limited to this you can actually pretty much model anything with implicit surfaces if you're willing to put enough time and energy to it for example this is just an example of an implicit surface a particular implicit formulation that allows you to model surfaces like this and then and there are others as well so you know back in the day in the beginning of computer graphics people experimented with this idea a lot because implicit representations had a lot of advantages but trying to model something specific using some combination of like you need to write the the correct equation to form a shape like this and that's where things get tricky if you're a mathematician maybe you can figure that out or maybe you can some build tools so you can sort of graphically put equations together that form a surface like this this is exactly what's happening here in this case actually but this turns it turned out to be not a preferable way of modeling things so we don't use these kind of complex implicit models very often in computer graphics these are actually very very rare back in the day it happened but but nowadays we don't we don't really use them all right so i'm gonna i want to go back to how we talked about curves so when we talked about curves we started with implicit formulations and then we talked about parametric curves right and we talked about polynomial parametric curves we talked about gaziacus and the equivalent the surface equivalent of benzene curves would be bezier patches so let's talk about that so what's the best effect let's start with the bezier curve so a cubic bezier curve is a cubic polynomial curve you'll remember it's defined by four control points in space right so this is the control polygon connecting these four control points and the curve the bezier curve the cubic bezier curve defined by this bezier control points would be would be this so this is a bezier curve now this is the curve from this curve i'm going to generate a surface and the way that i'm going to generate a surface is that i'm going to take this curve as my one cross section and i'm going to build a a surface that starts from here and moves in this direction like this right it's the one end of this surface is going to be exactly this curve so this curve is going to be just one cross section of it and i'm going to build a surface from from this curve and for that i will need four other curves why do i need four other curves because i'm going to do something i'm going to do the exact thing i did for generating this this this one curve so for generating this one curve i uh combined i i formulated my bezier formulation was just the weighted average of these four control points right so bezier formulation is some way of generating a weighted average of four points in space now for generating a bezier patch i'm going to take four bezier curves and i'm going to form a weighted average of four bezier curves and the weighted average of these four curves is going to give me the surface now for generating a bezier patch i'm going to need two parameters one parameter is going to it's going to tell me where i am along the curve along each one of these curves in this direction the other parameter is going to tell me where i am between these four curves so i'm going to have let's say a t parameter in this direction and i'm going to have an s parameter in this direction so there's going to be two parameters again they're going to be parametric polynomials but those parametric polynomials will have two parameters instead of one all right so are you ready i'm going to take these four curves uh and first i'm going to place them wherever i want in space let's say that i want to remove them like this all right that's where they are that's where i want my curves and from that from these curves now i have these curves i'm gonna now connect them so this is creating my control polygon for my bezier patch and this control polygon that contains 16 control points is going to define this lovely busy attach um so um yo this this was back in the day this was a very very competitive way of producing models we don't always generate models like this today we prefer other methods but this is still a way of generating 3d models good catch someone mentioned utah teapot yes there it is the utah the famous utah teapot the symbol of computer graphics is actually a a collection of bezier patches uh so this is the original notes for uh generating those control points that was drafted to to build this the utility pod and then just took it and squished the deep water a little bit that's why the shape looks a little different now there's a history of that in our graphics website graphics.csu so check it out if you're interested but yeah the utah teapot is a an example of a bezier patch a collection of messier which actually contains multiple desii patches so we have our lovely teapot that's not necessarily a popular method for defining surfaces in computer graphics today we have more popular methods talking about popular methods one method that used to be very very popular still used in practice today is nerve surfaces we talked about them last time when we were talking about nerves neurons are non-uniform rational b-splines so it's just another way of combining averaging points together you can do the same thing we did with bezier patches and this time we're getting a nerve surface instead of a bezier patch exactly the same idea with just a different formulation instead of using a polynomial that in bezier formulation we're using a rational polynomial with non-uniform parametrization and then we get these surfaces of course nerve surfaces we talked about them they don't interpolate the control points so they don't go through any of the control points although you can force them to go through the first and the last control points in your formulation we looked at these examples i'm just showing you the same examples some models generated using nerd services even relatively recent models used in production generated using their services but the more probably the most popular method for generating for preparing 3d models today of 3d services today is using polygonal meshes so here's an example of polynomial mesh [Music] you're seeing two different polygonal meshes here with with different resolutions we call them resolutions that the number of polygons we have for example and as you can see these polygons are you know we have some quads i believe we have some uh pentagons here um we have some triangles so polygonal matches are a collection of different types of polygons of course they don't have to be low resolution like this we can have a lot more polygons for representing our surface and the more polygons we have the more details we can represent on the surface that's that's the main idea so this turns out to be the most popular way of generating 3d models today right so when we think about a polygonal mesh it's made out of obviously polygons and each polygon would have a number of vertices and the same number of edges right and they're connected by sharing vertices and and edges each polygon forms a small piece of the surface and this is the the the structure we prefer using in computer graphics but this is a computer graphics course so we kind of need to talk about the data structures just a little bit at least just a little bit so let's let's do that so what do i do for representing a polynomial model like this it turns out at the very least i need to know where these vertices are in space i need to know the 3d positions of these vertices and i also need to know how these vertices are connected like how the polygons are formed out of these vertices that's the minimal information that i need now there are different ways of storing this information so the most convenient way of storing this information is like this i have a list of vertices and x y z coordinates per vertex you can you can have other information per vertex remember we talked about vertex attributes when we're talking about the webgl rendering so we can have other attributes that we can store per vertex but at the very least i need to know where a vertex is in space and i also need to have a list of polygons and each polygon would have a list of vertex indices and from this these vertex indices i can follow that foreign we oftentimes call them faces while some people when they call faces they refer to triangles specifically but i often use them as faces are polygons faces when i say a face what i mean is just a polygon of a polygonal mesh that's what i mean so this is what we need at the very least well what happened to the edges we talked about edges in previous slides right so where do they go well they're not represented here so we don't turns out we don't really need edges very often although you know there are certain modeling operations that people like to use that involve edges so in some cases it becomes convenient to store the edges as well if you want to so you can store the edges as well they're not they're not necessarily required actually just using the the polygon vertex indices and list of vertices you can form that mesh and then from that you can generate a list of edges and you can add edge indices to the polynomials so this part is not necessarily required but for certain algorithms it becomes very convenient to actually explicitly store this like a list of edges uh edge indices and the list of engines that contain the edge data that might be very very convenient for some applications so sometimes we do store them actually there are some famous data structures that are also mentioned in the book for example the wing structure the winged edge is like an edge with wings think about it that way so i have this edge here that edge is connecting two vertices so it's going to have access to those two vertices and it is also connecting two faces it's two wings so it's going to have these two phase indices i set one or two face indices here because this edge might be the end of a surface if it's the end of a surface then one of these spaces may not exist so if this space does not exist then it's going to only have one face if this verse does exist and it's gonna have two faces yeah so this is the winged edge representation it's a very convenient representation for certain algorithms that walk over the the mesh you know to apply certain operations to perform certain operations with spring that representation can be very very convenient and sometimes we do we just know that sometimes people prefer a slightly simpler representation because the the thing here is it's like i'm i'm duplicating data right i'm like storing things multiple times and for for a lot of algorithms that may not be really necessary there's a simpler structure simpler equivalence edge structure that people like using that is the half edge structure the elder structure would just store one half of the edge one half of the winged edge so it's going to store one vertex and one face uh it's not going to store the other edge so in in the half page structure i'm going to have a corresponding edge going in the opposite direction for the other face for the corresponding place and oftentimes i'm going to have some way of addressing the other the corresponding edge of the half edge quantum corresponding half edge of the half edge that's going to be right over here in this direction pointing to to this vertex uh and you know combining this this edge representation with all sorts of vertex and phase representation you can form all the various ways of storing uh a polygon mesh data and what exactly you store really depends on what kind of algorithms that you want to run at the at the minimum you will need some way of representing vertex positions that typically means you're going to have a list of vertices and oftentimes you're going to need a list of vertices per place or per polygon although that's not strictly required because there are ways to construct this from a half a structure or a pure habit structure or a wind gust structure but it's it's typical to store a list of polygons as well and for certain algorithms that work over the mesh you may need to slow the edges as well if you need to all right and we're going to talk about more of this next time in a bit more detail not about edges but list of faces and lists of vertices so i said this is a turns out that people like this and a lot of people that do modeling in computer graphics really prefer working with polygonal meshes and so this is the most commonly used data structure that we have by data structure i mean in general any way of storing these polynomial measures this display of measure representation is the most popular surface representation we have in computer graphics so here's an example of polygonal mesh modeling as as you can see you know by doing all sorts of uh polygonal operations uh you can generate interesting models well i hope you find this model interesting if you don't find it too interesting i'll show you another one uh here's another one using very different operations into some some moving some operations are just moving vertices around some operations just are just adding faces so um as you can imagine yeah the polio mesh is our data structure but there are many ways of modifying a polygonal measure building a polynomial mesh right and there are all sorts of tools out there um with all sorts of capabilities uh and if you if you're interested in political modeling you kind of it would be a good idea to be familiar with a large collection of tools so that you can you can use the right tool for exactly what you're trying to do and yeah this is a computer graphics course but this is not a modeling course so i'm not going to get into details of any of the any particular uh modeling operations that are showcased here i just want to show you that there are various ways of um there are numerous ways of fiddling with a polygonal mesh and depending on exactly what you want to do they have different advantages that you may want to be familiar with if you want to do anything like this but you can think about you know the simplest operation is uh you know select a bunch of vertices and and apply some amping transformations to them like you move them around or rotate them around some points or scale them um or add more polygons add edges on the surfaces of polygons uh delete polygons delete vertices you know all sorts of a very very large collection of um low level operations and and operations that that combine various operations together to form a higher level modeling operations but nonetheless when you look at this you should recognize that preparing a 3d model like this is actually quite labor-intensive so it seems like using like bezier patches or um or or even implicit surfaces might be quite a bit easier than all this right but people do prefer this and there's a good reason for that and the main reason i think is that because this gives you a very precise control you can directly control the surface uh with for example implicit formulations it becomes quite tedious you kind of need to understand those equations really well and even when you do understand them it may be very difficult to control them exactly how you want to but with this it's it's quite intuitive you you deal with your problems with one vertex at a time and that kind of makes this uh controllable nonetheless i would say you know you look at a model like this and you can imagine okay this is going to take me quite a bit of time to prepare a model like this right i mean look at this there's so many vertices here if i want to generate a model like this i'm going to spend it it's not going to be trivial right if i show you this and say okay now i'm gonna take it away and say go go model this and pick the vertex positions for for this mesh and you know generate the the whole polygonal model it's gonna take a very long time right and this is not a very impressive wall it has actually very few polygons when you think about it the surface is not very smooth so imagine modeling something more like this which has a lot more polygons it's it's a lot more work so yeah preparing polygonal models actually uh i would like you all to appreciate this process it's it's not easy yes we do have tools we have a whole bunch of tools but nonetheless you know we have a lot of vertices to deal with and a lot of vertex positions to be concerned about so preparing that is not going to be that easy and the other thing is that it's not just about moving these vertices around i also need to create all of these polygons right connect all these vertices together and form these polygons that's not going to be very easy but that part turns out we have some very nice tools to help us with that and that brings us to the concept of subdivision so subdivision is the process where we get a low resolution mesh and from that low resolution mesh we automatically generate a higher resolution mesh it's okay technically not everything you do to generate a high resolution mesh from a low resolution mesh would be technically subdivision subdivision has certain limits but subdivision or certain more specific definition nonetheless subdivision is the process with which we generate high resolution surfaces high-resolution polygonal meshes from low resolution polygonal meshes now i'm showing this as an example of subdivision but i don't believe in this case this is pure subdivision there's this model probably generated from this low resolution model using subdivision and then it got modified a little bit i'm noticing a few topological modifications by topological modifications i mean that the way that vertices are connected together is modified here from typical subdivision operations that i'm familiar with especially over here there are some you know polygonal shapes that i didn't wouldn't expect to see from a pure subdivision so yeah this is probably not a good example of subdivision so let's you know what there are various subdivision techniques out there people came up with various mathematical models for taking a low resolution mesh and generating a higher higher resolution mesh out of them using some sort of subdivision operation there are very subdivision bottles out there but there is one there is one that is very popular and when people talk about subdivision without saying what kind of subdivision they are talking about they are talking about cognitive coordinate subdivision almost always so when people talk about subdivision and if they don't tell you what subdivision method they're talking about they're probably talking about a couple parts of division so if these names sound familiar to you ed capitol and jim clark back in the day they were in university of utah and they came up with this this subdivision technique that is pretty much the way that we generate models in computer graphics today so here's how it works given a polygonal mesh like this i'm going to generate a higher resolution polygon mesh out of that all right and the way i'm going to do this is that for each face of this polygonal mesh i am going to generate more smaller faces so for each face i'm going to split it into multiple faces this is an operation that we call tessellation so i'm going to tessellate each face each quad face in this case into four quad faces and and then i'm going to move the new vertices around to to get this sort of rounder smoother shape right so the way this is going to work is it's going to generate a vertex at the center of each face at the right at the center here and then it's going to generate vertices at the centers of the edges then then it'll move those edge vertices towards the the average of the neighboring faces and then it's also going to move the name the vertices the original vertices around the corners here towards the the end average of the neighboring faces and neighboring face vertices and neighboring edge vertices but i'm not giving you the exact formula the exact form is very simple but it's not that important the important point is that i am getting a higher resolution and smoother surface so if i apply the very same cosmo clark subdivision rule again i'm going to get a higher resolution model looking like this right and i can keep doing this right i can get a higher resolution surface and then the higher resolution on the high resolution one and in the end this is going to approach to a limit surface like this right this limit surface the nice thing about that limit surface is that it it is provably c2 continues except for the extraordinary points but most of the surface is going to be c2 continuing to which is which is great because c2 continuity will produce really nice looking smooth uh continuous looking reflections on surfaces so we want to have c2 continuous surfaces when in computer graphics and the only place where c2 continuity sort of breaks and it becomes c1 is these extraordinary vertices um what do i say these are vertices there are vertices that don't have four edges coming out of them so for all vertices here with four edges coming out of them they're gonna be fine but if there's an there's a vertex that has less than or more than four like the like the corners of the the original the original vertices are actually of the cube have just three edges coming out of them so yeah they're not going to that they're going to be extraordinary vertices we're not going to have perfect smoothness around those points so this resulting surface looks like a sphere but it's actually not a sphere it's sort of sphere-like shape but it's not a perfect sphere at all nonetheless it's a it's a very nice and smooth surface that we like all right it it depends on what you start with though so if you start with a cube this is what you get if you start with a cube that is tesla that has this sort of mesh connectivity this is what you get but if you start with the same shape but a different mesh connectivity what different mesh representing the same shape common clock subdivision will approach to a different looking surface uh like in these examples all all of the ones above are cubes with different polygonal meshes representing cubes and then you get the resulting shape you get with cotton collect subdivision would be different now i've been showing you just quads couple of subdivisions can be applied to triangles as well if you apply it to a triangle you'll get three quads you could if you apply it to a pentagon you're going to get five quads so in the end you're gonna get a quad mesh out of whatever kind of polygonal mesh you start with but you probably want to start with a quad mesh because couple clock subdivision works really well with quads it doesn't work as well with triangles and pentagons and other kinds of polygons let me show you an example here um if i start with a mostly quad mesh we call them quad dominant mesh there may be some triangles in them but it's it's mostly quad a quad mesh would when you apply subdivision you get something that looks really smooth and nice now if you triangulate this there's now this is a triangular mesh all faces are triangles not quads in this case again i'm getting a smooth surface but it kind of has these um these sort of wiggles on the surface that doesn't quite look like this right you should be able to see that the surface is it's still smooth in the sense that it is still c2 continuous but but the shape is a little bumpy because of these original triangles in there so that's why when we're modeling things we prefer to use quad dominant meshes meshes that are mostly made out of quads maybe some triangles here and there because if you're just using quad meshes that will sort of restrict the topology quite a bit the mesh conductivity quite a bit so you may want to add a few triangles here and there to get the mesh topology basically the the connections between vertices to get the mesh topology that you want you may want to squeeze in a few triangles here and there right so there's an example model and after it the cutting clark subdivision applied to it so if you if i remove the the low resolution mesh you see that it looks smooth so this is just displaying the edges of the low resolution mesh on this smooth surface after we apply copper collect subdivision so when you're when we're trying to model a high resolution model like this we're trying to produce a high resolution model like this we typically start with a low resolution model and then and then we apply a subdivision to it typically it's called collect subdivision to get a smooth looking surface like this right but wait the originals model i showed you had quite a bit more details now yeah this looks smooth but beyond looking smooth it doesn't have the details that the the model that i wanted how like it doesn't look like this right so how am i going to add these small scale details well i can actually but of course i'm going to be dealing with dealing with a mesh with a lot more vertices right so i can apply a couple of clocks of division and then if i want to change the mesh connectivity mesh topology i can i can do that i can edit that and then i can apply a couple of cloud subdivision again and again again and then in the end i'm going to get a smooth looking surface and with a lot of vertices and then i can move those vertices around to add these these small scale details and for that we have tools that are specialized for adding these small scale details zbrush is a very popular example that allows you to sort of paint on the surface and and add these bumps and dents on the surface so you get the high resolution details that you want right so you can use tools like this to deal with super high resolution models in the end but we start with a low resolution model and then we typically apply multiple levels of subdivision to get a high resolution model like this and then the high resolution models are sort of modified using different types of tools so that's the general idea of how we generate high resolution models in computer graphics in the end though most of these polygonal models are converted to triangular meshes for rendering because rendering operations are a lot easier when you're dealing with triangles than with other types of polygonal meshes like like quad meshes the reason for that is that a quad does not have to be planar a triangle is always planar because three points in space would define a a plane but but for quad the four vertices of a quad they don't have to be on the same plane so if they're not planar as a primitive it's a lot harder to deal with so that's why we take all of these polygonal meshes and convert them into triangular meshes before we we render them and that's very easy to do like given a quad i can easily convert a quad into two triangles like this but actually there's more than one way of doing this right so i can triangulate my quad like this or i can triangulate it like this either way like but they're both okay so which one would i pick it it's really hard to choose because i mean they they look the same like it's as if it doesn't matter but in 3d it wouldn't matter because especially if these four vertices are not on the same plane if they're not planar then the two triangles you will get out of them would look a little bit different right these are these are not these are not the same shapes right they're they're different shapes so triangulation might matter uh so that's why we sometimes leave this to the the user so you you can't specify how you would like your polygonal mesh to be triangulated otherwise we can apply triangulation to all sorts of polygonal meshes and if you have pentagon like this of course you're going to have more ways of triangulating it but otherwise given a model we triangulate it and and we render them that way this is not specific to polygonal meshes actually uh remember we talked about this guy originally defined as bezier patches yeah so we can take that we can take those bezier patches and we can triangulate them we can generate triangles out of them for rendering purposes now this is a relatively low resolution version of the utah teapot of course you can generate a high resolution version as well it will be represented by a bunch of triangles when we're when we're rendering them so we're going to talk about because of that we're going to talk about triangular meshes in quite a lot of detail next time around so our next lecture for this course will be all about triangular meshes uh thank you all for joining another lecture for introduction to computer graphics and i'm going to see you all next time bye
Info
Channel: Cem Yuksel
Views: 1,357
Rating: undefined out of 5
Keywords:
Id: EM73mJwfwLw
Channel Id: undefined
Length: 47min 55sec (2875 seconds)
Published: Fri Apr 02 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.