Miolith
Miolith
  • 1
  • 58 450
Quick Understanding of Homogeneous Coordinates for Computer Graphics
Graphics programming has this intriguing concept of 4D vectors used to represent 3D objects, how indispensable could it be so that every 3D graphics API force it on its users ?
Follow me on social media to learn more about computer graphics or the other projects I work on.
Twitter x.com/Miolith_
ShaderToy www.shadertoy.com/user/Miolith
Переглядів: 58 524

Відео

КОМЕНТАРІ

  • @bharath2633
    @bharath2633 7 днів тому

    Thank you for the explanation! The video is very helpful :)

  • @toonlink9608
    @toonlink9608 11 днів тому

    You explained this far better than my professor did, thank you so much

  • @klaus-udokloppstedt6257
    @klaus-udokloppstedt6257 14 днів тому

    this clip lives up 💯% to its title, up to the very last sentence, giving an explanation why it is called homogenous. 👍

  • @MyKarcio
    @MyKarcio 18 днів тому

    How you do this amazing montage with animations? It's manim ?

  • @victorcesar5698
    @victorcesar5698 25 днів тому

    Amazing video! Thank you so much!

  • @misspps_
    @misspps_ 27 днів тому

    best explanation

  • @ComputerGuru-tk2hg
    @ComputerGuru-tk2hg Місяць тому

    This is so awesome made fall in love with limnear algebra my lecturer made it hell you made it heaven

  • @donnyjoe7653
    @donnyjoe7653 Місяць тому

    Awesome explanation! Thank you for the effort!

  • @zihengliao236
    @zihengliao236 Місяць тому

    You are amazing

  • @carlosgruss7289
    @carlosgruss7289 Місяць тому

    Amazing video, thank you man

  • @williamwang4295
    @williamwang4295 Місяць тому

    this is the only video for your channel and it's awsome

  • @alonsorobots
    @alonsorobots Місяць тому

    This is so high quality for being your only video uploaded!!! More please!!!

  • @baya8093
    @baya8093 Місяць тому

    you should have said how would you transalte it when doing with multiple transformation

  • @nkzshinnik
    @nkzshinnik Місяць тому

    Best video on the topic

  • @teh1archon
    @teh1archon 2 місяці тому

    Hands down, that was the best explanation for this I've ever seen.

  • @JorneRichard
    @JorneRichard 2 місяці тому

    Thanks a lot! this is really helpful!

  • @dn275
    @dn275 2 місяці тому

    Great video! I’d love to learn more from you. I hope you end up making more videos.

  • @passionatechristianworker
    @passionatechristianworker 2 місяці тому

    very helpful, thank you!

  • @imil6798
    @imil6798 2 місяці тому

    Terima kasih. Ini yang saya cari selama ini.

  • @rodrigolanesmeneses
    @rodrigolanesmeneses 2 місяці тому

    Amazing video! Also, that was a great use of the 3Blue1Brown's Manim library for design

  • @S1625-u1r
    @S1625-u1r 3 місяці тому

    Very good explanation, thank you

  • @Tsura1998
    @Tsura1998 3 місяці тому

    This summarized in 7 minutes what my prof couldn't teach me in 3 days... amazing job!

  • @SerKBer
    @SerKBer 3 місяці тому

    Amazing video! Thank you so much. Btw with what software did you do it??

  • @Hostlyy
    @Hostlyy 3 місяці тому

    BRO U THE GOAT MANNN

  • @beegdigit9811
    @beegdigit9811 3 місяці тому

    Bro made a professional YT icon, banner and 1 video and just said f it xd

    • @hamzaf19
      @hamzaf19 28 днів тому

      Lmfaooo underrated comment

  • @coldtech06
    @coldtech06 3 місяці тому

    I now have the knowledge... no one can stop me now

  • @hkdfl-nu3bd
    @hkdfl-nu3bd 3 місяці тому

    Awesome Explanation 🫡❤❤🫡

  • @kingoftennis94
    @kingoftennis94 3 місяці тому

    Really excellent video

  • @krux02
    @krux02 4 місяці тому

    There is another use case. By setting w=0 you can represent vertices at infinity. If you want to implement e.g. shadow volumes (not shadow maps, this is different), where the geometry shader moves vertices to infinity, you can actually do that by setting the value to (x y z 0). You don't get a division by 0 error from the gpu. I've never tested the performance of this though.

  • @L.Mandrake
    @L.Mandrake 4 місяці тому

    Homo-genius!

  • @03-AALIYAH
    @03-AALIYAH 4 місяці тому

    Purely directional vectors (homogeneous coordinates with w = 0) can also be used to represent points at infinity. This is useful for simplifying intersection computations - the intersection of e.g. two parallel lines is a point at infinity, not "no point". If you really want to go nuts, you can extend the coordinate system to lines and planes (which also get easy intersections and even unions, e.g. find the line passing through two given points), and introduce rigid transformations (quaternions and dual quaternions), which have nice properties for rigid body physics and skeletal animation. The result is called projective geometric algebra, which provides a unified representation and a simple set of operations for all of these objects. Quaternions are not actually magical!

    • @bonbonpony
      @bonbonpony 2 місяці тому

      Where can I learn more about this stuff? I, too, found it surprising that projective geometry has not been mentioned the single time in this video, considering how much it is tied to homogeneous coordinates. And yet no one seems to be explaining that connection when talking about homogeneous coordinates in 3D graphics.

  • @egorsozonov7425
    @egorsozonov7425 4 місяці тому

    On 3:10 I think you’re wrong. Sure, this removes the need for vector addition, but now each multiplication is slower. Multiplying 3x3 matrices requires more than 2x operations that 2x2 ones, and you’re doing three such multiplications vs only one addition! So I think this has detrimental effects on performance, in fact

    • @abidanbrito
      @abidanbrito 3 місяці тому

      I get your point, but you're disregarding the fact that hardware is extremely optimized for these operations. The ability to perform all transformations with a single matrix outweighs the cost of the additional multiplications, especially in the context of graphics programming (as is explained in the video). These computations are performed per-vertex in parallel, and for very dense meshes, i.e., high vertex count, it really adds up.

    • @stal1n63
      @stal1n63 3 місяці тому

      Yeah, in non-ideal world any matrix multiply operation takes O(3^3) time. But on modern computing times uses better algoritms, that done that in O(3^2.1-2.5) operations, that not that really worse that O(2^3) in naive case for 2x2 matrixes. And benefits of using them in worth it. And that same for 3d space. Like, while in naive case we got O(3^3 = 9) operations per 3x3 matrix multiply, in actual hardware we got O(4^2.375 ~~ 27), while in naive case we got O(4^3 = 64) for 4x4 matrixes. Bad, but not much worse that in can be. And dont forget, any computer VERY good at addition and multiplying

    • @bonbonpony
      @bonbonpony 2 місяці тому

      The GPU has dedicated circuitry for 4×4 matrices that pretty much does all these multiplications in parallel, so it doesn't matter if you use the full 4×4 matrix or just a 3×3 or 2×2, it will use the entire circuit anyway and there will be no speed difference.

    • @stal1n63
      @stal1n63 2 місяці тому

      @@bonbonpony but isn't there potential work reduction, processing 2x2 matricies in 4x4 logic circe?

    • @eduameli
      @eduameli Місяць тому

      SIMD

  • @ibrozdemir
    @ibrozdemir 4 місяці тому

    i used to think 4th "w" is only necessary for unit "direction" or "location" transformations, i didnt know it also used for projection with only activating "z" to 1.. thanks

  • @CoconutKhajiit
    @CoconutKhajiit 4 місяці тому

    Dude, this video was very clear, while also having all the mathematical details, brilliant! Make more!

  • @idontknow-wl6su
    @idontknow-wl6su 4 місяці тому

    Nice video :D

  • @mastermati773
    @mastermati773 4 місяці тому

    This was great

  • @orphansock8439
    @orphansock8439 4 місяці тому

    Wow! What an absolutely outstanding video! This by far the best explanation I've ever come across.

  • @nightcoremaster3601
    @nightcoremaster3601 4 місяці тому

    TL;DW: 4D matrices help computer to do perspective, so that why can visualize parallel lines that meet at the horizontal line, like our eyes capture.

    • @nightcoremaster3601
      @nightcoremaster3601 4 місяці тому

      Furthermore, transformations (matrix mul., without vector addition) in nD made possible by using (n+1)D matrices. That's why 3D objects need 4D matrices to work out in computer graphics.

    • @nightcoremaster3601
      @nightcoremaster3601 4 місяці тому

      Man, 1 month grinding Computer Graphics for the final exam for an A now really helps

  • @pluieuwu
    @pluieuwu 4 місяці тому

    just beautifully succinct. bravo!❤

  • @drancerd
    @drancerd 4 місяці тому

    Ok... now we need a full course of quaternions.

  • @austinculp7082
    @austinculp7082 4 місяці тому

    Thank you for the informative vid! Hope your channel does more eventually!

  • @the_green_snake4187
    @the_green_snake4187 4 місяці тому

    this is an amazing video! thank u!

  • @theman7050
    @theman7050 4 місяці тому

    Now I understand why the heck they all multiply x and y by w!! Thank youuuuu

  • @chrischoir3594
    @chrischoir3594 4 місяці тому

    Best explanation on YT

  • @besusbb
    @besusbb 4 місяці тому

    cool, makes sense when i think about it but you lost me around 4:40, not sure that part made sense, whats the "original vector" that youre talking about here?

    • @MiolithYT
      @MiolithYT 4 місяці тому

      By "original vector" I mean the non-homogeneous representation, the one you can actually use to draw your vector on a grid, which is equivalent to the same vector with 1 as the homogeneous component. It's a bit like fractions: two numbers meant to represent a 1D number, and you divide the numerator by the denominator to get back the "original" real number, which is equivalent to the same number in a fraction with 1 as the denominator

    • @besusbb
      @besusbb 4 місяці тому

      @@MiolithYT ah ok, understood, thanks for the explanation!

  • @Nallu_Swami
    @Nallu_Swami 4 місяці тому

    DUDDDEEEE you have no idea how much the video has helped me out to think of multiplications visually , THANKS A LOT

  • @boggybolt6782
    @boggybolt6782 4 місяці тому

    Came in thinking I'd get an explanation on why we have 3D and 4D vectors (already knew), instead got an explanation on how the math behind 3D rendering works (did not know). Amazing!

  • @gabrieldias6430
    @gabrieldias6430 4 місяці тому

    really nice video, thanks for sharing your knowledge!

  • @JoystickLab
    @JoystickLab 4 місяці тому

    Brilliant... please take my money and make a graphics course?

    • @MiolithYT
      @MiolithYT 4 місяці тому

      Haha thanks I wish I had time for that

  • @Dent42
    @Dent42 4 місяці тому

    Thank you for the excellent explainer. Now I know how the view frustum works. But for the life of me, I can’t figure out why it isn’t done with spherical coordinates. Frustums (frusta?) as currently implemented in… every game engine I know of… project from a euclidean plane onto a euclidean plane, which means that when the camera rotates, objects can clip in and out of the frustum. In a spherical analogue, this would not be the case.