Math for Game Programmers: Understanding Homogeneous Coordinates

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ต.ค. 2024

ความคิดเห็น • 63

  • @KKomalShashank
    @KKomalShashank 3 ปีที่แล้ว +17

    Squirrel Eiserloh was my game programming professor at SMU Guildhall. He was the best teacher I ever had. The most amazing person, who explained complex concepts in such a cool, interesting and easy-to-understand manner. Everyone has their No. 1 teacher that they remember fondly for the rest of their lives. For me, that teacher is Squirrel Eiserloh.

  • @EliorFureraj15
    @EliorFureraj15 6 ปีที่แล้ว +37

    At 19:50, he takes the extreme example of w -> 0, and that makes the projected image approach infinity in size.
    I feel that the opposite is a bit more intuitive: as the distance (z) and hence w approaches infinity, x and y approach 0. This means the an object moving farther away, becomes smaller and effectively disappears at infinite distance. You can see this in the vanishing point artists use in perspective drawings.

    • @magnusm4
      @magnusm4 4 ปีที่แล้ว +2

      I've seen some funny Unity tutorials showing the illusion by using two spheres. One is moving back and forth and the other is growing and shrinking and you can't tell the difference.

    • @khoavo5758
      @khoavo5758 6 หลายเดือนก่อน

      The image of an “infinitely far away” object can land anywhere on the horizon. There are infinitely many vanishing points, and these are *different* from points at infinity.
      Edit: Not to mention there are infinitely many horizons. To see that, just tilt your head: you can make the horizon vertical if you want.

  • @theIpatix
    @theIpatix 6 ปีที่แล้ว +39

    I really like these relatively basic but educational talks.

    • @ThefamousMrcroissant
      @ThefamousMrcroissant 5 ปีที่แล้ว +4

      It's basic linear algebra. It's probably in the realm of "intermediate" simply because of that. I do agree though, it's relaxing to be able to sit through a lecture without having to think much about what is being said.

    • @andrewherrera7735
      @andrewherrera7735 3 ปีที่แล้ว

      Just watch a youtube tutorial. These are meant to be presentations about professional game development not lessons.

  • @ahbarahad3203
    @ahbarahad3203 4 ปีที่แล้ว +2

    I have watched this video for 4 times now, its beautiful

  • @zoltankurti
    @zoltankurti 4 ปีที่แล้ว +2

    To be honest the only way to understand perspective projection is to go through the calculations once yourself. Set up a virtual screen and the far clip plane in worldspace, and calculate where a point has to go in NDC space. Than realize that you always have to divide by the same formula, so you can do that by writeing it in w. The hardware/driver will do the prespective division automagically before rasterization.

  • @HairyPixels
    @HairyPixels 6 ปีที่แล้ว +37

    I thought matrix transforms were black magic! Amazing to understand that after a mere 20 minutes. Good work!

    • @elultimopujilense
      @elultimopujilense 4 ปีที่แล้ว +1

      this is just the tip of the iceberg, there a whole lot more to learn. I would advice you to read Multiple View Geometry by Hartley and Zisserman. Once you have a clear understanding of the math the possibilities are infinite, not just for graphics proramming but also for computer vision and robotics.

    • @elultimopujilense
      @elultimopujilense 3 ปีที่แล้ว

      @@ginxxxxx thanks! I didnt knew that advise was a verb, and advice a noun. Thanks for pointing that out! Its a sign that I need to read and write way more than i think.

  • @badradish2116
    @badradish2116 3 ปีที่แล้ว +3

    the translation column /is/ a position -- its the position of the origin of the graph

    • @zynix976
      @zynix976 3 ปีที่แล้ว +3

      Precisely! The transformation matrix can be thought of as defining our coordinate system, and every vector we input through it (ie, every vector we multiply it) is going to be put in relation to the new coordinate system. Think of his example of the dog-head sprite. It is expressed in some local coordinate space by a position. After applying the transformation matrix, the result is the sprite being "placed" in the new coordinate system, defined by the transformation matrix (but crucially, the actual coordinates, are still in "our" coordinate set: The local ones). It's basically doing half of a change of basis - see for example the 3blue1brown video on change of basis.

  • @DlcEnergy
    @DlcEnergy 5 ปีที่แล้ว +1

    yesterday i google'd "homogeneous coordinates" and watched two great videos
    today youtube recommends me this even more awesome video
    that spelled it all out perfectly. and introduced plucker coordinates, whatever those are.

    • @Ray25689
      @Ray25689 5 ปีที่แล้ว

      But keep in mind, all those things are just simplifications from projective space and plucker coordinates to make them more intuitive. To understand the real reasons and logic behind it (f.e. why you call directions points with an infinite distance or why you dont have problems with forcing w to be 0 or 1), it not suffices to look at those videos.

  • @amortalbeing
    @amortalbeing 2 ปีที่แล้ว

    This was fantastic, wish this to last much longer

  • @amilamad
    @amilamad 6 ปีที่แล้ว +5

    Hey , Thanks for this video. Now I can understand the magic of projection matrix. :)

  • @DenerWitt
    @DenerWitt 6 ปีที่แล้ว +1

    very nice
    I've worked with matrices in shaders and translations/rotations but never actually understood them, but now I understand what the hell w is a little better

  • @200kolya
    @200kolya 3 ปีที่แล้ว

    this is the best video explaning the use of matix multiplications an homogeneous vectors and how they work

  • @manuelpagliuca
    @manuelpagliuca 3 ปีที่แล้ว

    This was really good, thank you.

  • @IIARROWS
    @IIARROWS 3 หลายเดือนก่อน

    11:03 this is Bender that is dreaming of one and zero, and it turned into a nightmare because suddenly there was a 2!

  • @antonydellavecchia2301
    @antonydellavecchia2301 3 ปีที่แล้ว

    great talk

  • @authentic6825
    @authentic6825 5 ปีที่แล้ว +3

    Holy shit, this is good

  • @tech_science_tutos4155
    @tech_science_tutos4155 4 ปีที่แล้ว

    very very good, excellent

  • @josbelclobo1376
    @josbelclobo1376 6 ปีที่แล้ว

    Hello! Thanks for your videos. I am a Web Developer and I would like to start learning Game Programming, but, I don't know how to start off. Any suggestions? Thank you.

    • @coen44444
      @coen44444 6 ปีที่แล้ว +1

      Start off with scripting (C# for Unity perhaps?), learn about vector math (which is basic game math). And try out a game engine like Unity.

    • @josbelclobo1376
      @josbelclobo1376 6 ปีที่แล้ว

      Thank you! I'm looking for it. I know some things about mathematics, because I'm Systems Engineer and studied a lot of Physics and Mathematics. I'll tell you how I'm progressing. Kind regards.

    • @amilamad
      @amilamad 6 ปีที่แล้ว +1

      Ya you dont have to be expert on 3D math. Sometimes for 3D games all you need is simple 2D vector math.

    • @annogaming9535
      @annogaming9535 6 ปีที่แล้ว +1

      planning.cs.uiuc.edu/node99.html#eqn:2dhomog or if you don't want links just google "steven m. lavalle 2d homogeneous". it explains coordinates in a very good way. And also, do some tutorials in unity. they give you good understanding of how to make games and you learn things not specific for unity but more like how different things work together to make a whole game.

  • @deltakid0
    @deltakid0 3 ปีที่แล้ว

    Juan Luis Guerra imparting math, impressive.

  • @AM-jx3zf
    @AM-jx3zf 6 หลายเดือนก่อน

    weird cut at 2:35

  • @martin6548
    @martin6548 6 ปีที่แล้ว +1

    Imagine the greatnes of first person wich was able to invent this rules

    • @Scy
      @Scy 6 ปีที่แล้ว +1

      William Rowan Hamilton, or Benjamin Olinde Rodrigues. The latter sort of discovered it first, but Hamilton got the big picture.

    • @AE-yr6mo
      @AE-yr6mo 3 ปีที่แล้ว

      @@Scy stfu

    • @AkamiChannel
      @AkamiChannel 2 ปีที่แล้ว

      @@Scy Hamilton invented quaternions, but using homogeneous coordinates so that you can use matrices to conduct affine transformations? Was he the one to invent that?

  • @starplatinum3305
    @starplatinum3305 11 หลายเดือนก่อน +2

    Bro got that W rizz ?
    Im sorry 😔🔫

    • @cheesepie4ever
      @cheesepie4ever 10 หลายเดือนก่อน +1

      A follow Gen Z in the comments

  • @seditt5146
    @seditt5146 5 ปีที่แล้ว +2

    14:00 " I have a super cheezy JIFF" It is so funny, people got trolled by the creator of GIFs and now they think it is correct to pronounce it with a J. I laugh every time I hear someone do that it's great.

  • @jayp9158
    @jayp9158 10 หลายเดือนก่อน

    The lecturer is going too fast and made several presumptions. This was particularly problematic when he performed the matrix operations.

  • @jgcooper
    @jgcooper 6 ปีที่แล้ว +21

    good talk, but you switch too much and too fast between slides, try to time 1 sec between switching slides when comparing them, and try not to switch them when unnecessary, otherwise you're subjecting viewers to your trigger happy finger ocd which is irrelevant and disorienting to them.

    • @MatheusLB2009
      @MatheusLB2009 6 ปีที่แล้ว +1

      Agreed. I think the talk was more of a quick guide on math for beginners, rather than a recap for someone who already studied it, so he shouldnt go too fast. Still good tho

    • @ZoidbergForPresident
      @ZoidbergForPresident 6 ปีที่แล้ว

      Yeah, it lost me too (and annoyed me :p)

    • @ZoidbergForPresident
      @ZoidbergForPresident 6 ปีที่แล้ว

      Not a talk for I then. :/

    • @HairyPixels
      @HairyPixels 6 ปีที่แล้ว +1

      He probably agrees but he's just doing his best despite. I'm sure I'd mess it up also myself. :)

    • @Nightlurk
      @Nightlurk 6 ปีที่แล้ว +1

      Oh the greatness of YT providing the ability to slow down playback speed!

  • @fluffyking94
    @fluffyking94 6 ปีที่แล้ว +2

    It's videos like these that remind me that I can never be a game designer.
    I have no clue what is happening at all in this talk.

    • @jostein6581
      @jostein6581 6 ปีที่แล้ว +7

      COLTON DOUGHERTY Rome wasn't built in one day. Take your time and play around making simple 3D scenes in OpenGL. Make it fun :)

    • @youreallinsane
      @youreallinsane 6 ปีที่แล้ว +13

      Game design isn't programming. I assume you meant you could never be a programmer, and, like jostein said, you learn a little bit at a time. I'm a self-taught programmer and i don't understand a lot of these talks, but i manage anyway.

    • @amilamad
      @amilamad 6 ปีที่แล้ว +4

      hey this is for someone who has intermediate knowledge of 3D math. I have developed games and simulation software for 5 years without knowing how the projection works. Sometimes you don`t have to know the deep especially when you are not in to graphics programming. Chill and try to learn from a simple OpenGL tutorial. Good luck !

    • @zoriiginalx7544
      @zoriiginalx7544 2 หลายเดือนก่อน

      A game designer doesn’t need to know this let alone a gameplay programmer. But if you are a graphics/engine programmer, it’s likely pertinent to know this given that you are going to be dealing with vec4s everywhere in the graphics API code.

  • @youreallinsane
    @youreallinsane 6 ปีที่แล้ว

    This was a long way to go to explain how a basic 3d engine works.

    • @error.418
      @error.418 6 ปีที่แล้ว +7

      This really wasn't a long way to go. It was concise and clear.

    • @DenerWitt
      @DenerWitt 6 ปีที่แล้ว +7

      thats how teaching works, either you do it properly and clear, or you dont
      maybe on your head these things are all very short and simple, but to present/teach you actually need to make sure you are being understood
      btw the presentation was short

    • @DlcEnergy
      @DlcEnergy 5 ปีที่แล้ว

      your head forms an efficient understanding once you understand the logic. you could write it down and perfectly understand it on a single slide. but your prior self would take longer to take in and understand that the same way. you'd have to do the thinking yourself. what this video does, is give you the perfect chain of thought processes needed. the questions that need answering to properly understand it. heck, your prior self could try skim through the slideshow hisself and see if he'd understand it all faster. but no, having it explained at the right pace was best.

    • @zoriiginalx7544
      @zoriiginalx7544 2 หลายเดือนก่อน

      It was a great, detailed explanation in the short time he was given, and he wasn’t even intending to cover how 3D engines worked. He was simply providing insights and use cases into a mathematical system that often puzzles people.
      Besides, 3D engines are complex (even basic ones) and this doesn’t even begin to scratch the surface given the only aspect covered was perspective projection. You can’t imagine that someone can explain in detail how the entire graphics pipeline outputs a triangle in 20ish minutes without it being surface level at best.

  • @jamesrockford2626
    @jamesrockford2626 6 ปีที่แล้ว

    bad