Coding Adventure: Ray Tracing

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 พ.ค. 2024
  • I tried creating a custom ray/path tracing renderer. Featuring: maths, shaders, and cats!
    This project was written in C# and HLSL, and uses the Unity game engine.
    Source Code: github.com/SebLague/Ray-Tracing
    Support the channel: / sebastianlague
    Coding Adventures Playlist: • Coding Adventures
    Learning Resources:
    raytracing.github.io
    blog.demofox.org/2020/05/25/c...
    Music Credits:
    github.com/SebLague/Misc-Proj...
    Chapters:
    0:00 Intro
    1:08 Cameras and Rays
    3:30 The Pixel Shader
    5:02 Drawing a Sphere
    6:59 Multiple Spheres, and Colour!
    8:21 Two Types of Reflections
    9:04 Experimenting with Randomness
    11:14 Random Hemisphere Directions
    14:11 The Trace Function
    16:35 Testing Lights
    17:55 Chair Thief
    18:23 Progressive Rendering
    19:54 A Simple Sky
    20:49 Lambert’s Cosine Law
    22:47 Cosine Weighted Rays
    22:36 Triangles
    24:52 Some Tests
    27:14 Specular Reflections
    29:59 Tomatoes and Glossiness
    31:57 Blur and Anti-Aliasing
    34:42 Depth of Field
    37:14 The End

ความคิดเห็น • 1.7K

  • @spidermankey1398
    @spidermankey1398 ปีที่แล้ว +1700

    When others code it is frustrating but when Sebastian codes it looks like he is Ballet Dancing like the world is on 0 difficulty

    • @alexlandherr
      @alexlandherr ปีที่แล้ว +89

      That probably means a lot of testing that we don’t see.
      I’m a Java backend developer and writing some simple endpoints for say a Spring Boot server means first write the code that handles a request and then a bunch of tests which usually takes a large portion of the time.

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

      So true

    • @thom1218
      @thom1218 ปีที่แล้ว +24

      He also gives the impression that he's pretending to come up with these ideas on the fly, together with the testing we don't see, it just becomes more of an ASMR parody. People worry about AI not attributing their creations to human generated training data and here we have a 1M+ YT channel blathering on as if he didn't lift shader code from open source projects like Blender or a million other places or even inspiration from any source. Sure, okay Sebastian - what have you woke up and just randomly thought of to code today? lol

    • @TheBcoolGuy
      @TheBcoolGuy ปีที่แล้ว +9

      He does take a long time to make these videos, but he is really sharp.

    • @ET-yc4wb
      @ET-yc4wb ปีที่แล้ว +144

      @@thom1218 Maybe you didn't watch the video, but he clearly gave us the name and images of the books he read, and he clearly said that he borrowed code from others, whether it be from stackoverflow, or blender. So no, he didn't wake up with these ideas. He's spend quite some times studying and writing code. Hence why he barely uploads.

  • @willthunder7212
    @willthunder7212 ปีที่แล้ว +2182

    You are the Bob Ross of coding with phrases like "Our little raytracer" and I love it.

    • @ano3000nymous
      @ano3000nymous ปีที่แล้ว +54

      What a great analogy

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

      I wanted to say this

    • @stickguy9109
      @stickguy9109 ปีที่แล้ว +50

      There are no bugs only happy accidents

    • @LePeppino
      @LePeppino ปีที่แล้ว +25

      @@stickguy9109 no errors only happy little exceptions

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

      this is so true. its so relaxing. even though I could never code like him :)

  • @Khawalidmi
    @Khawalidmi ปีที่แล้ว +625

    Whenever Sebastian says "How this works is super simple", I pay extra attention.

  • @HunterHerbst
    @HunterHerbst ปีที่แล้ว +1980

    It always sounds like Sebastian is explaining all this cool stuff with a massive smile on his face. Like you can just hear it in his voice. And his happiness make me happy in a way. I love your work, keep it up :D

    • @aaAa-vq1bd
      @aaAa-vq1bd ปีที่แล้ว +107

      It’s just the Scandinavian accent. It’s especially strong for Danish people, who often sound like they are smiling. Evidence for this is that I thought Lague was Danish before I checked the channel info, originally just to check if he might be Scandinavian. This accent results in a “happy” register in English. That being said it requires some level of happiness or concerted effort to sound like this. I assume it’s a bit of both.

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

      @@aaAa-vq1bd Interesting. Thanks for the info

    • @aaAa-vq1bd
      @aaAa-vq1bd ปีที่แล้ว +21

      @@user-bo5vr1ib6i never mind then. it was anecdotal evidence and even when I posted it I had this nagging feeling that it might be a totally spurious connection. Thanks for the correction.

    • @user-bo5vr1ib6i
      @user-bo5vr1ib6i ปีที่แล้ว +3

      @@aaAa-vq1bd No problem. Have a nice day :)

    • @manioqqqq
      @manioqqqq ปีที่แล้ว +8

      He is the type of person who would scream in lowercase

  • @keiidev
    @keiidev ปีที่แล้ว +3843

    Always a good day when a Coding Adventure releases

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

      150

    • @guestguest8278
      @guestguest8278 ปีที่แล้ว +15

      I was a bit skeptical at first because it is april first

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

      Absolutely! It's like getting an unexpected package in the mail, but better because it's code!

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

      @@BenPanna true, already got april fooled 3 times today on youtube

    • @chrissugg968
      @chrissugg968 ปีที่แล้ว

      *cooding adventure

  • @LightningFoxHD
    @LightningFoxHD ปีที่แล้ว +3453

    Sebastian doesn't upload often, but when he does you know I'm clicking on it immediately

    • @sussy-coder
      @sussy-coder ปีที่แล้ว +12

      YESSSSSSSSS

    • @tejiriamrasa3258
      @tejiriamrasa3258 ปีที่แล้ว +34

      @@Danuxsy Is that supposed to be a flex?

    • @hiimgood
      @hiimgood ปีที่แล้ว +38

      @@Danuxsy weird flex but ok. Did you make a more entertaining and informative video than Sebastian?

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

      @@hiimgood Actually I believe GPT-4 is a greater teacher than Sebastian because you can ask it about anything, it can explain code for you, why you got an error and even fix the errors for you. It can explain in many different ways too if you just ask! 😊 It can also read documentation and lead you through problems step by step too!

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

      ​@@Danuxsy but that's kinda obvious, it learned from the entire internet.

  • @MykelGloober
    @MykelGloober ปีที่แล้ว +245

    "Truly one of the artworks of all time."
    Couldn't agree more, it's definitely one of them!

    • @DeenBoi
      @DeenBoi 11 หลายเดือนก่อน +4

      anyway whats going on with this tomato

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

      That's the joke, well done

  • @182exe
    @182exe ปีที่แล้ว +186

    how in the world did you make this so nice to watch
    the catto, the tomato, and your slight sense of humor is simply perfect

    • @fahadshaikh9616
      @fahadshaikh9616 4 วันที่ผ่านมา

      I've made a raytracer in c++ as well , it isn't as easy as he shows , he just shows the concept and how the code works he puts a lot of effort than he shows.

  • @aleksp8768
    @aleksp8768 ปีที่แล้ว +993

    Sebastian is the definition of quality over quantity

    • @vignotum132
      @vignotum132 ปีที่แล้ว

      You’re the definition of an unoriginal commenter

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

      im so confused it says theres one comment to this comment while i see nothing

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

      @@dip8 well hello there. My comment said:
      “You’re the definition of an unoriginal commenter”

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

      @@vignotum132 k lol ty

  • @Josbird
    @Josbird ปีที่แล้ว +830

    The juxtaposition between the calm, confident voiceover and the sudden bugs never fails to make me chuckle

    • @MandrakeGuy
      @MandrakeGuy ปีที่แล้ว +9

      especially the one near the start of this video, bugs and issues USUALLY dont happen that quickly... USUALLy...

  • @minerkey682
    @minerkey682 ปีที่แล้ว +83

    is it just me, or does Seb sound like hes smiling the whole time as he records

    • @cooolboy123
      @cooolboy123 9 หลายเดือนก่อน

      it's you

    • @allthefun2969
      @allthefun2969 9 หลายเดือนก่อน +6

      Kind of, that's why his voice is such a good and relaxing sound to listen.

    • @aurelia8028
      @aurelia8028 7 หลายเดือนก่อน +3

      Nah he just has an annoying accent

    • @minerkey682
      @minerkey682 7 หลายเดือนก่อน +8

      @@aurelia8028 idk I think his accent is fine. He sounds rly laid-back and it makes the videos much more enjoyable and calm to listen to

  • @ymi_yugy3133
    @ymi_yugy3133 ปีที่แล้ว +44

    I can't even begin to image how much work it must have been to write all these visualizations. Keep up the good work.

  • @rocketgirl3366
    @rocketgirl3366 ปีที่แล้ว +2057

    MOM! SEBASTIAN LAGUE DROPPED ANOTHER VIDEO! CANCEL THE DENTIST!

    • @22Tie22
      @22Tie22 ปีที่แล้ว +66

      Or watch it while at the dentist! With his soothing voice and fascinating content, It oughta be better than lidocaine

    • @0xxKAMISAMAxx0
      @0xxKAMISAMAxx0 ปีที่แล้ว +10

      Literally me minus the dentist 😂

    • @GnuSnu
      @GnuSnu ปีที่แล้ว +12

      how did you comment on this video 10hours ago? (it's been posted just 3minutes ago)

    • @bramlahousse7750
      @bramlahousse7750 ปีที่แล้ว +16

      @@GnuSnu probably members only video for a bit or unlisted

    • @repinuj
      @repinuj ปีที่แล้ว +8

      I always hated the dentist, yeah, let’s cancel ‘em!

  • @cerealkeepsyougoingeveryda555
    @cerealkeepsyougoingeveryda555 ปีที่แล้ว +779

    The series continues, and I'm very grateful for this Sebastian!

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

      I am grateful for the kity!

  • @shockwave7094
    @shockwave7094 10 หลายเดือนก่อน +13

    That technical difficulty during the FOV part in the intro had me in stitches, unapologetically showing that even though we have the lofty goal of ray tracing we can still have something so trivial trip us up. I just love how incredibly informative as well as entertaining Sebastian is

  • @nateg876
    @nateg876 ปีที่แล้ว

    I absolutely love your calm coding adventures. You have spurred me to create many adventures of my own and I cannot thank you enough! Thank you!!

  • @likeyou3317
    @likeyou3317 ปีที่แล้ว +221

    Hey Seb, I just wanted to appreciate the extra effort you take to code/setup your visualisations that aren't part of the project but enrich your explanations substanially. Animations, concise statements, music, all of it sparks my sometimes diminishing love and passion for programming. Thank you.

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

      100% Agree. This must be lots of extra work, but even when I'm only understanding a fraction of the code & concepts (I quite enjoy being so lost tbh!) the animated examples and explanations give me something to grip into. I just had a horrible morning btw, and this vid has calmed me down soooo much. Also the images are beautiful!

    • @SpringySpring04
      @SpringySpring04 6 หลายเดือนก่อน +1

      Don't forget the occasional appearance of his cat! Lol

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

    "Truly one of the artworks of all time. Anyway, what's going on with this tomato?" is easily one of the transitions I've ever seen.

  • @dertuel
    @dertuel ปีที่แล้ว +27

    I love how relaxing and inspiring your videos are. I’m always getting a humble„No big deal“ vibe, which pushes me to never be too proud of my achievements but accepting them as the next step but not the last. Thanks for your hard work! Very appreciated ❤

  • @oglothenerd
    @oglothenerd 7 หลายเดือนก่อน +2

    Your channel is just so chill!!! I love it!!! Keep it up bro!

  • @LaunchRecap
    @LaunchRecap ปีที่แล้ว +293

    I don’t know if I’m disappointed or excited. I was expecting a April fools video but honestly this is the best video released today. ❤

    • @tbird81
      @tbird81 ปีที่แล้ว +18

      It's a waste of time using TH-cam on April fools. Mostly just unfunny crap.
      Good to see a proper video.

    • @Very_Grumpy_Cat
      @Very_Grumpy_Cat ปีที่แล้ว

      True I also thought that

  • @yjonesy
    @yjonesy ปีที่แล้ว +153

    It's amazing how I am entertained both by a gentleman like Sebastian, with his calm and warm voice, and by characters like The Code Bullet, his cursing and his madness. Different Content Creators, united together with many others by the passion for coding. ❤ thanks

    • @NinjaOfLU
      @NinjaOfLU ปีที่แล้ว +8

      I literally came straight from a CodeBullet video to here, and totally agree, it's hilarious!

    • @Mullato_Damage
      @Mullato_Damage ปีที่แล้ว +8

      😂They're the angel and devil on coding's shoulder. You're going to learn through amazing content, but it's either through tranquility or chaos.🤣

    • @flabort
      @flabort 11 หลายเดือนก่อน +1

      Sebastien is Lawful Neutral, Coding Train is Neutral Good, and Code Bullet is Chaotic Neutral. We need to find the Neutral Evil coding channel to have the minimal alignment axes representation. It would be amazing to fill out a full 3x3 grid of coding youtubers, but I am not sure if there are that many.

    • @yjonesy
      @yjonesy 11 หลายเดือนก่อน

      @@flabort the coding train can be Chaotic Good... 😂

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

    Absolutely glued to the screen. You produce some of the best balance of technical and visual teaching/adventuring I've ever seen, video after video, and this was by far my favorite! Wonderful work :)

  • @CykPykMyk
    @CykPykMyk ปีที่แล้ว

    I LOVE your content. Incredible attention to detail. I've had similiar projects in my head, projecting my ideas, and the pipeline of stuff. I really need to kick this off. Hats off to your content. Its magical.

  • @gary-huang
    @gary-huang ปีที่แล้ว +70

    Would highly suggest adding a bounding volume hierarchy to your little renderer! Makes a world of difference in performance. Also if you really want to get into the advanced features of a path tracer, try implementing multiple importance sampling with next event estimation!

  • @bowarc
    @bowarc ปีที่แล้ว +116

    Man i love this 'Coding Adventure' series.
    Insane video, as usual

  • @wades39
    @wades39 ปีที่แล้ว

    I absolutely love how exploratory and educational every one of your videos are. Every video is so well put together and your explanations are clear. I don't think there's been a single video that you've made that hasn't taught me anything new.

  • @krbse.3578
    @krbse.3578 ปีที่แล้ว

    I've been thinking about the cosine weighted point distribution myself over these past few days. It's always a great time watching your videos and seeing all these things that I want to try out in future projects too!

  • @noahabry619
    @noahabry619 ปีที่แล้ว +163

    Incredible video ! I usually have a hard time understanding these more complicated aspects of computers, games, renderers, basically technical stuff, and while it still is a struggle, your videos make these so much easier to comprehend or at least visualize. This 40min vid felt like a 20min one with how well everything was presented. Incredible stuff, as always ! And these renders are really cool looking !

    • @makotv6898
      @makotv6898 ปีที่แล้ว

      If you would like some more knowledge about some of the topics in here like matrixes, shaders and general redering I would recommend reading the Free pdf book. LearnOpenGL. The first chapter goes quite in detail.

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

      learning about technical stuff could be so visually stunning? 😄 enjoyed the video and were able to keep up

  • @TheSpacecraftX
    @TheSpacecraftX ปีที่แล้ว +11

    Gotta put everything down and watch every time I see the notification for these.

  • @UitzUitz
    @UitzUitz ปีที่แล้ว

    Another fantastic video 🤩
    I love how you start with literally nothing and step by step work up to a working raytracer. Did not expect to see a depth of field effect in this video tbh, but I'm happy you added it. It looks so amazing. Can't wait for the next part.

  • @herrnamenlos1238
    @herrnamenlos1238 ปีที่แล้ว

    oh man, it is so charming and relaxing to watch your high quality videos. Keep up the good work! Thank you so much❤

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

    A quick note about the rejection method you used for the random direction originally, while it is true that about half of the time it will find a good candidate, so on the CPU it would only run on average less than 2 times, on the GPU threads are done in groups of 32 (NVIDIA) or 64 (Intel, AMD), and the threads in one of these groups can only continue once all of them does. I did some tests and that results in 6 or so iterations before exiting on average on 32 thread systems.

  • @unlucky-777
    @unlucky-777 ปีที่แล้ว +17

    Running a butter smooth code means a lot of testing and tons of bug fixing that we don’t see.
    He goes through these issues to create 40min~ long videos for us

  • @NicolasEmbleton
    @NicolasEmbleton 8 หลายเดือนก่อน

    Such an awesome video. Love the thinking process and the video style.

  • @DakkyW
    @DakkyW ปีที่แล้ว

    I'm so glad you came back to this after that ray marching video, I love your presentation and it's great seeing it come together so nicely

  • @SufficingPit
    @SufficingPit ปีที่แล้ว +65

    I love your stuff. Your visuals are so clean and satisfying. You also have perfect concise explanation that are still very informational and in deapth. Honestly you are probably my favorite codeing/dev channels.
    Also, really good at getting me inspired to do similar projects for fun.

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

      Also kity 🐱

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

      @@TheBcoolGuy Definite plus.

  • @Hailfire08
    @Hailfire08 ปีที่แล้ว +9

    13:00
    You want to create points using a distribution in (x,y,z) that is only a function of (x^2 + y^2 + z^2) = r^2 (that means it has no dependence on direction, which means the points will be evenly spaced across the surface of a sphere).
    If we take x, y, z separately, the resulting distribution f(x, y, z)dx dy dz = f(x)dx \* f(y)dy \* f(z)dz (this is because the three are independent (because we calculated them separately), so the probability of finding our output position in the range (x, y, z) -> (x+dx, y+dy, z+dz) is equal to the probability of finding x in that range, times the probability of finding y, in that range, times the probability of finding z in that range. Like how the probability of flipping a coin and getting heads three times is the probability of getting heads once, times the probability of getting heads once, times the probability of getting heads once)
    Intuitively, it seems that we should take x, y, z from the same distribution (because it's independent of direction, we can't treat different directions differently).
    Applying these, we see:
    f(r^2) = f(x^2 + y^2 + z^2) = f(x^2)\*f(y^2)\*f(z^2)
    What type of function is defined by f(a+b) = f(a)\*f(b)? An exponential.
    So we find our distribution must be f(r^2) = exp(-r^2), which is a normal distribution.
    I hope that helps, if I have explained anything badly please say so!

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

      Was just watching the new 2Blue1Brown video "Why π is in the normal distribution (beyond integral tricks)" and it basically explained this. Very interesting.

    • @lauram5905
      @lauram5905 ปีที่แล้ว

      I noticed he did the same thing in the defocus code at 33:00, realistic/"ideal" lens blur tends to follow a gaussian curve, would that mean you'd want your ray distribution from the single pixel in the camera to follow a similar curve?

    • @fredrik241
      @fredrik241 ปีที่แล้ว

      I think I remember someone doing a straight poisson distribution lookup to a table of pre-calculated coordinates for some of these ray directions.
      I think the idea was to get solid randomness cheaply as you were looking them up instead of calculating them.
      It was a disk and for better randomness you could just keep rotating the disk. (for say different ray hits or frame numbers)
      I didn't do this myself but its a memory of something that might have happened. :D

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

    Your videos are honestly incredible - Please keep making them!

  • @justelesnews
    @justelesnews ปีที่แล้ว

    I loved your video and especially the questions you ask yourself, the answers you give. It's so fun and extremely interesting ! Thank you

  • @joelholmes9497
    @joelholmes9497 ปีที่แล้ว +38

    I specialised in physically-based rendering during my master's degree, had to do a whole ray-tracing project very similar to this so was very nice to revisit some of the theory along with such wonderful visualisation. Your presentation of the ideas at play here is an absolute joy and your code is pristine as ever - always a pleasure to see what you're working on, thanks for the great content! :)

    • @AdityaRaj-bq7dz
      @AdityaRaj-bq7dz ปีที่แล้ว

      is this how ray tracing is implemented (bounce around till you reach light source) or people use phong's shading (calculate shadow and reflected ray) to get ray traced results??

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

    I wrote some kind of ray tracer 2 years ago, but for sound sources in a reflecting (reverbing) room. Like a 3D sound simulator. I just tried to figure out everything by myself without any knowledge - and of course i stumbled over some of problems i weren't able to solve by myself. It's really nice to see this video and how you came to every single of my problems and then showed how to solve them :)

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

    This was a super fascinating watch. Ray trace rendering was always one of those things I just accepted to be magic, but this broke things down in a way that was really incredibly easy to follow. Really great video.

  • @Skeffles
    @Skeffles ปีที่แล้ว

    Loved seeing all the reflections and colours being picked up! Fantastic video.

  • @Cengizhan98
    @Cengizhan98 ปีที่แล้ว +54

    I swear because of these types of videos i am learning again why i love to work in this field and how much I just love the sheer wonder and fascination of making math look good. I was grinning the whole time like an idiot during the reflections part and its also partly the fault of the video, because your videos are so well done and cinematic, I could watch them all day and just leave them running in the background

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

      Just don't forget to actually do some work in between leaving the video running all day 😉

  • @AllExistence
    @AllExistence ปีที่แล้ว +142

    Can you try raytracing-based portals next time? Like, teleporting the ray instead of bounce.

    • @vibaj16
      @vibaj16 ปีที่แล้ว +10

      portal rtx be like

    • @waker_link
      @waker_link ปีที่แล้ว +16

      I don't think the basics of the algorithm would be much different, you just cut off the ray after collision and make a new one with same properties starting from the end of the portal, it would be laggy as hell though because of how much more information the renderer needs to account for

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

      @@waker_link At least it's not so laggy that you'd need a supercomputer. Portal RTX runs ok on modern high-end graphics cards.

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

      @@waker_link No, first of all every ray it's technically a new ray, and second is the only thing he needs is offset position and rotation.

    • @Meatbag05
      @Meatbag05 ปีที่แล้ว +12

      Sadly it's way less complicated to do this than most things you see in this video (sad as in it's gonna be trivial in math so that it'd barely be a minute in the video, at least in coding it). It's gonna work the same as perfect refraction or reflection, which we already got.

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

    I love how you're keeping these classic sign flip issues and little mistakes in the video - very relatable ❤

  • @mlisic431
    @mlisic431 ปีที่แล้ว

    A new Sebastian Lague video in my feed is the best outcome of opening TH-cam. Wonderful!

  • @Anzy_M0ti0n_31
    @Anzy_M0ti0n_31 ปีที่แล้ว +48

    So Marvelous ! The fact he employed real life laws and the fact they actually worked Is truly outstanding !!

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

    Each of your coding adventures is very inspiring, love your content!

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

    I love how you walk through stuff like this. You get the audience to ask, "What is the next natural step?" and give them the breathing room to think of an answer. Then you show them what you came up with and sort of hint at why it is a useful concept more generally without saying it explicitly. Your videos are simply fantastic at getting people (specifically me) to think through complex problems in small rational steps. Bravo. Keep it up!

  • @aaron_gomes
    @aaron_gomes 9 หลายเดือนก่อน +3

    I didn't expect a video about programming to be so soothing. I love this.

  • @justinbohemier118
    @justinbohemier118 ปีที่แล้ว +11

    Impressive to say the least. You're able to take complex subjects and turn them into easy to understand lessons that are also beautiful works of art. Really enjoyed this

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

    this is amazing!!! it's so cool how each step builds up to a good-looking ray tracing implementation despite all of them seeming relatively simple compared to how complicated rt seems as a whole. you're really good at explaining things! i understand how it's ray tracing works much better now, thank you :)

  • @manuelsg2688
    @manuelsg2688 ปีที่แล้ว

    I may have forgotten all the admittedly few knowledge I had about programming, and yet I'm deeply engaged every time you post a video! Loved all the simulations in this one

  • @Stvk
    @Stvk ปีที่แล้ว +8

    his video feels both calm and inspiring, and never boring

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

    I am blown away by this video. You made not only one of the best ray tracing explanations I've seen, but a really cool engine as well! I'd love to see this become a series, maybe touching on performance improvements and code optimization as well.

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

    I'm always looking out for these videos, love your stuff!!

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

    Man, this is by far my favorite channel on TH-cam. The stuff you create is always so cool and interesting, and the quality is just out of this world. I honestly wouldn't be surprised if you spent significantly more time coding the visualizations of what your code does than writing the actual code, but that effort really pays off in the final video.

  • @hugodemule-rey6514
    @hugodemule-rey6514 ปีที่แล้ว +2

    Thank you for producing such a quality work, I have never ever seen someone that explains something which is directly illustrated with a game engine like you! Coding Adventure = Masterpiece. 👏🏼

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

    These videos are truly exceptional. Really a part of the few content creators of true excellence.

  • @danesmith624
    @danesmith624 ปีที่แล้ว +8

    Things like this blow my mind. Glad their was people out there who created rendering like this so we could enjoy the fruits of it.

    • @eygs493
      @eygs493 ปีที่แล้ว

      why?

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

    i like your style of learning amd sharing. You inspire me with your quality .. all the best, don't change.

  • @TheMeldanor
    @TheMeldanor ปีที่แล้ว

    Very good video! Really nice to follow, good visuals, calm voice and - most important - highly educating. Thank you for your work!

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

    you've got no idea how much this video means to me, i've been trying to code a ray tracer helplessly for the past few months, thanks a ton :D

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

    Man no way this is amazing, im always happy when you release a video

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

    This was such an educational video and the end results so amazing! I now better understand the concepts of specular and diffuse reflections. Thank you, Sebastian, for doing this!

  • @SarahMaeBea
    @SarahMaeBea ปีที่แล้ว

    An incredible resource. I'm going to be returning to this often. Thank you so much for making and sharing these.

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

    Please a part 2 on optimising this and adding more features. It would be so satisfying to get this closer to realtime if even feasible

  • @thebooduck
    @thebooduck ปีที่แล้ว +8

    Congratulations Sebastian, you are hereby certified crazy for doing all your animations inside Unity.
    You may add that to your CV for future job applications.

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

    a great video, many thanks. the inclusion of the code snippets is a real help!

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

    The final animation focusing on the knight looked so nice, really great video!

  • @jackboothe6873
    @jackboothe6873 ปีที่แล้ว +44

    Your videos never fail to entertain me

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

    Nice
    I always love when new videos are out

  • @biocinematics
    @biocinematics 11 หลายเดือนก่อน

    This was amazing. I have a moderate understanding of how ray tracing works, but your visualizations and explanations are so beautifully clear. Keep it up!

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

    This is amazing. Filled with detail and excitement as you explain, it makes as I want to do it as well. Although could as well be a tutorial, it seems so entertaining and interesting watching what would happen. I subscribed and would like to follow and enjoy while you talk of the capabilities to accomplish. I did not know it could do so much, the programs. Thank you for making this and explaining along the way.

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

    Was having a bad day, thank you so much for this video. Put a huge smile on my face to see the notification.

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

    The only channel i have notifications on for. Never dissapoints!

  • @lucmermans37
    @lucmermans37 ปีที่แล้ว

    This video just kept on blowing my mind. You're amazing!

  • @fabianschuiki
    @fabianschuiki ปีที่แล้ว

    This is some of the best content on TH-cam! 🥳Fantastic production value, animations, pacing, and explanations!

  • @JackonKrack
    @JackonKrack 8 หลายเดือนก่อน +3

    Hey man just wanted to post a comment to express my love for your videos.
    Im currently in school studying software development but my love for programming and technology goes beyond that. I'm not the smartest guy and I'm not going to pretend to understand everything you do or say. But man I've learned ALOT.
    So far the most fascinating thing you taught me is the HOW math is actually used in creating all sorts of things. I've always heard that math is important but I never got an explanation for why or how.
    I appreciate and love everything you do and I hope you continue making videos like this for a long time. Much love ❤

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

    This is just a frivolous ammount of liquid GOLD! Wh-what the hell? I have been following you for a long time, but this Render Coding was AMAZING! I think it's been five years since I started modeling for a living in 3D and I, of course, understand how ray tracing works, but this level of detail was beyond my expectations, I learned a lot today!
    Thank you very much!!

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

      I'm happy you enjoyed it so much, thank you!

  • @mrwhite257
    @mrwhite257 ปีที่แล้ว

    Love your stuff, its so oddly satisfying and interesting watching you do your adventures

  • @MakDemonik
    @MakDemonik ปีที่แล้ว

    I have come for another fun video that I understand maybe 10% of - but is always entertaining. And have left with a new understanding of where all these weird material options come from - that I see and use in blender. Amazing.

  • @ndotl
    @ndotl ปีที่แล้ว +22

    Ray casting instead of ray tracing, which only proves I took computer graphics courses about a decade ago. Ray tracing is the accepted name of the process (e.g., RTX4080). I am making this the year I restart my CG journey. You actually provided a lot of great debugging ideas,. I remember debugging being one of the main hurdles in the courses I took a decade ago. Glad to see you reference the Peter Shirley books as I will use then when I get started.

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

      how did you comment on this video 10hours ago? (it's been posted just 3minutes ago)

    • @ndotl
      @ndotl ปีที่แล้ว

      @@GnuSnu Einstein: My comment were based on his utube post in which (if you are paying attention) the code is on display in addition to the 'pretty pictures'.

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

      It's all ray tracing. There's so many variants it's pointless to try to assign one name to one variant. It all comes down to the maths of calculating intersections between rays and geometry. RTX-based ray tracing is simply hardware-accelerated ray tracing. In other words, the hardware assists in doing the maths of tracing the rays. It's still ray tracing with it's done with dedicated hardware or not.

    • @ndotl
      @ndotl ปีที่แล้ว

      @@clonkex In CompSci the formal term is ray casting, but ray tracing is the term used. Actual true ray tracing is performed in optical design as rays are traced through an optical system.

    • @ndotl
      @ndotl 9 หลายเดือนก่อน

      @@GnuSnu P.S: I am also on Patreon and may have seen it there. I did not make it up.

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

    His voice complements his programming and editing style so nicely.

  • @azrhyga
    @azrhyga 8 หลายเดือนก่อน

    Awesome!! Very good job!!
    It's awesome than you were able to recreate Ray Tracing

  • @minilightfire
    @minilightfire ปีที่แล้ว

    Really love all the little visualizations you have added to this project

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

    I love that you said “Suzanne enters the Avatar State” as a way of describing making the model’s eyes glow

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

    I love the coding adventure videos!

  • @user-rb2od5bj2w
    @user-rb2od5bj2w 8 หลายเดือนก่อน

    Always a good day when a Coding Adventure releases. his video feels both calm and inspiring, and never boring.

  • @comvnche
    @comvnche ปีที่แล้ว

    I cannot imagine how much work it is to write the storyline, code everything, take it apart again to "live" good for the video while perfectly narrating.
    You are one of my favorit tubers and I always have to restrain myself to not share your video with everyone I know! (Though I have shared them many times anyway)

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

    Dear Sebastian, your channel's a delight,
    With knowledge gained, my mind takes flight,
    Your game dev tutorials, top notch indeed,
    But other topics, left unexplored, I concede.
    Yet the quality of content, I must profess,
    Is unparalleled, leaving me impressed.
    So keep on creating, keep on sharing,
    Your passion for learning, ever daring.
    Thank you for all that you've done,
    For inspiring us to learn and have fun.
    May your channel continue to thrive,
    As we journey on, to grow and thrive.

    • @yugam6578
      @yugam6578 ปีที่แล้ว

      Sebastian lague is a channel that is very good for intermediate game developers only

    • @nqkhanhskewb
      @nqkhanhskewb ปีที่แล้ว

      I bet this is generated by chatgpt

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

    You have a great understanding of code and programming concepts, and you're able to explain them clearly and effectively. You have a knack for debugging and solving complex issues and your attention to detail and ability to write clean and efficient code is impressive. I take you as an inspiration.

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

    This is the exact kind of thing that I love about programming. I recently made my first pathfinding program in pygame (using Sebastian's A* video), and seeing it work was the best feeling. I feel like making a game would give you that every once in a while, but with little experiments the whole goal is to get a single system working well.

  • @jjesin_j
    @jjesin_j 4 หลายเดือนก่อน

    im so impressed with the level of programming knoledge here, im a begginer programer and watching this video was not only relaxing but entertaing, although ( although i didnt understand alot of it) watching your breakdown and following your thought process really made me understand, keep going with this chanel!

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

    This channel is a good example of quality over quantity

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

    36:49 “My computer is dying, but i think it looks nice.”
    Me when I set the game graphics to max on my potato computer

  • @rikvermeer1325
    @rikvermeer1325 ปีที่แล้ว

    Wow... it took me 10 seconds of vid to subscribe to your channel. Such clear and interesting animations to understand the methodology/functions.

  • @ast_rsk
    @ast_rsk ปีที่แล้ว

    I've tried reading that ray tracing in a weekend series. But this video is the first time I started coming close to actually _understanding_ the concepts in it. Well done and thank you!