Materials and Physically Based Rendering // Ray Tracing series

  Рет қаралды 36,797

The Cherno

The Cherno

Күн бұрын

Keep exploring at brilliant.org/TheCherno/ Get started for free, and hurry-the first 200 people get 20% off an annual premium subscription. AMAZING place to learn all the math you'll need for this series!
Support on Patreon ► / thecherno
Discord (#raytracing-series) ► / discord
Source code ► github.com/TheCherno/RayTracing
🧭 FOLLOW ME
Instagram ► / thecherno
Twitter ► / thecherno
Twitch ► / thecherno
Learn C++ with my series ► • Welcome to C++
📚 RESOURCES (in order of complexity)
🟢 Ray Tracing in One Weekend series ► raytracing.github.io
🟡 Scratch a Pixel ► scratchapixel.com
🔴 Physically Based Rendering: From Theory to Implementation ► amzn.to/3y2bGK7
💾 SOFTWARE you'll need installed to follow this series
Visual Studio 2022 ► visualstudio.microsoft.com
Git ► git-scm.com/downloads
Vulkan SDK ► vulkan.lunarg.com
CHAPTERS
0:00 - Materials
6:16 - Physically Based Rendering
20:53 - A better material system
26:22 - Accumulation
Welcome to the exciting new Ray Tracing Series! Ray tracing is very common technique for generating photo-realistic digital imagery, which is exactly what we'll be doing in this series. Aside from learning all about ray tracing and the math to goes into it, as well as how to implement it, we'll also be focusing on performance and optimization in C++ to make our renderer as efficient as possible. We'll eventually switch to using the GPU instead of the CPU (using Vulkan) to run our ray tracing algorithms, as this will be much faster that using the CPU. This will also be a great introduction to leveraging the power of the GPU in the software you write. All of the code episode-by-episode will be released, and if you need help check out the raytracing-series channel on my Discord server. I'm really looking forward to this series and I hope you are too! ❤️
This video is sponsored by Brilliant.
#RayTracing

Пікірлер: 89
@TheCherno
@TheCherno Жыл бұрын
Hope you guys enjoyed this episode - it’s getting super exciting now! Don’t forget to learn all your math at brilliant.org/TheCherno/ Get started for free, and hurry-the first 200 people get 20% off an annual premium subscription.
@ChrisM541
@ChrisM541 Жыл бұрын
Hey Cherno, (if the following makes sense...) any chance you could test out something I'm sure every gamer/new & some old coders will find extremely interesting, something I haven't seen anyone do:- From what I see, there's a lot of folks out there that think "the GPU does all the work" and don't realise just how much the CPU contributes to frametime/fps, and thus, how crucial it is to try to ensure your code is 'the best it can be' and to try to think about speed optimisation at all times inside the game loop (and any associated processes/dependencies). To show how the CPU(the programmer's game code) contributes... Could you test the maximum frame throughput for any typical gfx card, using pre-set frames, basically switching off everything else in the gameloop (no input/collision detection/ui update etc etc checks) apart from only the code that sends a frame to the GPU (i.e. as little CPU involvement here as possible). I don't know if the GPU 'speeds up' things if the frames are identical, if so, set up minor/enough changes to defeat that. Then, re-enable the switched off game loop items and test again. This is to show folk how much the CPU contributes to frametime/fps in a typical game loop. No problem throwing in a 'slowdown loop' inside the gameloop if frametimes are 'too fast' (of course, keep the slowdown code active for both cases...we're only measuring the frametime difference).
@pavelperina7629
@pavelperina7629 Жыл бұрын
Hi. Looking at "shader" code at 20:17 or 26:10 i see some issue that is basically in any book older than 10 years. Computer screen uses gamma correction. Half black is not 128, but something like 180, i can't recall. What you may try is adding something like `vec3 matDiffCol = pow(u_color,vec3(2.2));` at start of your shader and something like `fragmentColor = vec4(pow(color, vec3(1.0/2.2)), 1.0);` at the end. Gray value (186.0/255)^2=0.5 for purposes of shading and color mixing and in the end half gray is converted to RGB=186,186,186. Even more correct is to use some different color space for recovery in areas where RGB values are clipped which may result to false colors in areas where one or two colors are oversaturated, but I have no experience with this. Main problem (at least for me) with PBR is getting good materials. Like porcelain covered with glass, making aluminum somewhat coarse and somewhat oxidized, so not pure metal, making some microtexture ... actually it's basically impossible. So in the end most noticeable improvement is Fresnel reflection which depends on angle. If you do raytracing or you have nice cubemap around the scene (or procedural color)
@AndyEder
@AndyEder Жыл бұрын
Having worked in real-time and offline graphics rendering tech for 30 years, seeing such a well-thought-out and presented series on ray tracing is excellent. Thanks for introducing this exciting field to more people.
@spacechannelfiver
@spacechannelfiver Жыл бұрын
These are some of the most realistic hand movements I've ever seen in computer graphics. Recent Meta presentations clearly fell into the uncanny valley.
@arsenbabaev1022
@arsenbabaev1022 Жыл бұрын
Its sad seeing every new episode in a series getting less and less views. The topics are interesting on their own even without trying to replicate them.
@Notverygoodatall
@Notverygoodatall Жыл бұрын
That's how most educational series go. Even if they are interesting
@espertalhao041
@espertalhao041 Жыл бұрын
The video was published less than 2 hours ago, at a not-so-good time for Americans and Europeans. The video will get more views with time.
@lolcat69
@lolcat69 Жыл бұрын
i mean yeah, is sad, but you literally saw the video when it was just uploaded, so dont espect 1M views in less than an a week lol
@rand0mtv660
@rand0mtv660 Жыл бұрын
@@espertalhao041 I would say this person isn't necessarily referring to this video in particular. If you go back and look at all videos in this series, there is a steady decline in views. This is of course unfortunate because the series is pretty interesting.
@Qubaef
@Qubaef Жыл бұрын
It's just that this series is pretty bad. 9 episodes in and he is still explaining super basic concepts which anyone interested can learn in less than few hours from better resources. There is no proper target audience for it. If you are programmer, you don't need this series. If you are just a hobbyist, you don't care about the 20 minutes of coding.
@n0msayn
@n0msayn Жыл бұрын
This is the first video I've seen from you, and I am amazed at how engaged I am. Your teaching skills are really good
@aurealisgraphics
@aurealisgraphics Жыл бұрын
Neat episode! I still want to mention though, that jittering the reflected ray doesn't yet make it physically based, as it isn't based on any microfacet profile or PDF. Still a great way to introduce new people to the subject though; talking about the GGX PDF or the GGXVNDF might be interesting for future episodes!
@RahulGuha-lq8bo
@RahulGuha-lq8bo Жыл бұрын
After watching ur c++ videos from 5 years and seeing you now , u have changed quite a lot
@goshisanniichi
@goshisanniichi Жыл бұрын
Pretty easy to add Fresnel reflection at this point as well. I'm looking forward to transparency, especially internal reflection.
@brannonharris4642
@brannonharris4642 Жыл бұрын
loved this one, dude. Fantastic explanation and pacing.
@mr.mirror1213
@mr.mirror1213 Жыл бұрын
This series is soo good , I was struggling to implement raytracing
@timsonss
@timsonss Жыл бұрын
I was looking for graphics tutorials starting with PBR yesterday and wished you had videos on this topic. I have a weird feeling now that this has happened like I am a fortune teller!
@Alkanen
@Alkanen Жыл бұрын
Hi there @TheCherno! Do you know when you'll continue on this part and build a texture/material pipeline for the tracer? Optimisation is good of course, but getting pretty pictures is more fun :)
@pawelstolecki3491
@pawelstolecki3491 7 ай бұрын
thanks for making the content, very useful!
@Swistakaqq01
@Swistakaqq01 Жыл бұрын
Hi Cherno, im curious if you could look at NVIDIA's "Generalized Resampled Importance Sampling" (GRIS) and have a talk / video about it and maybe how to we could use some of this ideas to enchance the renderer. (There is a great video about this from Two Minute Papers called: "Ray Tracing: How NVIDIA Solved the Impossible!")
@aidandalzell3812
@aidandalzell3812 Жыл бұрын
what you could say in that intro is that materials are important for all render methods and that the main thing for ray tracing is lighting
@per-axelskogsberg3861
@per-axelskogsberg3861 Жыл бұрын
Neat, you explained it very well.
@neozoan
@neozoan Жыл бұрын
Well done! Thank you!
@MerrickKing
@MerrickKing Жыл бұрын
Well the world revolves around me, so I guess I must be a light source
@redafakih12
@redafakih12 Жыл бұрын
What a series🔥
@esphix
@esphix 2 ай бұрын
0:52 Having been a professional light source with over 10 lightyears of experience, I can definitely confirm that it is easy and straight forward being a light source
@lucian6172
@lucian6172 Жыл бұрын
Looks like the roughness is the one responsible for all the noise and all the extra ray-tracing samples needed. Just apply a blurry decal that fits the situation and be done with it. In the end you will still have to do noise reduction and that results in a blurry noise pattern similar to a projected blurry decal. You are better off if you make some advanced decal projection struct/class that can be molded and distorted and projected to describe all the surface responses and all the material properties but without wasting any time on materials and tracing and accumulating samples and so on. Can we see that decal projection idea in action ?
@HazStepFTW
@HazStepFTW Жыл бұрын
Ray tracing series always has the best thumbnails 😂
@MrMariozzz78
@MrMariozzz78 2 ай бұрын
whay library can i use with code-block from programming in c++ e raytracing?
@patriotaRBC
@patriotaRBC Жыл бұрын
I'd like to see some tutorial on terrain editor. That'd be great
@user-yw9ib8do6c
@user-yw9ib8do6c Жыл бұрын
really helpful!
@DerrickCanfield
@DerrickCanfield Жыл бұрын
I am currently a light source and can confirm it is very easy. However the human body emits an extremely small amount of light.
@asteriskman
@asteriskman Жыл бұрын
yea, lets talk more about this path tracing concept!
@BlueBeluga_
@BlueBeluga_ Жыл бұрын
Can someone explaine to me what the difference between raytracing and radiosity is?
@sozno4222
@sozno4222 Ай бұрын
I’m a bit confused when you said Albedo is the non reflective color and then continued and said ‘what about the reflectiveness’. Everything about materials is about reflectiveness, including albedo. The different parameters simply say what should be reflected and when. A red color means it’s returning red light. Right?
Жыл бұрын
So what kind of model is actually used in games today? I mean, do you use ray tracing in real time in a game? How do game engines render point light effects? Is Phong model still used?
@thedebapriyakar
@thedebapriyakar Жыл бұрын
I fucking love you Chernikov
@friction5001
@friction5001 Жыл бұрын
Even though I’m not a game dev this is interesting
@troyhancock9293
@troyhancock9293 Жыл бұрын
To be fair, a lot of rendering engineering jobs and the skillset are not necessarily game dev related. It just so happens game dev needs rendering engineers, same with the finance industry and a lot of R&D stuff.
@kamil_atakan
@kamil_atakan Жыл бұрын
Hi cherno!
@rouchy_
@rouchy_ Жыл бұрын
If I hadn't the videocard with RTX feature support, Am I still can follow this series?
@anon_y_mousse
@anon_y_mousse Жыл бұрын
Yeah, thus far he's not done any hardware acceleration. It's just software based.
@Howtheheckarehandleswit
@Howtheheckarehandleswit Жыл бұрын
So far, absolutely! Obviously, since I am not the one making the videos, I can't promise what the Cherno will do in the future, but so far we have actually been doing all the rendering on the CPU, so which video card you have makes no difference at all. If I had to guess, I suspect Cherno will not make it require an RTX card in the future, since that would limit his audience to people with RTX cards
@bishboria
@bishboria Жыл бұрын
The effect of the additions add up pretty quickly. it's looking great
@coffee-is-power
@coffee-is-power Жыл бұрын
Based
@diligencehumility6971
@diligencehumility6971 Жыл бұрын
Damn bro, you have taken on a few extra pounds. Me too. I am becoming fat. Let us stop this madness! You looked way better without thick cheeks, and so did I. Let's change this.
@Jkauppa
@Jkauppa Жыл бұрын
how do you learn to give and not pay for free stuff
@Jkauppa
@Jkauppa Жыл бұрын
set no pre-conditions, then you are free from the money-law master of yours
@Jkauppa
@Jkauppa Жыл бұрын
I'm not in any hurry, not me by Christ in me, Christ as me
@Jkauppa
@Jkauppa Жыл бұрын
money is not an acceptable (consumable) produce
@Jkauppa
@Jkauppa Жыл бұрын
therefore all things mingled with money are tainted
@Jkauppa
@Jkauppa Жыл бұрын
the whole thing becomes useless
@st3b3d
@st3b3d Жыл бұрын
Hey Cherno, its time to do your obligatory apology video. Your youtube channel is getting to the point of needing some edgy drama. All big youtube channels have to do this at some point. I think it would be good to apologize for being Australian. That would do good.
Path Tracing // Ray Tracing series
23:21
The Cherno
Рет қаралды 49 М.
Program the Player in Unity | Celestial Breaker
18:26
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 33 МЛН
Spot The Fake Animal For $10,000
00:40
MrBeast
Рет қаралды 134 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 9 МЛН
Game Jam: Day 2 of 7
2:33:56
Max A
Рет қаралды 60
FASTER Ray Tracing with Multithreading // Ray Tracing series
22:23
Computer Graphics Tutorial - PBR (Physically Based Rendering)
13:40
Victor Gordan
Рет қаралды 32 М.
Face Detection in Python: Because Why Not?
8:32
Cloover
Рет қаралды 1,4 М.
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 566 М.
Introducing the Ray Tracing Pipeline // Ray Tracing series
29:23
PATH TRACER made by 15-YEAR-OLD in C++ OpenGL! // Code Review
36:56
2D Physics Engine! // Code Review
35:26
The Cherno
Рет қаралды 50 М.
An introduction to Shader Art Coding
22:40
kishimisu
Рет қаралды 945 М.
Sigma Kid Hair #funny #sigma #comedy
00:33
CRAZY GREAPA
Рет қаралды 33 МЛН