In Video Games, The Player Never Moves

Поделиться
HTML-код
  • Опубликовано: 21 ноя 2024

Комментарии • 567

  • @JoshsHandle
    @JoshsHandle  Год назад +577

    People keep asking about multiplayer games, so I'll pin a comment here.
    In the case of local (split-screen) multiplayer, the world is shifted to one viewpoint while one viewport is being drawn, then shifted to the other player's viewpoint while their viewport is being drawn.
    In the case of online multiplayer, the server running the game doesn't have to render graphics so it doesn't have to deal with keeping track of dozens of differently oriented worlds. Each player connected to the game just renders the world shifted to their own personal point of view.

    • @TheREALDocRabbit
      @TheREALDocRabbit Год назад +19

      The side effect of this is what makes large scale player population achievable in dedicated servers also.

    • @pyropulseIXXI
      @pyropulseIXXI Год назад +21

      @@TheREALDocRabbit the side effect of a server not rendering graphics for every player? That isn't a side effect lmao. That is just common sense.

    • @1Peasant
      @1Peasant Год назад +6

      Can someone tell me what the Goose game at the start of 2D games is? I want the goose 🦆

    • @JoshsHandle
      @JoshsHandle  Год назад +12

      @@1Peasant The game is CrossCode, I forget how you get the goose.

    • @sossage
      @sossage Год назад +2

      Ye, but the in game world doesn't move around you. It's essentially a camera with a variable in world position/the player's position, and that afore-mentioned camera has a filter applied to each player camera/the on screen position causing percieved dilation of in world positions? Or am I trippin?

  • @addvector4918
    @addvector4918 2 года назад +847

    This was a better summary than my 4th year graphics course. Great job

  • @coalhater392
    @coalhater392 2 года назад +1656

    I hate when high quality channels like this don't get the recognition they deserve.

    • @curiodyssey3867
      @curiodyssey3867 2 года назад +24

      I share your pain brother. His time will come. Believe that.

    • @xanderlinhares
      @xanderlinhares 2 года назад +16

      Yeah, I’m pretty sure this channel will blow up soon.

    • @the-birbo
      @the-birbo 2 года назад

      I hate YOU, my friend. I hate YOU! 🥺

    • @HissoriRenda
      @HissoriRenda 2 года назад +8

      I'm here to engage

    • @HissoriRenda
      @HissoriRenda 2 года назад +4

      This channel is excellent

  • @sphaerophoria
    @sphaerophoria 2 дня назад +1

    I'd just like to add to the crowd and say that this is an incredibly well made video. It's the first link I send to anyone that asks about 3d programming

  • @TotalJargon
    @TotalJargon Год назад +162

    Went through a 3 year games technology degree and still felt like matrices were a bit of a mystery, in just 20 minutes you've dispelled most of that!

  • @PronteCo
    @PronteCo Год назад +306

    I heard another interesting reason to fix player at 0 is that otherwise in games with HUGE maps going to the edge (i.e., being far away from 0) would result in significant floating point errors constantly occurring on your coordinates, i.e., laggy and inconsistent movement

    • @j1mmie
      @j1mmie Год назад +3

      Good luck getting physics to work with that approach

    • @golarac6433
      @golarac6433 Год назад +9

      You want to put the center of the world at 0.0 im a game, first of all, because its logicaly convenient but also because you want the most furthest away edge of the world to not be some large number that would start losing precision. But this is world space coordinates.

    • @air6699
      @air6699 Год назад +28

      Yeah that's what happens in minecraft when you go a few million blocks out from spawn. Least it used to be that way.

    • @golarac6433
      @golarac6433 Год назад +30

      @@air6699 IT happens in mamy games. For example all the Valve games like half life, counter Strike etc. You can noclip and just fly inyo the void for hours till your weapon models start glitching out

    • @WackoMcGoose
      @WackoMcGoose Год назад +22

      If I remember right, Outer Wilds actually does this in a double sense, both the screen-space AND world-space coords of the player are [0,0,0], with everything in the simulation having a force applied opposite of the intended player movement, Planet Express Ship style. You're not jetpacking away from Timber Hearth, instead Timber Hearth is flying away from _you,_ and returning to you when you stop jetpacking. Additionally, one of the reasons behind a key gameplay mechanic is apparently that the orbital physics system (with it moving everything relative to you) is only guaranteed stable up to a certain length of time before it breaks down. Kerbal Space Program doesn't have this temporal limitation because the world-space coords are untampered with (the [0,0,0] in world space isn't the player-ship, of which there can be many ships at arbitrary relative locations, but Kerbol itself, the system's star, is at the world-space origin as expected).

  • @ElTRDG
    @ElTRDG 2 года назад +81

    The best explanation I've heard about graphic's matrices, I had even understood how they work! Great video, and congrats for the animations, they help a lot.

  • @TheOneCheetah
    @TheOneCheetah Год назад +19

    I was always told the world doesn’t revolve around me, but here we are, the world revolving around me

    • @joepgevaert5298
      @joepgevaert5298 2 месяца назад

      That's just a matter of definition, which can be chosen dependent on the problem at hand :)

  • @lRyanI
    @lRyanI Год назад +15

    This is such a relaxing, educational, and well-produced video. Love the music, the sound effects as things appear, and the calmness in your voice. Really glad this popped up in my feed.

  • @cmyk8964
    @cmyk8964 Год назад +18

    A form of transformation matrices was used in the SNES’s Mode 7 graphics. Since it was limited to a 2×2 matrix, perspective effects like in F-Zero, Pilotwings, and Super Mario Kart needed to change the scale of the matrix every scanline.

  • @AHSEN.
    @AHSEN. 2 года назад +215

    First time I actually understood matrices. Thank you very much. I hope you gain more subscribers soon! You certainly deserve it. Your raytracing video is one of the best videos I have ever seen on youtube, and this video was extremely helpful.

  • @curiodyssey3867
    @curiodyssey3867 2 года назад +224

    PLEASE KEEP CREATING CONTENT! You are such a refreshing and highly competent teacher with a natural gift of making things intuitive and easy to understand.
    Please, you have the ability to help so many people in ways you could probably hardly imagine. It may be selfish of me to ask, but I crave your content. It is absolutely, insanely well done, while being both high-level yet easy to understand. Your ability borders on genius level with how effortless you make it appear to be.
    Please don't make us wait another 8 months. I beg you!
    You are utterly incredible. Simply amazing. Positively awe inspiring. Never stop.

    • @badday4885
      @badday4885 Год назад

      You I’m sorry 😅😅😅😅😅😅😅 😅😅😅😅😅 😅😅😅😊m😊
      😅

  • @ashleybyrd2015
    @ashleybyrd2015 6 месяцев назад

    I didn't expect to ever understand transformation matrices but I sure do now. Very intuitive explanation, great job!

  • @RevolutionAdvanced1
    @RevolutionAdvanced1 2 года назад +30

    The introduction of the w vector and particularly fixing its value at 1 to represent eucledean space reminds me a lot of the notion of a "euclidean point" in 3D Projective Geometric Algebra. Have you ever looked into that?

    • @angeldude101
      @angeldude101 Год назад +7

      The addition of the 4th unit vector is usually called "homogenous coordinates," and PGA uses the exact same idea, but, IMO, gives a more geometric interpretation of each unit trivector. It also gives a more compact representation of transformations than matrices, sometimes called "dual-quaternions", but it also can't represent all the same transformations as matrices, namely PGA motors/dual-quaternions don't allow scaling or shearing. CGA does enable uniform scaling, but is also just its own beast.

  • @MrWilliamSide
    @MrWilliamSide 6 месяцев назад

    The production quality is insane. To the sound when the visual elements appears. Thank you so much for this well made video.

  • @whiskygrinch
    @whiskygrinch 2 года назад +43

    Damn, I would have needed you... like... 10 years ago when I first fell into VTK and the cursed world of 4x4 Matrizes and later quaternions. WHERE WERE YOU BACK THEN?!

  • @ctralie
    @ctralie 2 года назад +17

    Wow, really impressive use of sound and pitches here to reinforce the concepts!

  • @curiodyssey3867
    @curiodyssey3867 2 года назад +76

    This channel is REALLY fucking good and is criminally underrated. Your time will come, believe that. Your content is on-par, if not better, than other RUclipsr's in the same category/genre as you.
    Absolutely blown away.

  • @SleepingFumos
    @SleepingFumos Год назад +8

    writing something as simple as a rotating cube in modern OpenGL makes you learn a lot about computer graphics, and this is one of the things you'll learn.
    highly recommend it to anyone who wants to learn this the practical way

  • @xSyn08
    @xSyn08 Год назад +8

    Minor correction, on 2:13, that's actually the Normalized Device Coordinates or NDC
    From NDC you then convert to Screen Space Coordinates given the display resolution
    Which would be easy to do since you only need to multiply the X and Y with the Width and Height (halved depending on the center point of the renderer)
    I think that OpenGL for example takes the NDC matrix and then converts it to Screen Space internally

  • @pavelperina7629
    @pavelperina7629 2 года назад +23

    Nice one. I don't like how matrices are always explained in a way rotation around x looks like this, translation looks like this. It helped me a lot to multiply matrix by vector by hand and to see the patern. First columns of transformation matrix tells you what happens to unit vector x. 2nd and 3rd columns are for unit vectors y,z. Forth column tells you what happens to unit vector w. You can decompose any vector to sum of perpendicular unit vectors x,y,z,w and scalars. Then you can multiply scalars by matrix columns, they will transform into four new vectors. By adding them together, you get the result of transformation. The last one (w) is perfectly consistent - take unit vector (or zero), in the fourth dimension, because why not. It will transform into three dimensions and add to the result - and that's the translation. From now, put w=0 for vectors and w=1 for points (cause vectors have no origin, they must be immune to translations). That's all that you need to know. From now rotation matrices are not weirdly placed sines and cosines with plus or minus signs, you can just draw a picture of unit vectors x and y rotated by 30 degrees and write them into column of matrix.
    And multiplying matrices is not a magic, but transforming base vectors in columns of the matrix on the right by a matrix on the left.
    IMPORTANT: all above assumes column vectors.
    NOTE: it's hard to explain the part with matrix*columnVector without seeing it. Try yourself with column vector (1 0 0 0) and so on, this one is really affected only by the first column.

  • @Panda-ek9ll
    @Panda-ek9ll 2 года назад +16

    Found you from your quantum computing videos and just watched this! Your content is so underrated!! You need to keep making content man, your animations are descriptive and intuitive and you are amazing at explaining these concepts!! Keep up the great work!

  • @fal3881
    @fal3881 Год назад

    i don't know what is this used for me later on, but you just explain it easier and i enjoy every second of it

  • @sanador2826
    @sanador2826 Год назад +8

    Your channel is exactly what I am trying to emulate with my teaching style. I want to write lectures that are in this format that I can move through in class. Adding you to my pile of ideas. Excited to see what else you make

    • @throughcolouredglasses9300
      @throughcolouredglasses9300 Год назад +1

      That's an incredible goal! :) Taught like this I even cared to know more and asked myself questions about the subject. ... and I've failed math for biologists twice and then dropped out of my bio degree to do languages instead lol

  • @wlockuz4467
    @wlockuz4467 Год назад +7

    This is so beautifully explained it almost made me emotional. If someone had explained it so intuitively to me when I was young I actually would've ended up loving Maths.

  • @curtisnewton895
    @curtisnewton895 2 года назад +5

    and when the game world is matched against an ellipsoid, it is scalled to the inverted dimensions of that one to make collision detection against a sphere instead
    which is much simpler to calculate

  • @christianreinbold9293
    @christianreinbold9293 7 месяцев назад

    Just stumbled upon this channel through the ReSTIR video, and I was astonished how well and accurately this rather intricate algorithm with its mathematical quirks was explained - and then it turns out that all your videos are engineered in a great way, making all the maths that other tend to run from so tangible that I would not hesitate promoting those videos to any interested 14 year old.
    As someone who spent quite some time in lecturing undergraduate maths & computer science, and as someone who always was struggling with the inability of math professors to point out all the cool fields of applications and implications of the abstract theory they teach, I see a lot of potential in these kind of videos, to not only motivate CS students for maths, but also to motivate math students and fostering their intuition about what they have to deal with on a daily basis. Graphics may be great for this purpose, as it not only is exciting for a wide-spread part of the population, but it also covers the most important major fields: Linear algebra in case of raster graphics as shown in this video, stochastics & statistics in case of monte-carlo ray-tracing, applied numerics in case of discretization and precision handling. Going further, simulation (e.g. for games) is very analysis-heavy, and finally crypto & implicit surface rendering touches very interesting subjects in (non-linear) algebraic geometry.
    Basically, you could take a video such as this one, and then start linking it to topics undergraduate math students may struggle with. For instance, in this video you already have the foundation laid for core concepts in projective geometry, by messing around with an affine chart. Now include all the rest (points at infinity/directions, duality of points and lines, e.t.c), show how they relate to graphics, spend months to produce a video about it, and end up with more (probably criminally underrated) content to receive eternal gratitude of the few math students that study projective geometry. In an ideal world, dedicated lecturers would do this as part of their job and get paid for it, but I doubt that they will ever be able/allowed to slice off enough time for that - at least it would not be possible in the environment I graduated in.
    Interestingly, although the whole graphics domain is so math-heavy, my impression is that most graphics people, at least those I know personally, still tend to not think in formulas, singularities and distributions, but rather in algorithms, artifacts and noise - neglecting that 50% and more of their work is pure math. After leaving academia, I now am the only guy with a mostly maths background (plus a bit graphics / computer science) in our render engine team. Usually, its me who "translates" the state-of-the-art papers to pseudo-code, actual code and/or graphics speech. I will gladly refer to your videos here and there. :) Unsurprisingly, the tendency of graphics people thinking in terms of visuals and not mathematical abstractions also can be seen in research here and there. When reading the original ReSTIR paper, it is quite apparent that the author's home base is the graphics domain. In contrast, the ReSTIR PT follow-up is written up in a much more rigorous style regarding math and abstractions, and thus is able to completely cover the original ReSTIR work as a by-product, while introducing a mathematical framework that is so much more powerful than the application of ReSTIR to direct lighting.

  • @dynamicmechanix9397
    @dynamicmechanix9397 Год назад +2

    This video single handedly expounded my understanding of games.

  • @korayem
    @korayem Год назад +2

    A beast of a guitar! But then again, not surprised of how sick the tone is with Otto II II II II. It handles drop tuning wickedly good!

  • @qualia765
    @qualia765 2 года назад +3

    i would say that this is by far the most informational video on the topic

  • @NovaWarrior77
    @NovaWarrior77 Год назад

    When it's named something innocuous and opaque like "josh's channel" you know the content is top teir

  • @blyatpotato9484
    @blyatpotato9484 Год назад +3

    I really appreciate your content man, I've been learning maths for 5 years in high school but I can't even begin to comprehend what the hell am I supposed to do with these. Your explainations shed light on how I can relate to what I learn.
    Love from Malaysia

  • @playboy6061
    @playboy6061 Год назад +6

    Do you realize that you just gave a very good matrix 101 lesson better than a college math professor😅
    Well done on using game as examples the way you did👏

  • @hansfrankfurt1870
    @hansfrankfurt1870 7 месяцев назад

    The sound effects of new variables are introduced or changed are a genius detail!

  • @Qsie
    @Qsie Год назад +1

    Such an outstanding video, even the little things like sound effects for things appearing and fading in and out is brilliant! Absolutely phenomenal 💜

  • @4.0.4
    @4.0.4 Год назад

    It was very cool to see "Minecraft outside the camera's perspective". Great illustration of how the sausage is made.

  • @Noah-kd6lq
    @Noah-kd6lq Год назад

    And all of a sudden I have a basic conception of what a matrix is. Thanks dude! Subscribed.

  • @wojciechmichalak3978
    @wojciechmichalak3978 Год назад

    This is the most intuitive explanation of linear algebra i have ever seen

  • @megadog9305
    @megadog9305 2 года назад +4

    This is the most underrated youtube channel I know about. Awesome video!

  • @pitched7401
    @pitched7401 Год назад

    Very good explanation. Easy to understand and filled with valuable information. But i gotta add, that what you described was a "translation". A transformation includes scaling and rotating as well

  • @3nertia
    @3nertia Год назад +6

    Dude! This really opened up my understanding of maths! Thank you! Most helpful! I've been trying (with little success) to improve my math education; baby steps, I guess!

  • @GosuNoKami
    @GosuNoKami 2 года назад +2

    Haha I was thinking about the game superliminal and immediately you showed it to demonstrate the matrices’ transformations. Very nice

  • @volusian95
    @volusian95 Год назад

    As a videogame-enjoyer, this is one of those topics which I'm very glad there are other people around who are interested in/understand this much more than I.

  • @somethingsafoot
    @somethingsafoot Год назад

    5:53 bro lmao i love the successively increasing tones you add for each successive animation

  • @LordPlato
    @LordPlato Год назад +1

    I learned more about math in the 10 minutes you explained matrices than I did in my last 4 years of school, like Fr tho my math teachers/proffs could never explain a new concept/tool in this way. I hadn't learned about matrices b4 but essentially it ties in everything i was learning in geometry and algebra my last few years and makes it meaningful and understandable, and part of that is bc hes giving us real world applications of the math which always helps.
    great video, thank you!

  • @Console.Log01
    @Console.Log01 Год назад

    finally a video that explains matrixes! always watching computer science videos just going along with "and then you multiply matrix A with matrix B" and just nodding my head. well now I know

  • @9291sam
    @9291sam 7 месяцев назад

    Wow, what an excellent video. I had only visualized all of this in my head up until now, stellar job!

  • @dungeonrobot
    @dungeonrobot Год назад +20

    When you’re importing pixel art into your engine or animation software of choice (Minecraft textures in the intro) make sure to turn off filtering or set your filter to “nearest”. That way your textures don’t come out blurry. There also might be an issue with your edge margins but I can’t tell with the blur. Great video overall

  • @MichaelCrenshaw_TheXaldar
    @MichaelCrenshaw_TheXaldar Год назад

    I love the amount of nuance you fit into the first minute of the video! When I first started working with shaders directly everything was laid out in general terms without specifics, it took a lot of time to piece together what was actually happening; I wish I'd had this video then instead of now!

  • @Ramog1000
    @Ramog1000 Год назад +1

    From a technical standpoint the oposite is the case.
    Shifting arround the world instead of the player doesn't usually happen (certainly not in minecraft) if you look at the floating point error related bugs in game you can keep those two appart.
    I guess you can actually use a worldspace with the player being the point (0,0,0)
    Take minecraft where the player moves (just like in most games) when you reach the far ends of the coordinate system, the further away you are from the center of the world (0,0,0) the buggier stuff becomes, see minecraft bedrock were you just fall through the world because hitboxes get soo messy that there is an actual hole inbetween block.
    Now compare that to outer wilds where the universe moves arround the player, the player is always (0, 0, 0) and the world gets moves arround you, that means the further planets are away from you the more error is gonna be in their orbit calculations and they get chaotic. But that also means the most precision is gonna be were its needed, right next to the player.

  • @ethanIcet
    @ethanIcet 2 года назад +5

    Your explanations and visuals are really great !

  • @whschopke98
    @whschopke98 Год назад +2

    This was a very nice explanation overall, allthough sometimes I felt the need to pause and do some small calculations on a paper to exemplify what you said so I could fully understand.
    Those were the times when I feel like you took some big leaps for a person that is not currently in touch with linear algerba (like myself). Especially during the introduction of the w vector, some more drawn out calculations would be very welcomed.
    It's impossible for me to not point out some resemblance with 3brown1blue, and I mean it in the nicest possible way, since I consider 3b1b to be the best channel for explaining anything mathematic with very good visual examples/demonstrations.
    Keep up the good work, I hope my commentary is useful in any way.

  • @WackoMcGoose
    @WackoMcGoose Год назад

    8:38 ...I can't believe I'm not the only one that still remembers the existence of Stacking. That game was so charming, back when Double Fine still made things...

  • @hijarian
    @hijarian Год назад

    17:52 super valuable screen, thank you so much for it.

  • @IloveCanada-ql5vt
    @IloveCanada-ql5vt Год назад +1

    I don’t even do much computer programming, but this is super interesting. Thanks for explaining something I’ll probably never use, you have my subscription.

  • @addizakaria978
    @addizakaria978 Год назад +2

    Keep up the good work, your channel is criminally underrated.

  • @s.hariharan6958
    @s.hariharan6958 Год назад

    I was accidentally found your video , I learned lot of concepts. You are Opened my eyes from lies & myth (I Believed the player is explore the world )🙂

  • @nobodyspecial1553
    @nobodyspecial1553 Год назад

    No matter how much I read online I had a hard time understanding matrices, this one video was as if someone blew away the fog clouding my mind on matrices.

  • @Hitmandan
    @Hitmandan Год назад

    This was awesome. I just began learning about matrices more in depth in my Calc 3 class and this actually makes me understand them much more, thank you!

  • @Ezkanohra
    @Ezkanohra Год назад

    I heard faint button presses from starting and stopping the voiceover, but other than that, this video was phenomenal.

  • @morkrer
    @morkrer 2 года назад +7

    What a wonderful video! I hope you'll keep making content, these videos are masterpieces.

  • @illyay1337
    @illyay1337 Год назад

    Dude. I never thought about it this way. You’re really just converting things into a coordinate space relative to you.

  • @podcast4925
    @podcast4925 Год назад +27

    Hi Josh , I am from India your videos are really good and extraordinary.we can see how much hardwork you put to create such informative and graphics. I really suggest my friends to subscribe your channel keep posting videos.

  • @madlad255
    @madlad255 Год назад

    I've always found matrices weird and abstract, especially matrix multiplication. I do understand them, but I couldn't really link them to any concrete applications, so it was something I would tend to forget really quickly. However, this video has been really enlightening, showing an actual practical application of them! I'm looking forward to watching more of your videos!

  • @Marvin-qp1se
    @Marvin-qp1se Год назад +2

    Well I don't know, but the title might be a little bit misleading. During view transform and projection, yes the "scene" is changing according to the location and view angle of the player. However, in the beginning of the whole rasterizatin, the player does move to get his final object coordinate. You may say the player doesn't move in the drawing pipeline but not that he doesn't move at all.

  • @kainpwnsu
    @kainpwnsu Год назад +1

    Oh boy, I rememberwhen I learned that matrices are used to perform 3D transformations. It was the last bit of high school math I used in my job as a programmer. Kids complain they'll never use the math they learn...

  • @mauricebenink
    @mauricebenink Год назад +1

    Perhaps an important note to add to not confuse people too much.
    The world doesnt move around the player when it comes to the how the game works internally.
    However it does move around the player when it comes to the rendering.

  • @ziadconnolly057
    @ziadconnolly057 Год назад

    it's interesting to note as well that the evolution of screens themselves has influence in these things. i.e an older game that gets a new resolution scale but the ui doesn't scale because it's set to a certain pixel size, and Marathon's image projection rendering will have some surfaces that would appear more visually 3d as a result of the round monitors

  • @daubenyhervis6437
    @daubenyhervis6437 Год назад +2

    man. now I remember what it was like trying to comprehend algebra, only I can actually take in the information, due to how concise your explanations are. keep it up guy.

  • @ManBro25
    @ManBro25 Год назад

    Ok, I’ll be coming back to this video at least 20x, and every time with a different question. Thank you for being so concise and informative! =sub

  • @VolumetricTerrain-hz7ci
    @VolumetricTerrain-hz7ci 11 часов назад

    It have been an cool concept if someone make a game with this transformation view!
    I like the video by the way!
    Good work!
    👍

  • @GabyTM1
    @GabyTM1 Год назад +5

    Is the tool you use to visualize the vectors available somewhere on the internet, or it was all made by yourself?
    Very great video, vectors were something very hard for me to understand since I've relatively skipped over them for the past few years, but with this short video you helped me a lot to realize they are not that hard! Thank you so much!

    • @JoshsHandle
      @JoshsHandle  Год назад +2

      I'm using Blender, but it requires a fair amount of setup to get it to visualize vectors, they are unfortunately not built in to the software.

  • @CookingWithJackDaniels
    @CookingWithJackDaniels Год назад +1

    I clicked on this thinking it was a 3B1B video and I was pleasantly surprised by my oversight. This was an excellent video

  • @JchosenOfficial
    @JchosenOfficial Год назад

    This is so cool, I have been studying gamedev for a really long time but the concepts are viewed from a complicated lens, thx for making things so simple & easy to understand, a lot of things were review for me but even in reviewing it under such an easy to understand lens it helped broaden my awareness of the concept ty so much.

  • @jaymo1011
    @jaymo1011 Год назад

    CrossCode being featured makes me happy, great video!

  • @mettaursp309
    @mettaursp309 Год назад

    Something to note about this is that it is unique to raster pipelines, the method where you draw objects by projecting triangles & potentially other shapes into screen space then drawing them with scan lines.
    With ray traced pipelines it is significantly easier to generate rays in screen space then transform them back into world space for the ray cast. The story doesn't quite end there though because a lot of ray traced pipelines only check if the rays are likely to hit the objects in world space. The actual intersections are computed by transforming the rays into object space on intersection candidates.
    This means you can create multiple instances of the same model with different transformation matrices, but only pay the storage costs for one copy and only pay the transformation costs of the ray interacting with the object if it is actually needed.

  • @jpdominator
    @jpdominator Год назад

    Funny. As you were talking about vectors, matrices, and computations, I thought about Kerbal.

  • @nilsosinga495
    @nilsosinga495 Год назад

    While I'm familiar with basic linear algebra on a theoretical level, and have definitely applied them in practical scenario's, it never felt intuitive to me. The "translation" of matrices and vectors at 5:31 really helped me pierce through that!

  • @mrericwonghk
    @mrericwonghk Год назад

    Subscribed. Thanks for explaining these difficult topics in a simple and concise way!

  • @kingqball1
    @kingqball1 Год назад +4

    I wish you had a list of games you used in this video. some of them look fun but I've never seen them before soi don't know where to find them

    • @crazyphrenic
      @crazyphrenic Год назад +2

      Yes, looking through the comments in hope of answer too.

  • @chsovi7164
    @chsovi7164 5 месяцев назад

    the annoying thing about math is that a lot of things like this are hard to get a proper grasp on without understanding higher level concepts. with this specific topic, I found that learning about group theory, and specifically about SU(2) and SO(3) made understanding why a 4th dimension is necessary to represent 3d rotations a lot more obvious. unfortunately, actually learning about these things is quite difficult due to a lack of resources and time. there's a video called the mystery of spinors which is the best vid I've seen related to this, if anyone is curious to learn more

  • @jamesalexduran
    @jamesalexduran Год назад

    I figured this out when I was a kid and once you see it, it’s very hard unsee it…

  • @pyropulseIXXI
    @pyropulseIXXI Год назад

    This is some top tier content; also, you can choose simply not to draw, or render, an object if its z-coordinate is 'behind' another one

  • @throughcolouredglasses9300
    @throughcolouredglasses9300 Год назад +7

    I'd love a video about why we'd chose a triangle mesh :D
    Also, what is that 2D game with the blue haired character?
    I cannot believe how I studied matrices and vectors in uni and thought it was So Boring. Like most math in my courses. But watching this, my first thought when we scaled up that mesh of the teapot was "ooh I wonder if the volume of it changed at the same scale". I've never cared about any math question in my life, and now I find out there is a way to get me INTERESTED?? I wish more topics had been framed in a way that makes me care to know the answer, this is amazing.

    • @kantpredict
      @kantpredict Год назад +2

      Because exactly three points describe a plane and 3d surfaces can be described as a series of fewer or more connected flat surfaces.

    • @etaosin
      @etaosin Год назад +3

      It's CrossCode

    • @zhulikkulik
      @zhulikkulik Год назад +3

      Triangle is the only shape that can be precicely described. Meaning there is only one way to draw a triangle with the given vertex coordinates. For something like a square there are two ways two draw it. If you pull one of its corners up - it's either "folded" along a diagonal line from that corner to the opposite one, or along a diagonal line between two other corners.
      But that's mostly because we can't draw curvy lines between those verts. Well, we can, there's a thing called NURBS, but that is a bit too expensive and hard to work with for something like games, which require realtime rendering and very complex models like humans, fantasy monsters and so on.

    • @krauser_
      @krauser_ Год назад +1

      I know exactly how you feel. I'm in my first year of a master's program, and it's only recently that I started to care about things I previously deemed extremely boring and useless. Partially thanks to a relatively interesting scientific research I do (deterministic chaos), but mostly because of content like this that somehow managed to elude me when it was most needed. Now I have to frantically catch up on a great many things

  • @TheLastCrankers
    @TheLastCrankers Год назад +23

    Good explanation, but the title is just false (and misleding looking at some comments about the multiplayer lmao). Creating a 2d projection of the 3d virtual space cannot be considered moving the world.

  • @shogoyo788
    @shogoyo788 Год назад +3

    The content of the video is great but the title bugs me a little. Maybe it should be like "In video games, camera never move when rendering." or something? But I understand the title will be less interesting. Anyways, I learnt a lot from the video. Nice job!

  • @EPMTUNES
    @EPMTUNES Год назад +1

    Cool video! I love the sound design.

  • @drk90009
    @drk90009 Год назад

    Im sincerely thankful to you for making this video, thank you

  • @silverelk13
    @silverelk13 Год назад

    This summed up my whole computer graphics class

  • @rayredondo6349
    @rayredondo6349 7 месяцев назад

    Technical correction: usually, in 2D games and 3rd-person 3D games, the player actually does move on the screen some amount. There is a camera that tracks close to the player that moves instead.

  • @Alex-du9td
    @Alex-du9td Год назад +2

    Amazing video, continue following your math passion!! (and don't give attention to these haters)

  • @jacobmartinelli7496
    @jacobmartinelli7496 Год назад

    thanks for explaining it in english. i figured it down to warping and stretching/unstretching condensed images. the if then else of layered images

  • @pizzaTimePedro
    @pizzaTimePedro Год назад

    Bro out here putting 3Blue1Brown level quality content!!

  • @Velossitee
    @Velossitee Год назад

    You are VERY informative. Thank you so much for making this video. I never knew much of this

  • @Admer456
    @Admer456 Год назад

    It must be noted that this only really applies to rendering, just to clarify some things. In gameplay and physics (and other logical or non-visual parts of a game), it's indeed the player that moves, and the world's position is always at (0,0,0). So, "the player never moves" only really applies to rendering!
    Games have worlds and systems to interact with the things going on in those worlds, whether it's their own (combat, interaction) or they got them from their game engine (rendering, audio, physics). Some actively change the world every frame, every couple seconds, others don't.
    You can think of rendering as merely a system to present the game's world to the player. All it does is "read" the game's state (where each object is, what texture each thing is using etc.), present it to you visually, and it will never modify the original. The world's input coordinates will always stay the same, but depending on where the player is, they'll end up on different parts of your screen, that much is obvious.
    But that DOESN'T mean that physics, or gameplay, are gonna be calculated relative to the player. For instance, if you shoot a barrel, the game grabs the player's position in world space, gets a direction vector from the player's orientation, and traces a line in that direction, starting from the player. If this line intersects with the barrel, it registers as a hit on that specific location. Textbook example of hitscan weapons. Point is, it's all done in absolute space, or relative to the world if you will.
    There are some exceptions in games with absolutely massive worlds of course. There, the world gets shifted by a huge margin and snaps the player back to the centre, but even then, that only really happens when you cross a huge boundary, so it's not frequent.
    So, ultimately you could say it's a matter of... perspective :>

  • @ego7383
    @ego7383 2 года назад

    Please make more videos, I had my notification on for so long

  • @betaradish9968
    @betaradish9968 Год назад

    Amazing video. I love matrices. I love hobby game dev. This helps merge the two in an intuitive way.

  • @arkdotgif
    @arkdotgif Год назад

    holy shit, i love when my two favourite things, maths and video games get combined. also u showed some based games in this video (crosscode and outer wilds

  • @monkeyman31ful
    @monkeyman31ful Год назад

    thats crazy, i just took CS 535, an intermediate graphics course. so it was so cool to like, kind of understand this lol!

  • @EigenA
    @EigenA Год назад

    Jeez bro, keep up the good quality content. I just subscribed