Тёмный

Triangles to Pixels - Computerphile 

Подписаться
Просмотров 229 тыс.
% 4 741

Audible free book: www.audible.com/computerphile
How do we go from 3D representations within a computer to pixels on a screen? John Chapman has the details!
John Chapman is a graphics programmer who blogs here: www.john-chapman.net
Graphics series with John Chapman:
1/ Universe of Triangles : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-KdyvizaygyY.html
2/ Power of the Matrix : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-vQ60rFwh2ig.html
3/ Triangles to Pixels : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-aweqeMxDnu4.html
4/ Visibility Problem : ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OODzTMcGDD0.html
5/ Light and Shade in Computer Graphics: Coming Soon
computerphile
computer_phile
This video was filmed and edited by Sean Riley.
Computerphile is a sister project to Brady Haran's Numberphile. See the full list of Brady's video projects at: bit.ly/bradychannels

Опубликовано:

 

18 дек 2013

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 194   
@superjugy
@superjugy 10 лет назад
Hahaha, the inception moment when you realize that the animations trying to represent the animation process are basically going through the exact same process it is trying to explain. XD
@somewony
@somewony 10 лет назад
Does anyone else really like this guys voice?
@zoranhacker
@zoranhacker 10 лет назад
***** everyone thinks their voice is horrible
@GuildOfCalamity
@GuildOfCalamity 10 лет назад
I never knew Sean Connery's son was so good with graphics math.
@Kram1032
@Kram1032 10 лет назад
/me: *reload sub page* "oh look, a new computerphile!" My phone: BEEP! /me looks at phone: 'new computerphile video uploaded' /me: "Well thanks, I was about to click on it and you delayed me!"
@tiny_rebel
@tiny_rebel 10 лет назад
So, curiously, if when you "move" a camera, it is not actually the camera turning but everything in the world rotating around the camera, then how does this translate into scenarios where there are multiple cameras? Is there a separate world for each camera? And, if so, how do the items that represent these cameras interact with one another?
@antivanti
@antivanti 10 лет назад
I wish he'd explained how the 2D-projection transformation works and also how it is determined if a pixel is within a triangle or not. Great video series over all however. =)
@jbrun009
@jbrun009 10 лет назад
My assumption based on no knowledge on the subject at all is that the computer determines what percent of triangle would be filling that pixel. To keep things easy for myself, its a black triangle with a white background, with 100 shades or color as the total range. If the triangle is only 50% in the pixel, the pixel will be perfectly grey. If theres more triangle in the pixel, it'll be darker grey. This is why in Microsoft Paint, the greatest graphic creation program of all time, if you type a fancy font with nice soft edges, then try to paint it a different color, only the middle of the letter will be painted, as the outer edges are all slightly different shades of the former color
@OmegaCraftable
@OmegaCraftable 10 лет назад
Huzzah, love these videos!
@ScottLahteine
@ScottLahteine 10 лет назад
Looking forward to the next bit, which no doubt will talk about Normals and Culling (two of my favorite things about 3D graphics) and how Normals make both both Shading and Culling almost simple! If you manage to get into Shaders and Shader Language I'll be quadruply-impressed!
@squidcaps4308
@squidcaps4308 10 лет назад
Personally, i'm looking for video of shaders too.. I'm precisely at that point of learning curve myself...
@serkval7025
@serkval7025 10 лет назад
i really wish an episode about shaders
@druidshmooid
@druidshmooid 10 лет назад
He already kinda covered normals and culling in his last video (about triangle vertices). He doesn't go into explicit detail, but he talks about how triangular vertices are always co-planar, and how we can determine front/back facing through the way we list the order of those vertices. Those pieces of information (and you know, the vertices themselves) are all you really need to calculate normals, and by extension perform back face culling. (Actually, he does explicitly mention back face culling in that video).
@PabloBrubeck
@PabloBrubeck 10 лет назад
This series in particular has inspired me to code my own 3D graphics in java... I'll like to see more about perspective projections, controling rotation in 3 axes, and lighting...
10 лет назад
I'll share some of the math and routines I wrote long ago. I would suggest exploring Java3D and OpenGL APIs. ;)
@PabloBrubeck
@PabloBrubeck 10 лет назад
Thanks!
@Dayanto
@Dayanto 10 лет назад
I really hope they mention the depth buffer. That was probably my biggest 'aha!' experience I've had with computer graphics.
@lebagelboy
@lebagelboy 10 лет назад
these videos are just getting better and better
@RsTheZigec
@RsTheZigec 10 лет назад
This is by far my favourite series of videos on all your chanels. Thanks !
@HunMASK
@HunMASK 10 лет назад
I love these video series about 3D and all videos from Computerphile in general. I just wanted to say thank you and please keep up the good work.
@tobortine
@tobortine 10 лет назад
It's rare to see genius but even more so on You Tube.
@zob314
@zob314 10 лет назад
hey look, an actual use for all that math i learned in high school.
@mothman.industries
@mothman.industries 10 лет назад
Really enjoying this series. Thanks for putting it together, guys.
@squidcaps4308
@squidcaps4308 10 лет назад
These videos are like gold to us, everything i've tried to say in thousands of posts compressed in to few minutes. Kudos and thank you from every teachers that has to explain the basics on 3D design, this is priceless. I'm sharing all videos from this series to our FB group (not gonna advertise so i'll leave the group name out). We try to learn, share and teach 3D design and level creation in the shortest time and simplest way possible (BTB or Bobs TrackBuilder combined with Google Sketchup has been so far the most intuitive tools to do that.).
@MohammadAdib
@MohammadAdib 10 лет назад
I've always wanted to know this! Great video :)
@seigeengine
@seigeengine 10 лет назад
The part that I've never seen an explanation for is WHY you move the world around the camera, rather than the camera moving around the world.
@TheNoobilator
@TheNoobilator 10 лет назад
This series of videos on triangles, matrices, and graphics etc was really awesome :)
@ddoodm
@ddoodm 10 лет назад
The perspective transform is quite simple in essence. 3D vertices can be transformed to 2D screen-space coordinates by simply dividing each component (X and Y) by the Z coordinate of a vertex. Transforming these newly calculated 2D coordinates to the centre of the screen, you'll see a perspective-projection effect. Easy, yet marvelous stuff!
@clerisonn
@clerisonn 10 лет назад
any example of calculation? or any site you know whith an example, thanks
@ddoodm
@ddoodm 10 лет назад
Clerison Campos Apologies for the late reply. Here's an excellent tutorial on perspective projection, and how to implement matrices to do the same thing more efficiently: www.scratchapixel.com/lessons/3d-advanced-lessons/perspective-and-orthographic-projection-matrix/perspective-projection-matrix/
@MindLessWiz
@MindLessWiz 10 лет назад
Freaking awesome! Keep it up, I absolutely love this series!
@piranha031091
@piranha031091 10 лет назад
He looks a bit like a movie supervillain when he talks. Especially around 4:03 , I'd guess he'd make a convincing Joker!
@cazino4
@cazino4 5 лет назад
Such an intuitive explanation of quite an involved topic. Thank you.
@apandaboy
@apandaboy 10 лет назад
Thanks for this explanation. Always struggled to understand this. Nice to see it from a high level!
@Ubeogesh
@Ubeogesh 10 лет назад
A question remains after watching this video - how the projectile transformation works?
@Qbe_Root
@Qbe_Root 10 лет назад
My guess (but I don’t know much about this): get the spherical coordinates of every object relative to the camera, each of the two angles is a 2-D coordinate in a plane with the middle of the screen as its origin.
@chsxtian
@chsxtian 10 лет назад
Nicolas M. Mostly we're using matrix multiplication to make these transformations. www.songho.ca/opengl/gl_projectionmatrix.html here's the explanation of the matrix used to do this in OpenGL
@skifree0
@skifree0 10 лет назад
Its called rasterisation, en.wikipedia.org/wiki/Rasterisation
@RyanJensenEE
@RyanJensenEE 10 лет назад
Wow. I'm really liking this video series!
@bruno_sjc_
@bruno_sjc_ 7 лет назад
Bro, this channel is awesome
@ericsbuds
@ericsbuds 10 лет назад
awesome, cant wait for the next vid
@SamBrev
@SamBrev 10 лет назад
can we have a bit of an explanation on the projection matrix (i assume you use a matrix) and how it works?
@SamBrev
@SamBrev 10 лет назад
ok well after a bit of searching i found a helpful link, so anyone _else_ who wants to know can try this, although you do need a knowledge of algebra and geometry, and basically maths in general: www.scratchapixel.com/lessons/3d-advanced-lessons/perspective-and-orthographic-projection-matrix/perspective-projection-matrix/
@stalkerinis
@stalkerinis 10 лет назад
This is great! Hopefully the next video will be VERY in-depth about shaders. I would like him to talk about programmable shaders too :)
@GBFU2016
@GBFU2016 10 лет назад
Really like the videos from this guy can't wait for the next one. Would be cool to see a video of him talking about using a programming language to work these graphic representations and describing what a graphics engine is.
@Ruxistico
@Ruxistico 10 лет назад
I'm blown away by that fact that I actually understand this. Chapman is doing an excellent job in explaining this - making the ideas seem simple and intuitive. I'm very grateful for this. If I were to program som very simple 3d objects in a language close to the hardware (since I want to understand the entire route from physical stuff in our world to pixels on the screen) - what language should I choose and where can I learn about it? Have a nice day.
@keistzenon9593
@keistzenon9593 7 лет назад
i had to learn this from a book, this graphical explanation makes it so easy :p
@Fuogger
@Fuogger 10 лет назад
I must admit I'm curious about the projective transformation. And would love to see more about how it works
@sergheiadrian
@sergheiadrian 10 лет назад
Can you talk about Z-buffering and other hidden surface removal algorithms in a future episode? Also I would love to learn about antialiasing and anisotropic filtering. Great series of videos! Thank you.
@cbbuntz
@cbbuntz 10 лет назад
Fourier Transform please!
@Spiderboydk
@Spiderboydk 10 лет назад
Imagine a modern computer game with hundreds of thousands of triangles in the scene and 2 million pixels on the screen going through all these calculations about 60 times per second. It's mindnumbingly fast.
@Dayanto
@Dayanto 10 лет назад
The beauty of matrices is that you actually don't have to do everything! Matrices allow you to clump together all the different transformations so that you end up with only a couple of multiplications and additions per vertex.
@Spiderboydk
@Spiderboydk 10 лет назад
***** Yes exactly, but despite of that the number of calculations is still mindnumbing. Take for example the number of times per second the pixel shaders are run on a 1920x1080 60 Hz display.
@DFX2KX
@DFX2KX 10 лет назад
great video as always, guys! Wow, takes me back a few years. (and next we'll talk about backface culling :P:)
@LymonAdd
@LymonAdd 10 лет назад
It would be great to highlight search path algorithm and 2-D tree partition that, as I remember, are used to calculate which vertex is observable from current point of view and thus which one should be recalculated.
@armouredhen30
@armouredhen30 10 лет назад
More videos with this guy please!
@theTOOLshed1
@theTOOLshed1 10 лет назад
Awesome video
@Slutuppnu
@Slutuppnu 10 лет назад
These videos are great. Please do one on how to interpolate pixels over the triangle (barycentric interpolation).
@ashwith
@ashwith 10 лет назад
So that's who Sean is (never seen him on any videos before). Thanks for making these videos! :-)
@SoulboundDragon
@SoulboundDragon 10 лет назад
Great video! :D
@reitube2
@reitube2 9 лет назад
Is there a video that talks about the last projection step in more detail D:?? I would really really really like to understand how people came up with the projection matrix.. I can understand the transformation matrices but the projection matrix is always soccery..
@Darieee
@Darieee 10 лет назад
you guys should add links between series of videos - it looks as if there's one before this one - is there ?
@Pfaeff
@Pfaeff 10 лет назад
Will you also do a video about occlusion and depth-buffering? That is an important aspect when going from 3D to a 2D rasterized image.
@DrDeeDot
@DrDeeDot 10 лет назад
I hope you cover an efficient method to determine object/face overlapping, i.e., a method to determine if a foreground object cover/hides a background object.
@slpk
@slpk 10 лет назад
Hey Sean! There you are!
@the80386
@the80386 10 лет назад
MAN I FRIGGIN LOVE THESE VIDEOS! TEXTURING, MAPPING, FILTERING VIDEOS COMING SOON EH? I'LL BE WAITING :D If you make those videos, PLEASE take some time to explain what a texel is. We all know what pixel is but texel is confusing for many. And keep up the great work you guys!
@BrendonGreenNZL
@BrendonGreenNZL 10 лет назад
pixel = 2D picture element (screen) voxel = 3D volume element (3D equivalent of pixel) texel = 2D texture element (essentially, the "pixels" that make up a texture) Texels are mapped onto the surface of the triangles, and then projected onto the screen as pixels. Voxels are the solid equivalent of pixels, and must be mapped and projected onto the screen just as any other 3D object would be.
@the80386
@the80386 10 лет назад
hey thanks buddy. clean and simple :)
@Azwoh
@Azwoh 10 лет назад
John Chapman is easy listening
@boenrobot
@boenrobot 10 лет назад
Wait, so how does the "projection" transformation work? That seems to be the most important bit in triangles-to-pixel conversion, and yet that part was never explained at all... just mentioned that it exists as part of the process. Maybe do something like the translation and rotation bits about the matrix?... That is, "manually" translate just one triangle to a set of 3 points on a screen. Please?
@MadManMarkAu
@MadManMarkAu 10 лет назад
There's a funky thing that happens with the projection matrix. Technically, he did explain it, but in a very round about fashion. In simple terms, to convert 3D coordinates to 2D space, you divide the X and Y coordinates by the Z coordinate. This gives you an orthographic representation of the vertices on a 2D plane (the screen). Very simple explanation, but that's the absolute basic idea behind it. In the real world, this is done with another matrix calculation. You remember how earlier in the series he explained how matrices worked, with all the rules of multiplying and adding various columns? Well, if memory serves me right, there is also a /divide/ operation that wasn't mentioned at that time. All the view information (viewport size, field of view, etc...) is compiled into a single matrix. This matrix, again from memory, applies perspective to each vertex, crunching them down into a 2D plane, and converts the vertices into screen coordinates (actual pixel coordinates). Then, the polygons are rasterized (drawn).
@gumenski
@gumenski 10 лет назад
He did cover it but it might have been hard to catch because there wasn't much time wasted about it. He said that a simple projection transformation is literally to just discard all Z coordinates of your triangles entirely and you're done. If you went a sense of depth too then the X/Y coords also need to be scaled down by whatever factor you want based on the Z distance you threw away (x/z, y/z like DarkLord just showed)
@iabervon
@iabervon 10 лет назад
The trick for getting that divide in a matrix is to go back to the same trick we used for translations, where we've got an extra 1 at the end of the vector, and come up with what it means for a point to have other numbers there. We say that (x, y, z, 1) is the same point as (2x, 2y, 2z, 2) or (10x, 10y, 10z, 10). That is, if you want to reduce a four-number vector to a three-number location, you don't just drop the last number, you divide by it. Then your perspective transform just copies z into the last spot, which turns a point (x, y, z, 1) into (x, y, z, z), which is (x/z, y/z, 1), which is what you want (as others have said). The point of doing this transform is that you can decide whether you want a perspective camera or an orthographic camera (objects don't shrink with distance) by choosing which matrix you use. This is important because your hardware will be set up to do two matrix multiplies and the special divide to every point you give it. So, for every point, you say its local coordinates are and what object it's part of. For each object, you say its world transform. You also say the camera transform. Then the hardware gives you screen coordinates for every point. You don't have to tell it what sequence of operations to do, because that's going to be the same for every scene that every program renders. (In general, computer stuff gets much much slower when you have to tell it what to do, rather than only telling it what numbers to use, which is why hardware 3D is so much faster than software 3D.)
@whtiequillBj
@whtiequillBj 10 лет назад
I'd like to hear about boolians and 3D graphics. I've heard it is not really a true merge of verticies but simple a way to make faces invisable and connect the objects
@SyntekkTeam
@SyntekkTeam 10 лет назад
Awesome, I look forward to seeing it in more detail in future videos. In this example all the pixels are a color depending on which triangle. Will you be getting into anti-aliasing? Where if 2 triangles are on a pixel the color of the pixel is a mix of the colors of the 2 triangles?
@ammobake
@ammobake 7 лет назад
This basically describes exactly how Autocad and other software models in 3-dimensions. Sometimes, you can extrude a 2-dimensional object into the Z coordinate and be finished but usually it is more complicated. However, You also have the option of creating 3D primitive in "model space" which you can then slice, cut, and manipulate that into the finished product (sometimes easier). There are also ways to create the 3d object as a wireframe and have the software automatically draw in the surface tabulations (as a mesh or skin).
@Melthornal
@Melthornal 10 лет назад
Very nice. Are you going to be getting into things like antialiasing next?
@Astfresser
@Astfresser 10 лет назад
I got a question which i hoped would be covered in this episode: as the objects also lie behind each other, how is it decided which pixels of which objects are drawn on the screen? Does this also happen by the means of linear algebra or is it more like a brute force algorythm?
@MadManMarkAu
@MadManMarkAu 10 лет назад
He didn't show how perspective is applied. It's pretty simple, but still a crucial step. It would have been interesting to show how the (as yet unmentioned) [w] component comes into play in a projection transform.
@OddStare
@OddStare 4 года назад
The thing i never understood with this concept of "the world is moving not the camera" is if i have a scene with two camera looking at each other, i can see what they both render and i decide to move one of them i can see this camera object moving in the other one so how does it do translation ? You can't translate twice at the same time right ?
@TheOnlyGeggles
@TheOnlyGeggles 10 лет назад
Didn't understand everything, but still nice to know.
@AlexN5142
@AlexN5142 10 лет назад
How does the projective matrix work? How does this differ from raytracing? How exactly do you decide where the origins of each of the coordinate systems are?
@Nattakorps
@Nattakorps 10 лет назад
Thanks for the tip on the free book, I recently lost neuromancer in a fire before I got to read it. this is the next best thing to buying a new copy.
@rangdor
@rangdor 10 лет назад
What books or websites would you recommend for this topic?
@coltonmoore6358
@coltonmoore6358 10 лет назад
Why do so many people not like this video (and the others computerphile videos as well)? Am I missing something that would change my perspective or is it just because I have different taste in videos?
@JustinKoenigSilica
@JustinKoenigSilica 10 лет назад
awesome!
@sporkafife
@sporkafife 10 лет назад
"We can have a world-view transformation" I'll tell you who needs a worldview transformation, the government! Think they are all that...
@Simaisan
@Simaisan 10 лет назад
I love these videos !
@symbioticparasite6268
@symbioticparasite6268 Год назад
Came from understanding z fighting to this, great explanation!
@jasonpitt368
@jasonpitt368 10 лет назад
YES, something I've always wondered about :)
@AllTheJon
@AllTheJon 10 лет назад
What's the point of the clipping step? If it's just iterating over all the pixels and asking if each pixel is inside a triangle, what does it matter if part of that triangle is outside the view?
@hotrodmind
@hotrodmind 10 лет назад
I always thought that these objects were placed in a finite world space and that the supposed "camera" actually moved around and then displayed those things relative to how far the camera was away from it .. Would this be more computationally awkward than what was explained here ??
@clearmenser
@clearmenser 10 лет назад
Can we see similar videos on other Computer Rendering technology like Subsurface Scattering, Ambient Occlusion, Ray Tracing, Subdivision Surfaces... ?
@TheGregcawthorne
@TheGregcawthorne 10 лет назад
When going through all of the polygons and pixels to see if the pixel is in the polygon, that could take a hell of a lot of computation for complex worlds. You'd have to scan all the polygons in your world for every pixel! I guess that's why you have meaty GPUs.
@DarkSamus918
@DarkSamus918 10 лет назад
I really could have used this two weeks ago when I took a graphics programming final XD
@quietthomas
@quietthomas 10 лет назад
0:19 - is he breaking into song there? Reminds me of that Radiolab episode: www.radiolab.org/story/91513-behaves-so-strangely/
@LittlePeng9
@LittlePeng9 10 лет назад
So that's how Sean looks like :O
@kwinvdv
@kwinvdv 10 лет назад
I wonder if 3D games/software will always keep using polygons (triangles). I know that a company in Australia called Euclideon is developing a fast method of doing similar like sparse voxel octree, which uses a 3D point cloud and searches for a point which would represents each pixel. I do wonder if their search algorithm would also perform well in dynamic worlds, since in the examples I have seen the world seemed static.
@Tossphate
@Tossphate 10 лет назад
Hello people. Back in the day I used to play Sega Rally on the Saturn. The road would get all distorted where it was close to the "plane" of the screen. I aint a technical guy, but I do know that the Saturn did not have "z-buffering", whatever that is (the playstation did though). Is that polygon distortion something to do with the clipping thing that John is talking about here or something else?
@Andrewsarcus
@Andrewsarcus 10 лет назад
You could also create a circle from the three points on the plane.
@combatshadowz
@combatshadowz 7 лет назад
Pardon my ignorance, but is this technique of dividing shapes into triangles applicable to everything we see on our screens i.e. images, movie clips (basically 2D content) or it is it only for 3D contents like games and simulation? Simply put, are all pixels on our screens made up of triangles, be it 2D or 3D content?
@kibromfesseha9960
@kibromfesseha9960 10 лет назад
If pixels on a screen were shaped like triangles instead of squares or dots would the process of projecting the 3D objects into pixels be easier? Also at 2:50 I'm reminded of one time in Futurama where Professor Farnsworth explains that the ship never moves,but rather, the entire universe is moved by the engine and that the idea that the ship is moving through space is an illusion...
@justahker3988
@justahker3988 10 лет назад
Talk about the Phong reflection model next? (And perhaps get yourself access to an actual 3D software program?)
@Charlie2531games
@Charlie2531games 10 лет назад
I would have appreciated some of the actual mathematics behind some of this. Perhaps in a future video?
@MrGryph78
@MrGryph78 10 лет назад
There's an earlier video in this series on this channel that goes over some of the linear algebra techniques used to perform scale/rotation/translation transformations. Pretty much everything is achieved using some combination of those transformations.
@maloney670
@maloney670 10 лет назад
Would be great if you explained the projection transformation in terms of the mathematics :) That would be interesting :D
@Aliferopoulos
@Aliferopoulos 10 лет назад
I'd love to see an implementation in code :)
@unidorsalicosahedron7416
@unidorsalicosahedron7416 9 лет назад
How does the computer decide whether or not a pixel is "within" the triangle? Would it actually do this for every single pixel?
@d4v01d
@d4v01d 9 лет назад
Dör Is there's a few ways of doing that but a common one is for each pixel the computers draw an imaginary line either to the left or right. if this line crosses 2 sides of the triangle the pixel is outside the triangle. if the line only crosses one side of the triangle then it's inside. I think this is called scanline rendering, but not sure about that. And yes, for every pixel and furthermore, every pixel against every triangle (not account for optimisations, culling etc).
@DeoMachina
@DeoMachina 10 лет назад
Seconding Neuromancer SO HARD. Reading it in the 21st century is kind of a trip, when you realise it was written in the 80's.
@jdgrahamo
@jdgrahamo 10 лет назад
So simple -- and so complicated.
@bartekkko
@bartekkko 10 лет назад
but what about deciding whether an object is behind another object
@flyndutchmn
@flyndutchmn 10 лет назад
Tom Waits+Jeff Goldblum= this guy!
@KnightRiderDDR
@KnightRiderDDR 10 лет назад
"Neo, the camera doesn't move around you. You move around the camera." Or was it with spoons :D
@capitangoldfish
@capitangoldfish 10 лет назад
world space transformation or global transformation? and isnt the camera just another object in the space with its own coordinates aswell?
10 лет назад
You have to watch Gilbert Strang's videos from MIT, those are the best on linear algebra!
@PiMaster9001
@PiMaster9001 10 лет назад
I've been getting my feet wet in OpenGL recently, so this hits quite close to home.
@ValsGym
@ValsGym 10 лет назад
This guy is fucking with my mind.
@fusobotic
@fusobotic 10 лет назад
Awesome video! Btw, if anyone wants to experiment with 3D for free, check out Blender 3D or Google Sketchup.
@HKragh
@HKragh 10 лет назад
Yeah, and then import the models into Unity to actually build a game. Also free...
@Sirpackerfan8812
@Sirpackerfan8812 10 лет назад
this guy could play a diabolical villan in a movie
@matrinGD
@matrinGD 10 лет назад
Why would you need to clip the triangle to the viewport? When colouring the pixels, aren't you going to traverse the viewport and consider those pixels only? Even if some part of the triangle lies outside the viewport, it shouldn't have an effect on how you colour pixels within the viewport.
@ZipplyZane
@ZipplyZane 10 лет назад
The way I understand it, it's so you don't actually have to analayze every single pixel. By clipping, you can get it down to just the vertices and then just auto fill everything in between them.
@Zalaniar
@Zalaniar 10 лет назад
Your next video should expand on this by talking about antialiasing!