3D Objects in JavaScript - No Libraries [Understanding AI - Lesson 11 / 15]

Sdílet
Vložit
  • čas přidán 30. 06. 2024
  • PLAYLIST: • Self-driving Car :: Ph...
    In Lesson 11 of the "Understanding AI" course, I'm thrilled to unveil the magic of 3D extrusions in JavaScript. Today, I'll guide you through the process of making elements pop up in the third dimension, a technique commonly known as extrusion. And when I say everything, I mean it - from buildings and cars to road borders.
    But here's where it gets really exciting! I'll demonstrate how to move the camera behind our car, allowing us to see it in action, and share a trick often used in racing games to enhance the feeling of speed. Get ready for an eye-opening experience as I expose you to some really cool techniques that will elevate your game development skills.
    Join me in this lesson where we explore 3D extrusions and dynamic camera movement in JavaScript, unlocking a new dimension in your self-driving car project. Like, share, and subscribe for more lessons on AI, game development, and cutting-edge programming concepts!
    💻CODE 💻
    github.com/gniziemazity/under...
    Follow Along: 6. Camera Part 1
    Code After This Lesson: 7. Camera Part 2
    💬DISCORD💬
    discord.gg/gJFcF5XVn9
    ⭐LINKS⭐
    Self-driving Car Course: • Self-driving Car :: Ph...
    Video about Speed: • Why Racing Games Feel ...
    #RacingGame #RacingGameJavaScript #3D #Pseudo3D #3DNoLibraries #3DJavaScript #JavaScript Lesson #Extrusion #Speed
    ⭐TIMESTAMPS⭐
    00:00 Introduction
    01:05 Extruding Buildings
    07:49 Extruding Cars
    10:07 Extruding Trees
    10:56 Extruding Road Borders
    15:17 View from Behind
    16:59 The feeling of Speed
    19:30 Removing the Other Cars
    23:40 Full-Screen

Komentáře • 41

  • @anwerjivani1547
    @anwerjivani1547 Před 2 měsíci +1

    great work. he should have a million subscribers

    • @Radu
      @Radu  Před 2 měsíci

      Thanks :-)

  • @2difficult2do
    @2difficult2do Před 2 měsíci +2

    Thank you, Radu, for the detailed explanation and useful video instructions. When I follow your code, many things become clearer to me.

    • @Radu
      @Radu  Před 2 měsíci

      Great to hear! :-)

  • @firefox_tn1815
    @firefox_tn1815 Před 2 měsíci +3

    Thank you Radu really. I want to be a channel member but i can't pay online in my country (I will when I'm abroad). Nonetheless you are a true professor and thank you for your hard work.

    • @Radu
      @Radu  Před 2 měsíci +1

      Don't worry about it... I don't really care about getting subscribers or members. I set it up because some people say they want to thank me somehow and I decided to offer a way to do it.

  • @javifontalva7752
    @javifontalva7752 Před 2 měsíci +2

    Another terrific video!

    • @Radu
      @Radu  Před 2 měsíci

      Thank you :-)

  • @henriqueritter
    @henriqueritter Před 2 měsíci +2

    that is awesome!! well done Radu!!!👏👏👏

    • @Radu
      @Radu  Před 2 měsíci

      Thank you :-)

  • @alvarobyrne
    @alvarobyrne Před 2 měsíci +1

    joy to the world!

    • @Radu
      @Radu  Před 2 měsíci

      Haha, glad you like it :-)

  • @pragyanchakravarty765
    @pragyanchakravarty765 Před 2 měsíci +1

    Thank You Sir. Big Fan

    • @Radu
      @Radu  Před 2 měsíci +1

      Thanks for watching :-)

  • @javifontalva7752
    @javifontalva7752 Před 2 měsíci +5

    I've just noticed that when we are drawing the projections the buildings are not ordered. I wonder we could order it according to how further up these are drawn (I also separated the different stuff so I can draw each things in a different colour). I still need to think how to pull up the ordering.

    • @Radu
      @Radu  Před 2 měsíci +3

      Wow, you're really taking on a challenge :-)
      I didn't bother with the ordering and got away with this... see-through look (I think it looks cool). But if you want to do it, maybe you can try ordering them by the distance to the base segment (in the above view, it should be fine). There might be few glitches... and you probably need to eventually calculate the distance from the camera to each surface. But it should be a nice learning experience, you may even discover why we typically break surfaces in triangles, etc. Good luck!

    • @javifontalva7752
      @javifontalva7752 Před 2 měsíci +3

      @@Radu I'll keep you posted if I don't die. I've been trying for a week and still haven't got a satisfied result.

    • @firefox_tn1815
      @firefox_tn1815 Před 2 měsíci +1

      ​@@javifontalva7752 Keep us updated. Good luck

    • @Radu
      @Radu  Před 2 měsíci +1

      Please don't die. You're my most active viewer :-D

  • @dastan331
    @dastan331 Před 2 měsíci +1

    Amazing!!!

    • @Radu
      @Radu  Před 2 měsíci +1

      Thanks!! :-)

  • @catakuri6678
    @catakuri6678 Před 2 měsíci +2

    i think the smooth camera gives the speed effect because it looks like the camera is making effort to catch up to you

    • @Radu
      @Radu  Před 2 měsíci +1

      You are probably right. It also makes an 'effort' to break so it doesn't 'hit' the car when it stops.

  • @adilsonbuset738
    @adilsonbuset738 Před 2 měsíci +2

    Très bien, Maître Radu !

    • @Radu
      @Radu  Před 2 měsíci +1

      Merci beaucoup :-)

  • @alexsouza22
    @alexsouza22 Před 2 měsíci +2

    Amazing 😍

    • @Radu
      @Radu  Před 2 měsíci

      Thanks :-)

  • @cazpfitl
    @cazpfitl Před 2 měsíci +1

    Thank you again professor, this exposition was great! 👌👌👌

    • @Radu
      @Radu  Před 2 měsíci

      Glad you liked it! :-)

  • @ifeoluwatemidayo3959
    @ifeoluwatemidayo3959 Před 2 měsíci +1

    Radu I really like your skill.
    How did you learn all this stuff
    Have work in a game industry before

    • @Radu
      @Radu  Před 2 měsíci

      I made (flash) games a very long time ago (20 years ago).
      But been coding many other things since... and got a PhD.

  • @ChandrashekarCN
    @ChandrashekarCN Před 2 měsíci +1

    💖💖💖💖

  • @DanielJoseAutodesk
    @DanielJoseAutodesk Před 2 měsíci +1

    🤣🤣🤣🤣🤣🤣Started excited about the extrusion, and looks at the trees and... Ok ...We'll take care of the trees later... 🤣🤣🤣🤣😂👍

    • @Radu
      @Radu  Před 2 měsíci

      Spoiler alert. I forgot about the trees so I never fix them :-)
      But extruding them as pyramids, with one point at the top should be easy after you see how we make the car look nicer in the last lesson!

  • @mayansstudios
    @mayansstudios Před 2 měsíci +1

    sir, what about 3d like webgL, three.js, Babylon.js. pleace make a video about 3d in future

    • @Radu
      @Radu  Před 2 měsíci +1

      I like teaching how things work... not how to use libraries that do the job. I have few webgl / three.js related videos (older ones) somewhere on the channel, but I don't plan to make new ones like that anytime soon. Some people did port the self-driving car code from phase 1 in 3d environments (like three js). I link to their code somewhere in phase 2 (when we generate the buildings and the trees, I think).

    • @mayansstudios
      @mayansstudios Před 2 měsíci +1

      @@Radu thank you sir and i am a big fan of your teaching

    • @Radu
      @Radu  Před měsícem

      Thank you :-)

  • @pizdaxyu
    @pizdaxyu Před 2 měsíci +1

    lerp util proven to be very useful

    • @Radu
      @Radu  Před 2 měsíci

      Indeed it has :-)