How does ray tracing produce hyper realistic graphics? | Bitwise

  Рет қаралды 25,751

DigiDigger

DigiDigger

Күн бұрын

I'm a professional programmer who works on games, web and VR/AR applications. With my videos I like to share the wonderful world of programming with everyone!
What's the next step beyond rasterization? How does ray- and pathtracing create these hyper realistic graphics? We'll look into the inner workings of ray tracing as well as some of the challenges associated with it.
Timestamps
0:00 Intro
2:09 Problems with rasterization
5:50 How light travels
8:10 BVH
10:15 Lighting primitives
12:20 Light bouncing, reflections and refractions
14:25 Other applications of ray tracing
15:46 Problems with ray tracing
17:35 Conclusion
My patreon: / digidigger
References:
How does rasterization work? • How do games render th...
No! Euclid! GPY Ray tracer • "No! Euclid!" GPU Ray ...
Minecraft RTX demo • Video
Interactive sound propagation with bidirectional path tracing dl.acm.org/doi/10.1145/298017...
Music in in outro:
Besus y Abrazor - Rolemusic: freemusicarchive.org/music/Ro... available under a Creative Commons Attribution license creativecommons.org/licenses/...

Пікірлер: 86
@RakastanPorkkanakakkua
@RakastanPorkkanakakkua 2 жыл бұрын
Honestly, learning that ray tracing can simulate sound waves was what really struck a chord in me.
@REALsandwitchlotter
@REALsandwitchlotter 2 жыл бұрын
BOOM…BOOM!! (Excuse the “basil brush the seventies fox puppet” reference:)
@StigDesign
@StigDesign Жыл бұрын
Yes you can think of it like that too, and its more easy to try in real life, Play music in one room and you go to another room and listen, close the door and hear difference :D
@zyansheep
@zyansheep 2 жыл бұрын
He finally remembered his youtube password...
@Thebreak1
@Thebreak1 2 жыл бұрын
Raid shadow legends is finall happy a year later xD
@SplitScreamOFFICIAL
@SplitScreamOFFICIAL 2 жыл бұрын
"He's Back!" -I'm sponsored by Raid Shadow Leg- "but at what cost"
@bigpencil6032
@bigpencil6032 2 жыл бұрын
He's back + he gets more money, there is no negative points
@cavemann_
@cavemann_ 2 жыл бұрын
@@bigpencil6032 Promoting a mobile gambling game is definitely a negative point. Ok it's not true gambling, but it's scummy asf
@bigpencil6032
@bigpencil6032 2 жыл бұрын
@@cavemann_ I personally don't care about the promotions in the videos I just skip them especially when it's raid shadow legends
@Ashona
@Ashona 2 жыл бұрын
Will I ever use this information? Probably not. Will I still watch the entire video because Digi made it? Yeah
@Cypeq
@Cypeq 2 жыл бұрын
Funny enough we've had raytraced audio over a decade ago, with creative EAX 3 and it sounded so much better... games that fully supported it were quite spectacular sounding, audio source positioning was very accurate, unlike nowadays. It's weird that hardware audio acceleration died like it did.
@ThylineTheGay
@ThylineTheGay 2 жыл бұрын
yeahh, it's dissapointing that things like that and physics arent as popular
@carl8790
@carl8790 2 жыл бұрын
I think it has to do with people not liking the idea in buying another hardware to just do one specify task, when there are many inexpensive solutions. Like, it makes sense if your job requires it, but for the average gamer, it's not. This is why Nvidia integrated their Raytracing accelerated hardware with their GPU. If they had sold it separately, it would have been a very difficult sell to gamers.
@Corruptgore
@Corruptgore 2 жыл бұрын
really love these types of developer commentaries, explaining and figuring out how things work, amazing work
@zxuiji
@zxuiji 2 жыл бұрын
Now this was a truly useful episode for me, however there IS way to let the ray go "infinitely", if you record the limits of the scene boundaries - so for example if the furthest x point is 100.0 & -100.0 respectively - and split the scene into boxes (where you can then use the old 2d ray trace method of roughly "if ( rx >= ry ) rx += inc; else ry += inc;") you can then cut off any ray the moment it's rx value goes outside those scene boundaries for the x-axis because at that point you know for sure nothing can be seen beyond that point, this can be further sped up but splitting each scene into sub scenes that are not absolutely positioned but placed at an offset from 0.0 based on how far from the focused sub scene it the sub scene is (e.g. frontScene->z = activeScene->layer - frontSceneA->layer), this gives you a fixed distance based on how many front sub scenes are drawn in the first place, the over arching scene will always be drawn at low poly and unobstructed light state, this will never be noticed because the sub scenes in front of the active scene will hide any low poly stuff. I'm in the middle of learning OpenGL atm so when I've progressed enough to start drawing full on scenes and not just few triangles with a texture here and there I will programme an actual example of what I mean.
@zxuiji
@zxuiji 2 жыл бұрын
@Doctor Zoidenberg I already have rough math for it, I just need to finish building an environment to refine it in since trying to do so with a pen & paper ain't happening
@4P5MC
@4P5MC 2 жыл бұрын
I'm a bit late to the discussion, but what would happen in the case of two perfectly reflective surfaces facing each other? Would the ray infinitely bounce since there's no end condition?
@zxuiji
@zxuiji 2 жыл бұрын
@@4P5MC no, that's what the scene boundaries are for, if the ray get's longer than the difference between it's emition/bounce point and the scene boundaries then you simply stop the loop as it's impossible for it to hit any stored objects at that point
@4P5MC
@4P5MC 2 жыл бұрын
@@zxuiji Ooh, I get it now!
@zxuiji
@zxuiji 2 жыл бұрын
@@4P5MC I should point out that using the difference between the emition/bounce point is actually the slower method of cutting off the ray loop, the faster method is to first put it's angle in normalisation territory relative to the scene and then work out which corner it's facing, after that you simply take part of the scene's total height & width (so offset everying so there are no negatives including the start point of the ray), minus the ray starting point from the part you took, multiply the normalised angle x/y values against those parts and you'll have the max distance the ray can travel in any dimension, much faster than square root, albeit more complicated
@wills_turtles
@wills_turtles 2 жыл бұрын
Good video, but misses a bit of the explanation. See the premier comments about people misunderstanding about how many rays are emitted from rough surfaces.
@Tomyb15
@Tomyb15 2 жыл бұрын
Raytracing for sound (or just some for of holophonic sound) is something I've always been asking for in games. While graphics have kept improving at an incredible rate, sound has mostly remained the same for many years. The most I get out of stereo sound with headphones is to be able to tell that something is to my right or left and gauge the distance from the volume. It really breaks all immersion for me. And it's not like you need one ray for each pixel when it comes to sound, because there are no pixels! There is something to that end from dolby, but it completely proprietary and expensive and almost no games use it. What I want is good 3d sound to be standard and expected in 3d games, not an expensive gimmick.
@davidmurphy563
@davidmurphy563 2 жыл бұрын
You can technically use ray casting (not ray tracing, that's impossible, fragment shaders operate on a wavefront and don't return data, that's what makes them so quick) for a super basic implementation but bouncing ray casts off collision meshes looking for the sound origin is prohibitively expensive for very little gain. The usual hack is to use the path finding your NPCs are using. That way you stop noise coming through walls but let it go through doors. Calculating stereo from that is easy enough. Whether you'll ship a single extra unit from going to the effort is another question and this all costs dev time and fps.
@kapilbusawah7169
@kapilbusawah7169 2 жыл бұрын
The PS5 has a dedicated sound module for exactly sound engineers in game. The work that little processor does for example would require the entire power of the PS4 to "render"
@gabrielandy9272
@gabrielandy9272 2 жыл бұрын
not all games keep technology of sound the same, Source engine (valve games) distort sounds based on the materials it travel trough..... it don't simulate then with ray tracing its acctualy just a straight line from source sound to player, but any material it hits in the path the sound get applied a distortion effect based if its wood metal etc.... cs go is already using this.. VALVE is as company that have amazing sound in games anyway.... some of its games even used dynamic generated music very early. play any valve game with a good headphone and you will notice that its quality is way above many other games...
@straydrop411
@straydrop411 2 жыл бұрын
Best ray tracing explanation video ever. I have watched this from Japan🌸 but nothing more concrete order and more proper choice of words plus pictures like this. I hope more people would watch this then can easily comprehend the latest graphics technology. 😃 ( cheering for you🥇
@Neph0
@Neph0 2 жыл бұрын
Love the fact that you chose footage of sheep herding while promoting Raid
@eboatwright_
@eboatwright_ 2 жыл бұрын
I love this channel :) Thanks for making great videos!
@nitro99x
@nitro99x 2 жыл бұрын
Always great to see a new video. I personally don't really who you're sponsored by, as long as it doesn't effect the videos content. 👍🏼
@yuriterra1
@yuriterra1 2 жыл бұрын
Really good video :D I love watching your channel
@quentinmcwimberton6797
@quentinmcwimberton6797 2 жыл бұрын
Sponsored by Ray: Tracing Legends
@stredo6683
@stredo6683 2 жыл бұрын
i love your videos, keep it up o/
@miscu2542
@miscu2542 2 жыл бұрын
Awesome video as your previous ones!! Thanks a lot for spreading all this knowledge in a so clear way!
@kepler1175
@kepler1175 2 жыл бұрын
Havent seen.. er, heard it applied with sound before to my knowledge. Really cool
@justinbuergi9867
@justinbuergi9867 2 жыл бұрын
Well this is convenient I’m learning about Ray tracing in class this week
@vokonmusic
@vokonmusic 2 жыл бұрын
I love this channel :)
@XD-zg6ii
@XD-zg6ii 2 жыл бұрын
I see what you “numbered” in BVH but anyway thank you for this knowledge
@Hyphen3372
@Hyphen3372 2 жыл бұрын
ayy new upload.
@drinkwatrr9883
@drinkwatrr9883 2 жыл бұрын
We missed you Digi
@ReBufff
@ReBufff 2 жыл бұрын
Very informative and entertaining, hopes to more videos soon!
@Komplexitet
@Komplexitet 2 жыл бұрын
The youtube compression system did not like this video xD especially around 14:00 haha. Love the vid!
@bernardonegri5416
@bernardonegri5416 2 жыл бұрын
It is a flaw of the ray tracing algorithm they decided to use in this scene. He said the scene becomes grainy if you move around because it takes a while for the averages to cancel each other out.
@anbu5667
@anbu5667 2 жыл бұрын
your channel is insane
@D.S69
@D.S69 Жыл бұрын
I think that as long as something is fun that's all that matters
@Lukegear
@Lukegear 2 жыл бұрын
Nice!
@REALsandwitchlotter
@REALsandwitchlotter 2 жыл бұрын
This is good thanks
@fazeelicopter8988
@fazeelicopter8988 2 жыл бұрын
The return of the king
@necronull3767
@necronull3767 2 жыл бұрын
I love your content man, always a pleasure to see you upload
@ZimmervisionCZ
@ZimmervisionCZ 2 жыл бұрын
Wait, do you know where that tech demo for the audio ray tracing comes from? To my eye, that looked a LOT like an upper floor of Angell Hall at the University of Michigan
@cylexx
@cylexx 2 жыл бұрын
the king is back
@freezinfire
@freezinfire 2 жыл бұрын
Finally you've made this, I waited so long
@matrix9452
@matrix9452 2 жыл бұрын
Nice
@stig6339
@stig6339 Жыл бұрын
According to the thumbnail ray tracing is so powerful it can change clothing on Herald
@nikaknigde5104
@nikaknigde5104 2 жыл бұрын
Feels a lackage of Vsause music in the background :D
@jumbledfox2098
@jumbledfox2098 2 жыл бұрын
Next video: How to put out a burning GPU | Bitwise
@guts2048
@guts2048 2 жыл бұрын
Why does the description of raid always look the same do they just copy and paste it?
@NICK....
@NICK.... 2 жыл бұрын
Because it essentially is, mobile ads have ridiculously strict ad reads
@guts2048
@guts2048 2 жыл бұрын
@@NICK.... bruh
@madness_lab
@madness_lab 2 жыл бұрын
2 videos in a year? youre on fire dude 😎😎👌👌
@biaxthepanda
@biaxthepanda 2 жыл бұрын
I just came across to this channel after wondering how portals in the game portal works. As a gamedev i would definetly would like to see more of the "How ..." videos. Geep up the good work!!
@realdonutking123
@realdonutking123 Жыл бұрын
15:02 oh my GOD i thought someone was in my house
@Theraot
@Theraot 2 жыл бұрын
11:50 #RealisticPerfectMirrorReflectionAngle
@SimonLedoux
@SimonLedoux 2 жыл бұрын
I love cats
@mranxiety9995
@mranxiety9995 2 жыл бұрын
Always love a new video. Ive missed ur accent
@fatfingersman
@fatfingersman 2 жыл бұрын
ok, but now tell me how magnets work..
@freezinfire
@freezinfire 2 жыл бұрын
do you know quantum spin? Magnets are basically just conducting metals having their electrons with same spin stuck at one side of the atom making static electricity making magnetic fields. that's basically the gist of it. in other words, oonga boonga magic
@BloodAssassin
@BloodAssassin 2 жыл бұрын
Next video in a couple of months?
@Zweemanuel
@Zweemanuel 2 жыл бұрын
9:08 Nice
@Helloyunho
@Helloyunho 2 жыл бұрын
he’s back: panik it’s about ray tracing: panik sponsored by raid shadow legend: *PANIK*
@joltedjon
@joltedjon 2 жыл бұрын
9:07 lmao the areas
@gavindownes2213
@gavindownes2213 3 күн бұрын
area 1: 420 area 2: 69 noice
@BloxXor
@BloxXor 2 жыл бұрын
tell me about terraria
@Phytom
@Phytom Жыл бұрын
Ray tracing is when you loose 50 FPS for smoother shadow edges.
@konkelberryfinn
@konkelberryfinn Жыл бұрын
A: 420 and A: 69
@handledav
@handledav 7 ай бұрын
so
@-o-1695
@-o-1695 2 жыл бұрын
Mf at google is still holding out on quantum computer techs. Imagine the good things we could have
@CirqueAlvis
@CirqueAlvis Жыл бұрын
9:10 hehe 420 69
@sehaless
@sehaless 2 жыл бұрын
Great content, but that sponsor... >.
@fxarachnid4764
@fxarachnid4764 Жыл бұрын
What if there was raytracing with quantum physics taken into account? Actually, no, please don't make that (but maybe do though).
@gigigigiotto1673
@gigigigiotto1673 2 жыл бұрын
i don't think your definition of roughness is correct
@QiotiCoyote
@QiotiCoyote 2 жыл бұрын
you GOTTA either mute video game footage you show while you're talking, or have minimal sound effects like walking only, on low volume otherwise it's so hard to pay attention or even hear what you're saying it's fine having a video, it's even nice to be able to watch something while you're talking and having just footsteps barely hear able kind of fades into the background and doesn't take away from your voice but anything that's outside a rhythm, like combat or voices, dialogue, or music, or even anything where there main focus is to read as in non voiced dialogue can all take focus away from what you're saying
@andrewwagner942
@andrewwagner942 11 ай бұрын
Stop making dirt shiny
@davidmurphy563
@davidmurphy563 2 жыл бұрын
I mean, you discussed ray tracing without using the word "vector"... Ok. No matrices being multiplied either. No basis and origin clearly. No dot or cross products. No normalisation. No UV. No fragment shader. No vertices with no indexes and no normals. I dunno. It's kinda like promising to explain how a grandfather clock works and having no mention of cogs. No hands, no pendulum, no springs, you get the idea... All you really described were a few optimisation tricks. Maybe change the title to "some optimisation tricks used in ray tracing".
@quentinmcwimberton6797
@quentinmcwimberton6797 2 жыл бұрын
Isn't the point of these videos to go in-depth into programming concepts and what they are, but in Laymen's terms? Vectors, matrixes and the likes are all easily googleable if you wanna calculate shit with them yourself, this video more shows what ray tracing is and what it does.
@davidmurphy563
@davidmurphy563 2 жыл бұрын
@@quentinmcwimberton6797 Teaching how to do the calculations is obviously impractical. Khan Academy has over a 140 videos laying the groundwork. But this vid is bizarre, it goes from the most basic explanation possible (a ray is bounced from the camera to the light source) to some pretty irrelevant trivia regarding optimisation that has next to nothing to do with the fundamentals and are just work arounds to hardware bottlenecks. Say you were explaining how an ICE works, your explanation is "you put fuel in, spark goes boom which turns a crack pushing car forward" and then going on to explain why an overhead cam is used instead of pushrods. This is equally weird. The explanation is trivial to the extent of being what you would give to your drunk uncle in the pub followed by some weird detail. But really, I'm not saying the vid is terrible, only that the title should have been different.
@a_grin_without_a_cat
@a_grin_without_a_cat 2 жыл бұрын
Sound mastering at the end is fuuuuuucking horrible, I guess I can bet that I haven't heard worse shit like this ever :)
How do games render their scenes? | Bitwise
13:12
DigiDigger
Рет қаралды 561 М.
How do games like Prince of Persia manipulate time? | Bitwise
16:11
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 10 МЛН
How many pencils can hold me up?
00:40
A4
Рет қаралды 18 МЛН
WHY IS A CAR MORE EXPENSIVE THAN A GIRL?
00:37
Levsob
Рет қаралды 9 МЛН
Pokey pokey 🤣🥰❤️ #demariki
00:26
Demariki
Рет қаралды 7 МЛН
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 556 М.
RAY TRACING and other RENDERING METHODS
10:22
Andrey Lebrov
Рет қаралды 262 М.
Real-Time Ray Tracing Explained
11:46
Gamers Nexus
Рет қаралды 292 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 786 М.
Don’t Use Ray Tracing - Even On a 4090
9:30
Graphically Challenged
Рет қаралды 18 М.
What is Ray Tracing?
5:23
Techquickie
Рет қаралды 1,2 МЛН
Rasterizer Algorithm Explanation
5:18
HuCE - cpvrLab
Рет қаралды 71 М.
How do Video Game Graphics Work?
21:00
Branch Education
Рет қаралды 3,2 МЛН
Which level took the longest??
0:34
A4
Рет қаралды 5 МЛН
Как он смог забить гол
0:59
Garga
Рет қаралды 1,4 МЛН
Body Symbol Game With Sonic And Shadow
0:23
Intalord
Рет қаралды 10 МЛН