LIGHTING AND SHADING // Ray Tracing series

preview_player
Показать описание


🧭 FOLLOW ME

📚 RESOURCES (in order of complexity)

💾 SOFTWARE you'll need installed to follow this series

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! ❤️

CHAPTERS
0:00 - Lighting and shading in rendering
6:21 - Using floats for colors
12:07 - Why use floats instead of ints for colors?
12:52 - Finding our sphere hit coordinates
17:08 - Closest intersection point
19:40 - Using color to visualize numbers
21:02 - How lighting and shading works
22:45 - Calculating lighting using normal vectors
25:34 - Visualizing normals better
27:00 - Using math to calculate lighting and shade our sphere

This video is sponsored by Brilliant.

#RayTracing
Рекомендации по теме
Комментарии
Автор

Something really clicked for me in this episode. after finishing, when you gave the homework i went and immediately was able to figure it out, the lighting, the colors, the surface normals, and even setting up the GUI with working sliders. Great episode

ComfyDyl
Автор

When that final result popped up, that was insane! Absolutely loved it🔥 Kudos to you @The Cherno

redafakih
Автор

Excellent progression of developing and demonstrating concepts through a series of changes. Not only is this good form with respect to educating, but is a helpful practice for software development in general. It is helpful to maintain a sense of confidence and understanding along the way as a feature is developed. Well done!

neozoan
Автор

The fact that such trivial linear algebra operations (dot products and normalization) basically doubled the frametime (from 3ms to 6ms) is insane

matheusmarchetti
Автор

This is a great series. The effort you have put into this is very evident, thanks for that.

judedavis
Автор

Really clear explanations Cherno! Funnily enough I've been doing very similar computations with topographic data

benjaminfranklin
Автор

geometry and textures actually don't even matter in a lot of cases, especially if the lighting is good enough.
throw any low poly solid color model into a beautiful lighting engine and it looks beautiful

stephenkamenar
Автор

My solution for the "homework" included adding two vec3 properties on the Renderer--one for the light direction and one for the sphere color. In the WalnutApp's OnUIRender method I added six sliders immediately under the frame-rate text--one each for the components of the sphere color (r, g, b) and the light direction (x, y, z). I set the min/max for the color channels to [0, 1] and for the light components to [-1, +1]. With the real-time rendering of the single sphere I was then able to see the color change in real time and the shading change in real time as I dragged the slider values back and forth. WAY more fun than the clunky everything-from-scratch ray tracer I wrote in university in the early 2000s.

davidcfrogley
Автор

holy shit this was amazing. that stuff always blew my mind and i found so hard to understand but this entire video just made it SO SIMPLE! you're the absolute best teacher for that content.

waterymelon
Автор

I am using glsl instead because I just want to learn math instead of copying your code. 😄

unknownguy
Автор

shouldnt the function at 11:23 be called ConvertToABGR since that is is the format you are converting it too?

lachee
Автор

I don't understand 1 single thing but I love every second of it.

danielfennerdev
Автор

0:35 "If there was no light anywhere we whould'nt actually see anything" The Cherno 2022 AD

spirothegamer
Автор

XD The ease with which he removes the camera lens at 0:49. I think he uses it fairly often.

isardbotha
Автор

I bought the book when the vid came out, I got it and I can say it’s great for everything game dev it covers everything from matrices to scattering. The purchase was also great timing as I started doing shaders 2 months ago and this book helps me go up a level.

DaddyFrosty
Автор

If the sphere is behind the camera, both t values will be negative. If the camera is inside the sphere, then one t value will be negative. So the t to choose should be the smallest NON-NEGATIVE t value.

davidcfrogley
Автор

Glad you're pumping more content on this series. By the way are those custom colors you setup in VS settings along side visual assist or something else ?

TechNova
Автор

FYI: There are no "lightrays" in nature, there are photons though, which are quantum objects - quanta of energy in the electromagnetic field.
As these objects are quantum in nature, they can be entangled to other shit and are also in a superposition of multiple states all at once - If you think rendering is slow now well... imagine simulating all that :)

syntaxed
Автор

Love the content and how easy it is to follow along. I'm using Python with OpenGL and can follow along perfectly! Keep it up!

christophercoronaios
Автор

This is education at its best, thanks.

hashimhusban
join shbcf.ru