Triangles to Pixels - Computerphile

Sdílet
Vložit
  • čas přidán 17. 12. 2013
  • 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 : • A Universe of Triangle...
    2/ Power of the Matrix : • The True Power of the ...
    3/ Triangles to Pixels : • Triangles to Pixels - ...
    4/ Visibility Problem : • The Visibility Problem...
    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

Komentáře • 194

  • @superjugy
    @superjugy Před 10 lety +46

    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 Před 10 lety +190

    Does anyone else really like this guys voice?

    • @zoranhacker
      @zoranhacker Před 10 lety +28

      ***** everyone thinks their voice is horrible

  • @Kram1032
    @Kram1032 Před 10 lety +32

    /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!"

  • @GuildOfCalamity
    @GuildOfCalamity Před 9 lety +47

    I never knew Sean Connery's son was so good with graphics math.

  • @tiny_rebel
    @tiny_rebel Před 10 lety +57

    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 Před 10 lety +39

    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 Před 10 lety +3

      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 Před 10 lety +54

    Huzzah, love these videos!

  • @ScottLahteine
    @ScottLahteine Před 10 lety +18

    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 Před 10 lety +3

      Personally, i'm looking for video of shaders too.. I'm precisely at that point of learning curve myself...

    • @serkval7025
      @serkval7025 Před 10 lety +4

      i really wish an episode about shaders

    • @druidshmooid
      @druidshmooid Před 10 lety

      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).

  • @RsTheZigec
    @RsTheZigec Před 10 lety

    This is by far my favourite series of videos on all your chanels. Thanks !

  • @HunMASK
    @HunMASK Před 10 lety

    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.

  • @PabloBrubeck
    @PabloBrubeck Před 10 lety +7

    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...

    •  Před 10 lety +5

      I'll share some of the math and routines I wrote long ago. I would suggest exploring Java3D and OpenGL APIs.
      ;)

    • @PabloBrubeck
      @PabloBrubeck Před 10 lety +2

      Thanks!

  • @lebagelboy
    @lebagelboy Před 10 lety

    these videos are just getting better and better

  • @tobortine
    @tobortine Před 10 lety +40

    It's rare to see genius but even more so on You Tube.

  • @mothman.industries
    @mothman.industries Před 10 lety

    Really enjoying this series. Thanks for putting it together, guys.

  • @Dayanto
    @Dayanto Před 10 lety +6

    I really hope they mention the depth buffer. That was probably my biggest 'aha!' experience I've had with computer graphics.

  • @piranha031091
    @piranha031091 Před 10 lety +27

    He looks a bit like a movie supervillain when he talks. Especially around 4:03 , I'd guess he'd make a convincing Joker!

  • @MohammadAdib
    @MohammadAdib Před 10 lety +14

    I've always wanted to know this! Great video :)

  • @MindLessWiz
    @MindLessWiz Před 10 lety

    Freaking awesome! Keep it up, I absolutely love this series!

  • @zob314
    @zob314 Před 10 lety +5

    hey look, an actual use for all that math i learned in high school.

  • @squidcaps4308
    @squidcaps4308 Před 10 lety

    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.).

  • @ddoodm
    @ddoodm Před 10 lety +3

    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 Před 10 lety

      any example of calculation? or any site you know whith an example, thanks

    • @ddoodm
      @ddoodm Před 10 lety +1

      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/

  • @seigeengine
    @seigeengine Před 10 lety +17

    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 Před 10 lety

    This series of videos on triangles, matrices, and graphics etc was really awesome :)

  • @Spiderboydk
    @Spiderboydk Před 10 lety +1

    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 Před 10 lety

      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 Před 10 lety

      ***** 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.

  • @cazino4
    @cazino4 Před 5 lety

    Such an intuitive explanation of quite an involved topic. Thank you.

  • @Ubeogesh
    @Ubeogesh Před 10 lety +16

    A question remains after watching this video - how the projectile transformation works?

    • @Qbe_Root
      @Qbe_Root Před 10 lety

      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 Před 10 lety +1

      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 Před 10 lety +3

      Its called rasterisation,
      en.wikipedia.org/wiki/Rasterisation

  • @apandaboy
    @apandaboy Před 10 lety

    Thanks for this explanation. Always struggled to understand this. Nice to see it from a high level!

  • @stalkerinis
    @stalkerinis Před 10 lety +1

    This is great! Hopefully the next video will be VERY in-depth about shaders. I would like him to talk about programmable shaders too :)

  • @RyanJensenEE
    @RyanJensenEE Před 10 lety

    Wow. I'm really liking this video series!

  • @ericsbuds
    @ericsbuds Před 10 lety

    awesome, cant wait for the next vid

  • @bruno_sjc_
    @bruno_sjc_ Před 7 lety +1

    Bro, this channel is awesome

  • @GBFU2016
    @GBFU2016 Před 10 lety

    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 Před 10 lety

    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.

  • @SamBrev
    @SamBrev Před 10 lety +5

    can we have a bit of an explanation on the projection matrix (i assume you use a matrix) and how it works?

    • @SamBrev
      @SamBrev Před 10 lety +1

      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/

  • @sergheiadrian
    @sergheiadrian Před 10 lety +3

    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 Před 10 lety +17

    Fourier Transform please!

  • @DFX2KX
    @DFX2KX Před 10 lety

    great video as always, guys! Wow, takes me back a few years. (and next we'll talk about backface culling :P:)

  • @ashwith
    @ashwith Před 10 lety +1

    So that's who Sean is (never seen him on any videos before). Thanks for making these videos! :-)

  • @theTOOLshed1
    @theTOOLshed1 Před 10 lety

    Awesome video

  • @keistzenon9593
    @keistzenon9593 Před 7 lety

    i had to learn this from a book, this graphical explanation makes it so easy :p

  • @armouredhen30
    @armouredhen30 Před 10 lety

    More videos with this guy please!

  • @Fuogger
    @Fuogger Před 10 lety +1

    I must admit I'm curious about the projective transformation. And would love to see more about how it works

  • @sporkafife
    @sporkafife Před 10 lety +11

    "We can have a world-view transformation"
    I'll tell you who needs a worldview transformation, the government! Think they are all that...

  • @the80386
    @the80386 Před 10 lety +1

    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 Před 10 lety +1

      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 Před 10 lety

      hey thanks buddy. clean and simple :)

  • @SoulboundDragon
    @SoulboundDragon Před 10 lety

    Great video! :D

  • @Slutuppnu
    @Slutuppnu Před 10 lety

    These videos are great. Please do one on how to interpolate pixels over the triangle (barycentric interpolation).

  • @Darieee
    @Darieee Před 10 lety +1

    you guys should add links between series of videos - it looks as if there's one before this one - is there ?

  • @boenrobot
    @boenrobot Před 10 lety +7

    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 Před 10 lety +2

      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 Před 10 lety +1

      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 Před 10 lety +2

      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.)

  • @slpk
    @slpk Před 10 lety

    Hey Sean! There you are!

  • @LymonAdd
    @LymonAdd Před 10 lety

    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.

  • @ammobake
    @ammobake Před 7 lety

    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).

  • @TheOnlyGeggles
    @TheOnlyGeggles Před 10 lety +2

    Didn't understand everything, but still nice to know.

  • @Nattakorps
    @Nattakorps Před 10 lety

    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.

  • @Melthornal
    @Melthornal Před 10 lety +3

    Very nice. Are you going to be getting into things like antialiasing next?

  • @LittlePeng9
    @LittlePeng9 Před 10 lety +4

    So that's how Sean looks like :O

  • @reitube2
    @reitube2 Před 9 lety +3

    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..

  • @JustinKoenigSilica
    @JustinKoenigSilica Před 10 lety

    awesome!

  • @Pfaeff
    @Pfaeff Před 10 lety

    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.

  • @Simaisan
    @Simaisan Před 10 lety

    I love these videos !

  • @DrDeeDot
    @DrDeeDot Před 10 lety

    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.

  • @jasonpitt368
    @jasonpitt368 Před 10 lety

    YES, something I've always wondered about :)

  • @DarkSamus918
    @DarkSamus918 Před 10 lety

    I really could have used this two weeks ago when I took a graphics programming final XD

  • @Azwoh
    @Azwoh Před 10 lety

    John Chapman is easy listening

  • @MadManMarkAu
    @MadManMarkAu Před 10 lety +1

    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.

  • @coltonmoore6358
    @coltonmoore6358 Před 10 lety

    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?

  • @SyntekkTeam
    @SyntekkTeam Před 10 lety

    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?

  • @TheGregcawthorne
    @TheGregcawthorne Před 10 lety

    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.

  • @symbioticparasite6268

    Came from understanding z fighting to this, great explanation!

  • @Charlie2531games
    @Charlie2531games Před 10 lety +2

    I would have appreciated some of the actual mathematics behind some of this. Perhaps in a future video?

    • @MrGryph78
      @MrGryph78 Před 10 lety

      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.

  • @Astfresser
    @Astfresser Před 10 lety

    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?

  • @whtiequillBj
    @whtiequillBj Před 10 lety +1

    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

  • @AlexN5142
    @AlexN5142 Před 10 lety

    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?

  • @DeoMachina
    @DeoMachina Před 10 lety

    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.

  • @kibromfesseha9960
    @kibromfesseha9960 Před 10 lety

    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...

  • @OddStare
    @OddStare Před 4 lety

    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 ?

  • @justahker3988
    @justahker3988 Před 10 lety

    Talk about the Phong reflection model next? (And perhaps get yourself access to an actual 3D software program?)

  • @KnightRiderDDR
    @KnightRiderDDR Před 10 lety +1

    "Neo, the camera doesn't move around you. You move around the camera." Or was it with spoons :D

  • @maloney670
    @maloney670 Před 10 lety

    Would be great if you explained the projection transformation in terms of the mathematics :) That would be interesting :D

  • @rangdor
    @rangdor Před 10 lety

    What books or websites would you recommend for this topic?

  • @flyndutchmn
    @flyndutchmn Před 10 lety

    Tom Waits+Jeff Goldblum= this guy!

  • @combatshadowz
    @combatshadowz Před 7 lety

    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?

  • @PiMaster9001
    @PiMaster9001 Před 10 lety +1

    I've been getting my feet wet in OpenGL recently, so this hits quite close to home.

  • @clearmenser
    @clearmenser Před 10 lety

    Can we see similar videos on other Computer Rendering technology like Subsurface Scattering, Ambient Occlusion, Ray Tracing, Subdivision Surfaces... ?

  • @AllTheJon
    @AllTheJon Před 10 lety

    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?

  • @GeorgeStanmore
    @GeorgeStanmore Před 8 lety +6

    Don't collapse Z because depth test

  • @hotrodmind
    @hotrodmind Před 10 lety

    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 ??

  • @Andrewsarcus
    @Andrewsarcus Před 10 lety

    You could also create a circle from the three points on the plane.

  • @Tossphate
    @Tossphate Před 10 lety

    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?

  • @quietthomas
    @quietthomas Před 10 lety

    0:19 - is he breaking into song there?
    Reminds me of that Radiolab episode: www.radiolab.org/story/91513-behaves-so-strangely/

  • @kwinvdv
    @kwinvdv Před 10 lety

    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.

  • @BastetFurry
    @BastetFurry Před 10 lety +1

    If you want to experiment a bit with this in QBasic or whatever, here is a hint:
    dx = x/z:dy = y/z
    (Yep, thats all there is to it ;) )

  •  Před 10 lety

    You have to watch Gilbert Strang's videos from MIT, those are the best on linear algebra!

  • @unidorsalicosahedron7416
    @unidorsalicosahedron7416 Před 9 lety +1

    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 Před 9 lety +2

      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).

  • @fusobotic
    @fusobotic Před 10 lety

    Awesome video! Btw, if anyone wants to experiment with 3D for free, check out Blender 3D or Google Sketchup.

    • @HKragh
      @HKragh Před 10 lety

      Yeah, and then import the models into Unity to actually build a game. Also free...

  • @Zalaniar
    @Zalaniar Před 10 lety

    Your next video should expand on this by talking about antialiasing!

  • @Aliferopoulos
    @Aliferopoulos Před 10 lety

    I'd love to see an implementation in code :)

  • @jdgrahamo
    @jdgrahamo Před 10 lety

    So simple -- and so complicated.

  • @ValsGym
    @ValsGym Před 10 lety

    This guy is fucking with my mind.

  • @Sirpackerfan8812
    @Sirpackerfan8812 Před 10 lety

    this guy could play a diabolical villan in a movie

  • @iamstickfigure
    @iamstickfigure Před 10 lety +12

    Wtf? He only colored in half of one of the pixels. XD.

    • @PoweredMinecart
      @PoweredMinecart Před 10 lety +8

      Anti-aliasing.

    • @iamstickfigure
      @iamstickfigure Před 10 lety

      So, I guess he'll get to that next video? Lol.

    • @PoweredMinecart
      @PoweredMinecart Před 10 lety +1

      I knew that, it is quite impossible to phsically divide a pixel in half without discolouration. I guess it sort of acts as half a pixel allowing for clearer edges.

    • @six2013
      @six2013 Před 10 lety +2

      PoweredMinecart McUnite That's not how anti-aliasing works... you physically can't have half a pixel.

    • @ZipplyZane
      @ZipplyZane Před 10 lety

      six2013 It's pretty close. Antialiasing, at least in concept, analyzes the portion of the pixel that is shaded and then chooses a color for said pixel that represents that portion. It portrays spacial information in the realm of color, since color is all a particular pixel has.