3DSage Explains 3D

Поділитися
Вставка
  • Опубліковано 31 лип 2024
  • 3D is everywhere. It can be so common we don't even think about it but I think I can simply explain how simple the fundamentals are for 3D.
    I have been wanting to make this video for a while and I'm glad you found it and thank you for watching! Let's hang out again sometime.

КОМЕНТАРІ • 120

  • @julianbullmagic
    @julianbullmagic 2 роки тому +31

    This channel is so cool, very creative

    • @3DSage
      @3DSage  2 роки тому +2

      That means a lot so thank you! :)

  • @3DSage
    @3DSage  2 роки тому +12

    I would like to wish everyone here a very Happy New Year!! Cheers!

  • @em00k
    @em00k 2 роки тому +62

    Great video as usual - one thing I notice doesn't get mentioned a lot is how old consoles would have used fixed point maths where modern engines use those dirty floats.

    • @ClayMurray8
      @ClayMurray8 2 роки тому +9

      And their dreaded rounding errors!!!

    • @mackit
      @mackit 2 роки тому +5

      I wonder if fixed point rounding errors are the reason for the crazy camera distortions in 3D Gameboy Advance Games like Asterix & Obelix XXL?

    • @lucasdb-oficial1402
      @lucasdb-oficial1402 2 роки тому

      #Sonic3onGBA

    • @lucasdb-oficial1402
      @lucasdb-oficial1402 2 роки тому

      #Sonic3onGBA

    • @perplexedmoth
      @perplexedmoth 2 роки тому +2

      @@mackit It's the affine texture mapping, which means there's no non-linear depth gradient. It also makes the textures "warp" as you rotate the camera.

  • @octaviotastico
    @octaviotastico Рік тому +1

    4:30 this part is soo cool! I never thought of animating each part individually to save some processing power

    • @3DSage
      @3DSage  Рік тому

      It is a great trick! It worked great for early PS1 games!

  • @pa.ro.dy.3045
    @pa.ro.dy.3045 2 роки тому +2

    literally was trying to find how to do exactly that this week, you sir are my saviour

  • @4nyNoob
    @4nyNoob 2 роки тому +2

    man, this video is so high quality, congrats for the amazing result

  • @Luke-bo9ev
    @Luke-bo9ev 2 роки тому +2

    I love your videos I showed my mom and she said ”he probaly just orders the pieces” and I said “no he makes them” then she said “he must be skilled at this then”.

    • @3DSage
      @3DSage  2 роки тому

      Yes since I can program 3D, I thought that would be great for visual learners to see the actual code effecting the pixels so that's what I made. I hope it helps to see it and I'm glad your mom liked it too!

  • @straightupanarg6226
    @straightupanarg6226 2 роки тому +4

    I remember learning perspective geometry when I was younger, and it was fascinating. It seems like the origin point doesn't *actually* have to be the center of the image (at least in pure geometry - in video games it probably does) - putting the origin point off-center produces different perspectives.

  • @Nikku4211
    @Nikku4211 2 роки тому +25

    Actually, Doom and Duke Nukem might have 2D floor plans for levels, but otherwise, in-game they have 3 dimensions, unlike Wolf3D. Doom and Duke Nukem can render rooms of differing heights and they use all 3 position values in order to enforce 3D collision. It's just that Doom's inter-sprite collision isn't complete, but at least Duke Nukem 3's is way more complete.

    • @shlokshah5379
      @shlokshah5379 Рік тому

      Also doom kinda had a z value for some sprites like the flying deamons can be shot from the window only if they were at a lower z value.

  • @c0dered111
    @c0dered111 2 роки тому +2

    Amazing video well Done!

  • @Zac8668
    @Zac8668 2 роки тому +5

    Really liked this video! Pushed me a bit closer to making a simple 3d renderer, something I always wanted to do

  • @EquaTechnologies
    @EquaTechnologies 11 місяців тому

    best 3d tutorial on youtube

  • @FinFET
    @FinFET 2 роки тому +8

    Amazing video! Now I really want to make a proper 3D engine in python! Btw, I made some raycasting projects in python inspired by your videos! Happy 2022!

    • @3DSage
      @3DSage  2 роки тому +7

      I've watched a few of your raycaster videos before! I had no idea I was the inspiration so that is so nice to hear! Keep up the great videos!

  • @blackflagqwerty
    @blackflagqwerty 2 роки тому

    Cool stuff, I wish this knowledge were availiable to 20 years ago. Gave the cat an upvote!

  • @scarreer
    @scarreer 2 роки тому

    i always love it when your videos come out

  • @thecout3170
    @thecout3170 2 роки тому +1

    Best programming channel ever, i never understood the math behind 3D so well. I have learned raycaster for the first time too, i became much more fascinated with programming, which have made me really fell into this world.

    • @3DSage
      @3DSage  2 роки тому

      I will release my part 1 tutorial on programming Doom very soon! Thank you for the support! :)

  • @mardukas13
    @mardukas13 2 роки тому +1

    Amazing explanation as always!
    Your videos have great didactics, I learned a lot.
    This reminds me of the great "Coding Secrets" series from Jon Burton (Traveller's Tales former employee) on GameHut channel.
    Can't wait to see more from you.

  • @waisemthecrab
    @waisemthecrab 2 роки тому +1

    This is very awesome 👏

  • @Cervaaa
    @Cervaaa 2 роки тому +3

    Mans needs a Ted talk 😳

  • @kellybmackenzie
    @kellybmackenzie 2 роки тому

    Amazing video! I love your channel so much.

  • @pikuma
    @pikuma 2 роки тому

    This is incredibly well made! Keep up the great work. :)

  • @domi_dreams
    @domi_dreams 2 роки тому +2

    This channel is a GEM ! Please, during these technical explanations - can you also put on screen some pseudo-code, or math involved? I am geek gamedev, and just love that kind of stuff :P All the best!

  • @ASMRChess
    @ASMRChess 2 роки тому

    Crazy how this video has less then 10k views… It is very well made on an interesting and popular topic. The title may be at fault.

    • @3DSage
      @3DSage  2 роки тому

      Thank you, any suggestions on a better title?

    • @ASMRChess
      @ASMRChess 2 роки тому

      @@3DSage probably don't use "3D Sage Explains" as the lead because your name (no offense) doesn't carry so much weight that it'll make too many people click. If it was "John Carmark Explains 3D" it would be something else. Maybe something like "Let's Understand 3D" or "How Computers Put 3D things on 2D screens". Just some thoughts. Good luck with your channel - your work is impeccable.

  • @TheMrLeoniasty
    @TheMrLeoniasty 2 роки тому +1

    This is so well made, thank you for creating such great content !

    • @3DSage
      @3DSage  2 роки тому +1

      That means a lot so thank you!

    • @TheMrLeoniasty
      @TheMrLeoniasty 2 роки тому

      @@3DSage You deserve far more subscribers and views than you have now ! Hope the youtube algorithm catches on with the amazing production quality you have !

    • @3DSage
      @3DSage  2 роки тому +1

      @@TheMrLeoniasty I like to make fun projects and videos and I hope someone out there enjoys it! Thank you

    • @TheMrLeoniasty
      @TheMrLeoniasty 2 роки тому

      @@3DSage I have the same approach when making my own videos etc, it really shows that you are passionate and have a lot of fun !

  • @legotechnic27
    @legotechnic27 2 роки тому +1

    Nice video! Cool how much info you jammed into such a short time. It would've been worth making it a tiny bit longer and also mentioning z-buffers in my opinion though.

  • @Don-jt7ch
    @Don-jt7ch Рік тому

    Top notch content. Only for the elite

  • @NoahSties
    @NoahSties 2 роки тому

    Fantastic video, will help in writing my 3D engine!

  • @seventeenMiniatureDogs
    @seventeenMiniatureDogs 2 роки тому

    This is awesome

  • @jannovak6987
    @jannovak6987 2 роки тому +1

    Youre agenius. Now i finally kinda understand :)

  • @ClayMurray8
    @ClayMurray8 2 роки тому +5

    Most games don’t sort polygons unless they have transparency. They use depth buffers.

    • @3DSage
      @3DSage  2 роки тому +3

      There are so many really cool techniques I wanted to talk about including Binary space partitioning, depth buffers, and the crazy new Unreal engine 5 stuff but I wanted to keep this video simple. But yes anyone interested can look more into depth buffers!

    • @LukeSchoen
      @LukeSchoen 2 роки тому +1

      @@3DSage Great response!

    • @ClayMurray8
      @ClayMurray8 2 роки тому +1

      @@3DSage oh totally. I knew you knew that. Just wanted to mention it for comment readers. Maybe a poor tone apologies if that’s the case.

    • @3DSage
      @3DSage  2 роки тому +1

      @@ClayMurray8 no worries and thank you for the comment! Happy New Year!

  • @megashadow3789
    @megashadow3789 2 роки тому

    Always like your videos

  • @oogabooga2581
    @oogabooga2581 2 роки тому

    Awesome man

  • @sammytrainer9016
    @sammytrainer9016 2 роки тому

    Great video, keep going
    Saludos desde México

  • @SquidwradThomas
    @SquidwradThomas Рік тому

    One thing to point out is that not all rendering programs do their origin at the bottom left but at the top left. If this is the case then the screen height division in code needs to be divided by the negative version of the depth value.

  • @Stabby666
    @Stabby666 2 роки тому

    There were 3D arcade games in the 80's too. They used vector graphics instead of normal raster screens to render display lists by moving the beam around to draw lines directly. Zero pixels, and infinite resolution, with minimum memory used basically :) Tempest was my favourite of these!

  • @worldsboss
    @worldsboss 2 роки тому

    That OoT tease! 😮

  • @Benjamingerardbrady
    @Benjamingerardbrady 2 роки тому

    Another great video! The tone gave me the impression that you have been excited to make this for some time?
    Anyway, the following is a absolute pedant correction, but something stated irked me:
    3D perspective within art was well known about (and even the continuous standard for many centuries) from at least as early as Ancient Rome; not a discovery of the Renaissance. The reason the displayed artwork disregards perspective is a very nuanced topic involving topics as non-sequitur as monarchy as an abstraction of religion (or perhaps the other way) amongst other topics which will likely kill us all with boredom. As a general rule, however, I recommend the line of thought that the Renaissance should not be viewed as a renewed, classical love of: art, philosophy, science, etc.; rather it should be characterised as a revival effort of the: achievements, ideas, and values of the Greco-Roman world (which just so happens to be a disposition with lines up pretty well with a love of: art, philosophy, science, etc.).
    In precis, the 15th century was not the origin of graphical perspective

    • @3DSage
      @3DSage  2 роки тому

      I see what you are saying but I believe we are talking about 2 different things. Yes painters painted correct perspective before. But a google search of the first artist to use 1 point perspective has multiple articles crediting Filippo Brunelleschi in the 15th century for documenting a system using mirror to capture the exact proportions. It was the first published technique and artists have been teaching it in every art school ever since.

  • @AChannelFrom2006
    @AChannelFrom2006 2 роки тому +2

    nice ginger cat

  • @cydragon2.099
    @cydragon2.099 2 роки тому +1

    It'd be amazing when computers can get 3D things to be exactly reality and no trickery

  • @hypurban
    @hypurban 2 роки тому

    should have mentioned depth buffer. That mostly sorts z-fighting issues and is faster than sorting at the expensive of more vram needed.

  • @Rightbackatya881
    @Rightbackatya881 2 роки тому

    nice

  • @0xdeadbeef131
    @0xdeadbeef131 2 роки тому +1

    Do a fast polygon rendering tutorial and
    Review original quake engine 3d rendering.

  • @tejonBiker
    @tejonBiker 2 роки тому

    3D graphics in a plain display, the power of math!

  • @opexkoru5157
    @opexkoru5157 2 роки тому

    Do you have any recommendations on how/where to learn more about 3D graphics? I've always been really interested in this topic.

  • @CYON4D
    @CYON4D 2 роки тому +1

    Awesome video! Are you going to do a video about the Tomb Raider port to the GBA?

    • @3DSage
      @3DSage  2 роки тому +1

      That port fascinates me. As I was playing it, I still didn't believe it. I'm not sure yet what I want to do about it.

  • @jesse2535
    @jesse2535 Рік тому

    I just implemented this in python in less than an hour over my months long journey through linear algebra implementation in python...

  • @ronstadt534
    @ronstadt534 2 роки тому +2

    Love your videos and what you do. What is the game at 5:31?

    • @3DSage
      @3DSage  2 роки тому +1

      Urban Chaos for PS1. It's not a good game but an important one since it inspired GTA3.

  • @mackit
    @mackit 2 роки тому

    @3DSage I'm curious, by the standards of this video would you consider your new GBA 3D engine to be 3D, or 2.5D?

  • @developerdeveloper67
    @developerdeveloper67 Рік тому

    2:22 Nice. I got that much but how do you rotate the camera (view)? What is the logical explanation...?

  • @joaquimjesus6134
    @joaquimjesus6134 2 роки тому

    i'm so sorry, but can you create a playlist and these video been the 1st tutorial?
    for creating a 3D games. ;)
    (yes i'm review the videos and start on right place)
    thanks for all... i loved these simple video and math

  • @Takehere
    @Takehere 2 роки тому

    noice

  • @EquaTechnologies
    @EquaTechnologies 8 місяців тому

    I wonder if I can make that in Scratch Jr.

  • @RG-ot1vy
    @RG-ot1vy 2 роки тому +1

    Anyone know the game footage from 5:32 and 5:36?

    • @3DSage
      @3DSage  2 роки тому

      It's called Urban Chaos for PS1, it inspired GTA 3. The last game is the Matrix Unreal Engine 5 tech demo.

  • @westparezal
    @westparezal Рік тому

    0:33 you wrong. The works were done in reverse perspective on icons and canvases commissioned by religious figures. This kind of perspective puts the vanishing point on you, which makes you feel more connected to the story.

  • @Mayank_Maximum
    @Mayank_Maximum 2 роки тому

    How to make a gba port I want to make a sonic 1,2,3&k and cd

  • @SSukram_
    @SSukram_ 2 роки тому

    Wouldnt it be better to draw front to back, and just not draw a pixel if that point has already been drawn? It will most likely save on performance

  • @user-zo9dc1lu3q
    @user-zo9dc1lu3q 2 роки тому

    Nice !! 😊
    P.S. So, at the end we can say that the GBA is capable to generate true 3D graphics ... even if in software mode trough dedicated "software based" 3D engine.
    Am i right ?

    • @3DSage
      @3DSage  2 роки тому +1

      Yes I have done it. I can draw a pixel on screen so I can write my own 3D optimized engine to show 3D graphics.

    • @lucasdb-oficial1402
      @lucasdb-oficial1402 2 роки тому +1

      @@3DSage #Sonic3onGBA

    • @user-zo9dc1lu3q
      @user-zo9dc1lu3q 2 роки тому

      @@3DSage
      Thank you for answering my question 😁
      I really like your work 👍😊
      There is still a general perception that the GBA can't display more than the "2.5D Raycasting graphics".
      So how do they explain the environements/veichles in Smashing Drive, Street Racing Syndicate or what we see with your GBACRAFT game / GBA real time 3D recreations of famous threedimentional games ...
      Those are certanly full 3D games (for what i understand).
      The console is even capable to run *Voxel graphics (i don't know if this kind of graphics is considerated more 2.5D than full 3D).
      P.S. Can you take in consideration the idea to recreate a part of an iconic TF2 level with your GBA 3D engine ?
      If you have time and if you think is possible obviously 😏
      See ya 👋
      *Smuggler's Run.

    • @ItsRamzi
      @ItsRamzi 2 роки тому

      @@3DSage let's livestream coding this in Java with test driven development. All my attempts to replicate your code have glitches in them. And you have no tests. And I feel like I don't grasp geometry well enough to know how to go about writing the tests. So you can learn Java and test driven development from me while I learn about 3d rendering from you.
      One thing I notice about your engine is you hardcoded sizes. I'd like the program to allow arbitrary sizes.

  • @Xilefian
    @Xilefian 2 роки тому +1

    1:16 this is a point that's highly controversial in the real-time graphics space. They're 3D, just because they don't 100% conform to the technique of 3D that modern games use doesn't mean their method of projection isn't without perspective 3D.
    My soul cringes whenever someone says "2.5D". Yes it's a colloquialism and we all understand it, but it's also very broad with many people describing 3D platformers on a 2D plane as being 2.5D along side these line-span raster engines.
    I'm on the side that these are 3D games, just that one dimension has been optimised out for performance (instead of 3D->2D it's 2D->1D).
    But it isn't so black-and-white, it's arguable, even modern 3D games are arguably 2D or 4D in various places.

    • @3DSage
      @3DSage  2 роки тому +1

      I understand what you are saying. I hear different definitions. My personal definition is can the game engine rotate a cube in all directions, then it's 3D. Doom, the Build engine, raycasters can not do that but they do have 3D like movements. Some 3D games lock the camera movements to 2D but that's different than the polygon rendering. I don't see everyone agreeing on 1 definition since games are so different but I like your points.

    • @Xilefian
      @Xilefian 2 роки тому

      @@3DSage Dark Forces can rotate a cube in 3D, but it is still 1D raster span like Doom.
      From years of discussion, I can say with confidence whatever definition you find will have a very strong counter point.
      A good one to ask: is OpenGL DOOM 3D or 2D?

    • @3DSage
      @3DSage  2 роки тому

      @@Xilefian Great points! Makes me start to question myself haha. I like hearing the discussion and different points of view. Thanks friend for the comments! And I look forward to your videos and projects! :)

    • @HappyFrogGamesLLC
      @HappyFrogGamesLLC 2 роки тому +2

      @@Xilefian (I know this is long, there is a tl;dr at the end if you'd rather just read that!)
      Well, in fairness, Dark Forces also allows more-or-less-true overpasses (did have to use polygon rendering, more on that in a bit) whereas the only other one of those to have those at all had to fake them from what I hear (Duke Nukem 3D). And the way the game can do that is that it also has polygon rendering tech on top of the other tech to allow that, so parts of Dark Forces are "true" 3D, such as the spaceship at the end of each level, laser blasts, from my understanding the previously-mentioned overpasses, etc. From my understanding though, the polygon rendering tech doesn't really do collisions quite the way they'd need it to work for level geometry in many cases, so they stuck to the other technique whenever possible. (I'd imagine performance was another reason mind you.)
      So it's not *really* fair to compare that to Doom, Duke Nukem 3D, or Wolfenstein 3D, but rather, Descent, a game that actually more or less has full 3D rendering capabilities anyway. Oh, and Doom also doesn't actually have proper 3D collision detection as an optimization trick (e.g. enemies and objects are infinitely tall), though later Doom engine games removed that optimization and allowed true 3D collision detection, and Duke Nukem 3D from what I gather did at least have proper 3D collision detection.
      And, well, so do some OpenGL versions of Doom, like GZDoom has optional support for removing the infinitely tall monster thing, so some OpenGL versions of Doom do make enough core changes to where there's maybe an argument to be made that OpenGL Doom is real 3D only because it's not quite Doom generally speaking. Though it would in fairness be a weak argument when that isn't strictly necessary to have OpenGL Doom, I just wanted to point out the technicality because I find 3D rendering tech fascinating and wanted an excuse to say more about it lol.
      Not to say I'm super keen on bothering to distinguish between the two styles when broadly discussing games when in practice it doesn't change how it plays, but it's a worthwhile term to have from a purely technical point of view for when then discussing the underlying tech and the history of said tech. Though I might prefer if the term wasn't, well, 2.5D. But then, there's a lot of terms in the gaming space I feel are a bit weird, so I'm not gonna try and argue against it to most people.
      tl;dr Dark Forces isn't a fair comparison because it has actual polygon rendering support which supposedly only wasn't used more because of weird collision detection issues, but I also don't like the term 2.5D and wish there was a better term that people used more often. I do however really like discussing 3D rendering tech and saw a good excuse to do so, so I did, in admittedly excessive detail.

    • @3DSage
      @3DSage  2 роки тому

      I have been thinking more about this recently as I program and I agree more with you.

  • @Davi_Dash
    @Davi_Dash 2 роки тому

    Can you make a more in depth of 3d video explaining the math.

  • @lucasdb-oficial1402
    @lucasdb-oficial1402 2 роки тому

    #Sonic3onGBA

  • @watercat1248
    @watercat1248 Рік тому

    I have 0 idea 3D graphics it's this hard to create hopefully for as,
    now days you don't have to dealing with all those stuff,
    all you have to do is use software like blender unity ect and the do all those magic for you

  • @c0dered111
    @c0dered111 2 роки тому

    ◼️

  • @lucasdb-oficial1402
    @lucasdb-oficial1402 2 роки тому

    HEY, YOU CAN DO #Sonic3onGBA

  • @sn0day494
    @sn0day494 Рік тому +2

    Now explain the sage.

    • @3DSage
      @3DSage  Рік тому

      No one can explain the Sage 😎

    • @sn0day494
      @sn0day494 Рік тому

      @@3DSage Why?

    • @3DSage
      @3DSage  Рік тому

      @@sn0day494 Sage is my name and means wisdom.

  • @trashtrash2169
    @trashtrash2169 2 роки тому

    I don't know trig, how do cubes rotate? I guess google's my friend.

    • @3DSage
      @3DSage  2 роки тому

      I think I can go deeper into the math in another video. This one is just to give you the general idea. But yes sin and cos deal with a right triangle's x and y values on a circle so they can be used for rotation.

  • @aboudi0507
    @aboudi0507 2 роки тому

    2.5D.. the old 3D

  • @albano_ok8665
    @albano_ok8665 2 роки тому

    Mario 64 gba man 😈

  • @emanuelroque34
    @emanuelroque34 2 роки тому

    Hi

  • @coolbrotherf127
    @coolbrotherf127 Рік тому

    Fun fact though, we live in the 4th dimensional world because time exists. The 3rd dimension can only exist in the theoretical plane of software as it exists instantaneously and independently outside of time. 3D objects cannot do, only be.

  • @Jkauppa
    @Jkauppa 2 роки тому

    instead, cast radial 360 fisheye rays into a 2d map equilateral projection

    • @Jkauppa
      @Jkauppa 2 роки тому

      then the rays converge in the middle of the eye

    • @Jkauppa
      @Jkauppa 2 роки тому

      then you can move the projection view to the point you wish

    • @Jkauppa
      @Jkauppa 2 роки тому

      assumed its still in the center, but the zoom plane is where you want it to be

    • @Jkauppa
      @Jkauppa 2 роки тому

      pre-sort collision-meshes or pixels, entities, in a persistent sort array, or even sort bins, by dimension, the get the sort order of faces/vertexes quickly

    • @Jkauppa
      @Jkauppa 2 роки тому

      you can then re-sort the position bins every frame assuming they are nearly perfectly sorted already

  • @many_diff
    @many_diff 2 роки тому

    Cs 1.6

  • @many_diff
    @many_diff 2 роки тому

    Cs go

  • @NeilRoy
    @NeilRoy 2 роки тому +3

    No, they were 3D as the three D's refer to three DIMENSIONS being represented. There is no such thing as 1/2 a dimension. How the three dimensions are represented, or how the 3D engine produces them do not effect whether they are 3D or not. If you have three dimensions clearly represented, length, width and height, than you have three dimensions. And games like Wolfenstien 3D was 3D... hence the name. Not 2 1/2 D. The engine itself had limitations on what type of scenes it could show, but it was no less 3D than modern engines.
    Sorry, but the whole 2 1/2D thing always bugged me and is pure BS. Nice video otherwise.
    If you want to get technical, every 3D game out there, including modern day 3D are 2D games as everyone one of them HAS to convert 3D co-ordinates to 2D before you can see them. It's called converting worldview to screenview. Your screen is 2D, so REAL 3D doesn't exist yet, perhaps VR Headsets qualify as they provide the different views our eyes need.

    • @Nikku4211
      @Nikku4211 2 роки тому +1

      *Doom and Build engine games.
      Wolfenstein 3D doesn't actually use a 3rd dimension for the gameplay.

  • @brentgreeff1115
    @brentgreeff1115 Рік тому

    Great explanation but trying to pick your voice out from the background music is a headache. You are not a girl in a club - not gonna put that kind of effort in.