Emission and Emissive Materials // Ray Tracing series

  Рет қаралды 27,968

The Cherno

The Cherno

11 ай бұрын

To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/TheCherno. The first 200 of you will get 20% off Brilliant’s annual premium subscription!
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
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! ❤️
Hazel ► hazelengine.com
🕹️ Play our latest game FREE (made in Hazel!) ► studiocherno.itch.io/dichotomy
🌏 Need web hosting? ► hostinger.com/cherno
💰 Links to stuff I use:
⌨ Keyboard ► geni.us/T2J7
🐭 Mouse ► geni.us/BuY7
💻 Monitors ► geni.us/wZFSwSK
This video is sponsored by Brilliant.

Пікірлер: 116
@TheCherno
@TheCherno 11 ай бұрын
Ray Tracing series is BACK! Thanks for watching guys, your support means the world ❤ To dive deeper into the math, check out Brilliant - you can try everything they have to offer FREE for a full 30 days, visit brilliant.org/TheCherno. The first 200 of you will get 20% off Brilliant’s annual premium subscription!
@sheesh001
@sheesh001 11 ай бұрын
oh no the hairs going rogue
@DazedNConfused71
@DazedNConfused71 11 ай бұрын
Great to see this series back. Just received my PBR book from the States yesterday, so along with another episode of this series it feels like Christmas.
@Alkanen
@Alkanen 11 ай бұрын
YES WE DID MISS YOU! So happy to finally get a new episode, this is wonderful! The fact that I don't have time to watch it right away is painful >.
@Alkanen
@Alkanen 11 ай бұрын
@@DazedNConfused71 I got mine a few weeks ago (assuming you mean the 4th ed PBR:FTTI) but have been busy with AI/ML so I haven't really had time to start reading it. Have you, and if so what do you think?
@DazedNConfused71
@DazedNConfused71 11 ай бұрын
@@Alkanen Yep fourth edition. I am 28 pages in, but hope to read 100-200 pages this weekend. So far it is really good and easy to understand. The code referencing takes a little bit to get used to though. I have been working on doing a CPU path tracer completely from scratch over the past 4 weeks and it is not looking so great. Hoping the book and these videos will help me work out what I am doing wrong. Spent most of those 4 weeks writing a Vector and Matrix library. Currently have the Cornell box rendering fine with primary rays, but as soon as I add bounces and pixel averaging it looks completely wrong.
@ljam0786
@ljam0786 11 ай бұрын
I thought you just stopped producing any more ray tracing videos. I have never been happier to be wrong.
@feschber
@feschber 11 ай бұрын
I'd imagine it takes quite a while to get these things right and make a video out of it
@ljam0786
@ljam0786 11 ай бұрын
@@feschber I would imagine. When I looked into it more by myself I couldn’t even understand what I was reading.
@feschber
@feschber 11 ай бұрын
@@ljam0786 jup I did a whole semester on global illumination and pathtracing and the sort and its such a huge rabbit hole of things to learn. Sampling techniques alone could fill a whole video series for example
@mjthebest7294
@mjthebest7294 11 ай бұрын
This was honestly mindblowing. The elegance is real.
@bean_mhm
@bean_mhm 11 ай бұрын
I enjoy this series a lot, thanks for the time and effort Cherno!
@Kazyek
@Kazyek 11 ай бұрын
Can't wait to the part where it gets ported to compute shader! It would be interesting to see some blend of a rasterized scene with some ray-traced elements on-top of it
@scottlawson1464
@scottlawson1464 11 ай бұрын
The code (12:05) for InUnitSphere looks wrong. I think you need to keep generating vectors until you get one in the unit sphere, and then normalize that vector. The volume of space outside the sphere but inside the cube is not evenly distributed in all directions (otherwise the 'cube' would be a sphere), so if you normalize the vectors outside the sphere you no longer get uniformly distributed vectors. Also the name is InUnitSphere but the vector that is generated is on the surface of the unit sphere, not in it.
@Alkanen
@Alkanen 11 ай бұрын
Yes, I was going to make the same comment. The function is biased towards the corners of the cube surrounding the unit sphere. As you say, the trick is to generate a vector, check that it's length is
@LameGamesOfficial
@LameGamesOfficial 10 ай бұрын
Perhaps a better way is to generate two random angles (theta and phi) and use spherical coordinates to ensure a point on a unit sphere. No multiple vector generations required.
@Alkanen
@Alkanen 10 ай бұрын
@@LameGamesOfficial hmm, no, I think that will place a disproportionately high number of rays near the poles. Perhaps if you scale the probability along the latitude to compensate of course.
@debbyda
@debbyda 9 күн бұрын
I'm so happy this series is back! It comes just it time to learn the basics befor diving deeper into PBR! :)
@craftydoeseverything9718
@craftydoeseverything9718 11 ай бұрын
Yessss, the ray tracing series is back! I don't have any plans to actually implement any of this myself but I do find it super interesting and I feel like I'm learning a lot from this series!
@vesk4000
@vesk4000 8 ай бұрын
I absolutely love this series! Btw, why aren't we multiplying the emission color by the contribution when adding it to the light? Doesn't it make sense to do it for all the lights, not just the skylight? We see that the pink ball lost its color when you disabled the skylight. And also if our lighting relied on emissive lights, wouldn't we need our light sources to be massive, because the bigger they are, the more likely they are to be hit by the rays?
@F3RP4LP
@F3RP4LP 11 ай бұрын
Thanks for getting back to the series, I'm eager to see the next ones!
@arnedebeer
@arnedebeer 11 ай бұрын
Yes, I have been waiting for a new episode for so long! Great to see you didn't stop this series!
@TAMusic
@TAMusic 11 ай бұрын
You're honestly one of the best at explaining these concepts on the whole internet so I'm so glad this series is back, raytracing is something I've been wanting to learn for a while now!
@averageturtlee
@averageturtlee 11 ай бұрын
Thank you for a new episode in this series! I really love learning from you and this topic really interest me!
@bishboria
@bishboria 11 ай бұрын
This was a very cool episode, glad to see the ray tracing series back! The final rendered scene looks great. In fact, the intermediate scenes you were displaying also looked really good. I imagine someone could make a cool game applying different rendering effects like that.
@peupledumarc9345
@peupledumarc9345 5 ай бұрын
Really cool. I really enjoy your raytracing series.
@jlmonolith
@jlmonolith 11 ай бұрын
Glad to see that the ray tracing series is back! I'm eager to try it out for myself.
@_Nerdiful_
@_Nerdiful_ 11 ай бұрын
This is my favorite series, I was a little worried you weren't returning to it
@XxDirtJumperx
@XxDirtJumperx 11 ай бұрын
Stoked on this series! In between episodes I ported the code to CUDA, but I kind of fell out of working on it. Excited its back.
@user-ke5wc9ki6m
@user-ke5wc9ki6m 6 ай бұрын
I love this series video so much! Please keep updating! Thans a lot Cherno!!! By the way, have you ever though about teaching Vulkan library?
@lukasjetu9776
@lukasjetu9776 11 ай бұрын
i love 3d renderers, they are just so fascinating to me on how they work
@bloodredtape
@bloodredtape 11 ай бұрын
Finally got raytracing episode, you're best!
@mrboblox4444
@mrboblox4444 11 ай бұрын
great video sir cherno! i think a video about sphere tracing and SDFs would be pretty interesting! maybe you could even render some crazy fractals...
@VoidloniXaarii
@VoidloniXaarii 10 ай бұрын
So great to see this series again
@perefm
@perefm 9 ай бұрын
Please keep going on this series! the explanations are pure gold :) As a kind suggestion: when do you plan to start raytracing a mesh instead of only spheres? :)
@Petch85
@Petch85 11 ай бұрын
I love this, such a good video series.
@raith-san
@raith-san 11 ай бұрын
Love it, this app is looking extremely solid already
@ashwithchandra2622
@ashwithchandra2622 10 ай бұрын
Bro it's just freaking awesome
@govcorpwatch
@govcorpwatch 10 ай бұрын
Skin and other semi-transparent material is modeled by absorbing more light, but then adding an emissive component to compensate.
@666nevermore
@666nevermore 4 ай бұрын
I think the light from the emission is partially absorbed by the humidity of the air. I mean bloom is blood, but I think the proper way is for the volume of light to be driven by the perceived ambient fog
@mr.mirror1213
@mr.mirror1213 11 ай бұрын
wow that was epic , I am guessing the next episode will cover refraction
@marknefedov
@marknefedov 11 ай бұрын
Your hair experienced Boolean subtraction 😂
@Benjaneb
@Benjaneb 11 ай бұрын
It's amazing what a big visual difference so little code can do. Could you do a video on some specular BRDF in the future?
@keshavkeshav5354
@keshavkeshav5354 11 ай бұрын
brother, i was watching your 5 years old opengl playlist, and you looked so good in those videos. You look good now too, but earlier you looked really cool
@stevenfrench3644
@stevenfrench3644 11 ай бұрын
I'm only 5 minutes into the video and liking the video so far! Needing this!
@stevenfrench3644
@stevenfrench3644 11 ай бұрын
Very cool, didn't realise it was so simple to create emissive materials. WIll try to implement in my custom c++ game engine
@TheMafo369
@TheMafo369 11 ай бұрын
This just made my day.
@commanderguy-rw7tj
@commanderguy-rw7tj 11 ай бұрын
I'd love to see you implement anti aliasing without post processing (e.g. by rotating the starting rays by a tiny random number each frame), I think that would probably up the overall image quality noticeably, basically without any effort
@alessandrocaviola1575
@alessandrocaviola1575 11 ай бұрын
Ray tracing Is a superbly elegant algorithm, It Is also quite addicting, because you can stack a lot of very interesting features One After the other by Just using the primitives you already have, and emissing materials are an example of this. Too bad i no longer have the time to work on mine, i was wbout ti implement the Disney shader, It would have improved It quite a lot...
@ariasalehi5665
@ariasalehi5665 11 ай бұрын
Very Very Very Cool! Thanks
@mastershooter64
@mastershooter64 11 ай бұрын
holy shit man ray tracing is absolutely beautiful will you be implementing dispersion in transparent materials?
@notagamer8782
@notagamer8782 7 ай бұрын
This was beautifully gorgeous
@luigidabro
@luigidabro 11 ай бұрын
Well, I programmed an entire physical based path tracer in Python, learned C#, and coded it in C# with multithreading. It was truly a long time. (Followed the vid from Sebastian Lague)
@asteriskman
@asteriskman 11 ай бұрын
Missed you much!
@MrSandshadow
@MrSandshadow 11 ай бұрын
Can you do an episode when you showcase a general architecture of the game engine? how different abstraction interact with eachother , ect? ( you can gimme a link to some good artickle book and I would be off ) . Keep up a good work !
@bishboria
@bishboria 11 ай бұрын
Would have been interesting to see you putting values for the orange sphere to be similar to the sun! (z distance: 1.496*10^11, power: a lot)
@scewps
@scewps 11 ай бұрын
Very nice improvement :) At 20:07, shouldn't the emitted light also be multiplied by the contribution? Since even emitted light gets absorbed by the left sphere
@TheCherno
@TheCherno 11 ай бұрын
Yeah that’s mentioned at 20:15
@DazedNConfused71
@DazedNConfused71 11 ай бұрын
@@TheCherno I don't see how the current code is working, even though I can see on the video that it is. In the loop where is the material color used?
@TheCherno
@TheCherno 11 ай бұрын
@@DazedNConfused71 it’s not used, at the moment we’re just seeing the (orange) light only. It’s like having white materials on every object (1,1,1), and an orange light - no light is “absorbed”
@DazedNConfused71
@DazedNConfused71 11 ай бұрын
@@TheChernoAhh ok I understand, thought I was missing something. Thanks for the reply and this video series.
@scewps
@scewps 11 ай бұрын
​@@TheChernoshouldn't it be contribution instead of the albedo though? And that includes the albedo then. Or am I misunderstanding it 🤔
@MedicineBowVideo
@MedicineBowVideo 11 ай бұрын
Thanks!
@najmiter
@najmiter 11 ай бұрын
The problem with university physics and math professors was that they were PhD's in physics and math but they weren't programmers!
@JakobKenda
@JakobKenda 11 ай бұрын
yes we missed you
@DomensionStudios
@DomensionStudios 7 ай бұрын
So awesome
@carlosb8130
@carlosb8130 11 ай бұрын
Do you have any thoughts/reaction video about the Apple Vision?
@REktSigMa
@REktSigMa 11 ай бұрын
Are you making a engine like Radiant Black? This is the level editor for Black Ops 3 Mod Tools. The same editor that Treyarch uses and the same editor that Custom Zombies map creators use on Steam in the workshop. Hazel could be........ Hmm.
@REktSigMa
@REktSigMa 11 ай бұрын
Cherno will your game engine be like URE kinda? I know how Hazel could stand out more than any level editor or game engine but it would take a lot of performance i'm sure. If somehow you could design a game engine with coop style level creator, like you could team up with your brother or friend to build a single map together. No one offers that probably it is because of the shear amount of Hardware it would require. IDK.
@Petch85
@Petch85 11 ай бұрын
Would it be "easy" to add Fresnel effect/reflection? (not for Emissive Materials) It looks to me to be missing, I might have over looked it.
@Alkanen
@Alkanen 11 ай бұрын
I'm guessing that's coming with the addition of dielectric materials and specular reflections in a future video.
@itr00ow93
@itr00ow93 11 ай бұрын
FINALLY!
@KeepAnOpenMind
@KeepAnOpenMind 8 ай бұрын
Hey Yan, are you going to release another video on that topic?
@1deadb0b
@1deadb0b 11 ай бұрын
16:47 because its your favourite colour?
@loge-8
@loge-8 11 ай бұрын
Finally
@NOSHEDMANTIS
@NOSHEDMANTIS 6 ай бұрын
Help pls, I have these lovely glowing orange spheres but I want everything else to keep its original colour too.
@NRodriges
@NRodriges 11 ай бұрын
One thing, that I don’t understand is how we will calculate ray trace intersections with objects other than spheres?
@Alkanen
@Alkanen 11 ай бұрын
The spheres will probably be replaced entirely by objects using meshes later on, and then it's triangle intersections for everything. And a bunch of bounding volume hierarchies to make sure it's not slow as hell.
@MarnickHartgers
@MarnickHartgers 11 ай бұрын
I think u forgot to multiply the emission with the contribution
@aaronvansichem
@aaronvansichem 11 ай бұрын
What did you exactly study in college? Was it just software engineer or game development or something?
@ninjasploit
@ninjasploit 11 ай бұрын
Ye missed ya
@asteriskman
@asteriskman 11 ай бұрын
you ever seen the strange behavior of 3 polarized filters? 😳
@REktSigMa
@REktSigMa 11 ай бұрын
21:10 Then what is a lens flare?
@Andybananas
@Andybananas 11 ай бұрын
lens flares are more of a star like shape that appears on really bright lights, these are caused by how light refracts off our eyes lenses
@REktSigMa
@REktSigMa 11 ай бұрын
@@Andybananas Yea like the Sun. I mean I love Skyboxes. They do some amazing things to just plain ole terrain patches. Brushes as well, just never use a lot of Brushes though. TBH. IDK if you guys ever played COD zombies before. But bro like certain people use Mod Tools and its almost like the map came from Treyarch or better. I'm just learning mapping. Emissive textures are not solid there more of a decal but different. If you textured the floor with Emissive textures only then when you spawned in you would just fall through the floor.
@REktSigMa
@REktSigMa 11 ай бұрын
@@Andybananas Complete easter egg completions like cast cut scenes they just script with a different c++. It was the language of the hackers back in the day, Activision took the language and re-defined it sorta speak. GSC language.
@Jkauppa
@Jkauppa 11 ай бұрын
for every bounce, have a pre-calculated distribution of the 360 view bounce rays
@Jkauppa
@Jkauppa 11 ай бұрын
its very gpu compatible, and stupidly parallelable
@Jkauppa
@Jkauppa 11 ай бұрын
every bounce has the same uniform distribution of rays, always the same render for same world parameters
@Jkauppa
@Jkauppa 11 ай бұрын
implement translucent rays with the same uniform ray distribution system, in the object rays, not only the reflection rays
@Jkauppa
@Jkauppa 11 ай бұрын
just weight the common ray distribution with the surface properties, including reflection and translucent, dont try to change the distribution for every point bounce
@Jkauppa
@Jkauppa 11 ай бұрын
only use per surface pixel ray weight coefficients based on the surface normal for the triangle
@REktSigMa
@REktSigMa 11 ай бұрын
To come to think about this idea if you could like dedicate a server somehow to let friends join each other sorta like COD does then they could both design a map. cause it would be taking both PC to run the program anyways? Hmm.. IDK I'm just saying. LOL. If you make a billion off this idea I do take checks. LMAOO. JJ.. Great video btw.
@MACMAN2003
@MACMAN2003 11 ай бұрын
who needs lights when you have emissive materials
@bunpasi
@bunpasi 11 ай бұрын
Yeah. It's back 🌈.
@guilherme5094
@guilherme5094 11 ай бұрын
👍
@jonathanfranklin4448
@jonathanfranklin4448 11 ай бұрын
Is it possible who make a game where the player obj has the power of the game engine. Like a build a plain, place a player on that plain, and build a game in the game.... Basically like you're god...
@freakfreak786
@freakfreak786 9 ай бұрын
Not to sound rude... i love this video, actually the entire series. But whats up with your hair😂
@PKarthikeyaneeb
@PKarthikeyaneeb 11 ай бұрын
heyyyyyy!!!!!! Apple announced its new game porting toolkit!!! Please give us your thoughts on this as a game developer!! Please!!!!!!
@tabletopjam4894
@tabletopjam4894 11 ай бұрын
I thought this was a dead series
@coolpuppykid1455
@coolpuppykid1455 11 ай бұрын
I miss me
@JustSomeAussie1
@JustSomeAussie1 11 ай бұрын
Your hair looks like an explosion in a mattress factory
@ahmadshbat8363
@ahmadshbat8363 11 ай бұрын
wondering why your hair like this!!
@bigdaddy5303
@bigdaddy5303 11 ай бұрын
Brush your hair
FAST Random in 3 LINES OF CODE // Ray Tracing series
18:53
The Cherno
Рет қаралды 42 М.
Adding an Interactive 3D Camera System // Ray Tracing series
27:43
Conforto para a barriga de grávida 🤔💡
00:10
Polar em português
Рет қаралды 107 МЛН
Trágico final :(
01:00
Juan De Dios Pantoja
Рет қаралды 33 МЛН
Uma Ki Super Power To Dekho 😂
00:15
Uma Bai
Рет қаралды 60 МЛН
Performance Bottlenecks in My Game Engine
22:45
The Cherno
Рет қаралды 41 М.
Non Game Dev Is ALMOST a Game Dev
5:39
Green Light Dev
Рет қаралды 1,1 М.
BETTER Header Files and Preprocessor Debugging
24:26
The Cherno
Рет қаралды 66 М.
I made a better Ray-Tracing engine
17:38
NamePointer
Рет қаралды 242 М.
I made it FASTER // Code Review
38:46
The Cherno
Рет қаралды 514 М.
Harder Than It Seems? 5 Minute Timer in C++
20:10
The Cherno
Рет қаралды 66 М.
How Ray Tracing (Modern CGI) Works And How To Do It 600x Faster
32:06
Josh's Channel
Рет қаралды 555 М.
Rendering a Sphere Using Ray Tracing! // Ray Tracing Series
38:32
PATH TRACER made by 15-YEAR-OLD in C++ OpenGL! // Code Review
36:56