I never knew that good looking lighting could be so simple! Yeah, the lack of shadows is a problem, but it looks really cool!
@catapillie4 жыл бұрын
Oh my gosh I have been looking for this stuff! Man... You're like the Bob Ross of programming... soo calming :)
@NonTwinBrothers2 жыл бұрын
This series really is the most rewatchable
@monopoly21704 жыл бұрын
The Doom style 3d engine video is one I still go back to. It's fascinating!
@samb72914 жыл бұрын
Bisqwit, I have been watching your videos for a while now and I think you've perfected the format. Not that any of your old content was bad, but it was just harder to follow. Maybe I'm just better at c++ and I get more, but I feel like your videos now are so great and developed. Thank you SO much for providing educational content in the quarantine.
@thanatosor4 жыл бұрын
This guy coding the whole thing in C++ in a shorter time than me re-using Unity
@iphgfqweio4 жыл бұрын
ILLUMINATION CONFIRMED
@wphanoo4 жыл бұрын
* ILLUMINATI
@MisterHunterWolf4 жыл бұрын
@@wphanoo Do you hear that? Yep, thats the wind, blowing _right_ above your head. Right there, cant miss it.
@gallerdude20004 жыл бұрын
So glad you used the classic map 😊 I used it in my computer graphics class for a demo
@jamesbalajan38504 жыл бұрын
I'm really liking the slower style of your software rendering series. Gives you more time to absorb the code. Keep up making the great videos!
@TTPF_4 жыл бұрын
Üdvözletem! Wow, I was quite amazed, I restarted the video at least 3 times and said "NO WAY... I must have heard it wrong"! :D
@fubifwjdfubifwjd51674 жыл бұрын
ah, thanks for VHS-like code history navigation. Feels really pleasant to watch.
@frahohen2 жыл бұрын
I love the way you develop. I laughed so hard for joy at the rewind effect in the video in this funny code editor. The little details you put into your work are amazing like the mario walking in the top bar. ^^
@Crytoma4 жыл бұрын
God has uploaded a new C++20 video
@Einhamer4 жыл бұрын
I'm now a student of competitive programming and just learned about Geometry and convex hulls... Looking at all the knowledge I've learned, applied by someone else in a proffesional manner, really makes me wanna continue studying!!
@GregBakker4 жыл бұрын
Nice, thanks for pointing out the auto-to-avoid-conversions trick
@captainshitbrix72714 жыл бұрын
fantastic stuff. i really liked the way you described each part of the summation formula. seeing the lights spin around at the end and how quickly they overexposed the surfaces they were near made me think of how many types of more complicated renderers prevent that from happening by using a non-linear curve to calculate light intensity. since you mentioned using ~2 as an exponent is more realistic, maybe you could show off this light intensity thing as well
@slipcurve14104 жыл бұрын
some games implement exposure control, where overexposure is prevented by making rest of the scene darker (this is a bit how your eyes work: when you look at a fireplace at night, you can't see the forest behind it). this allows for greater range of brightness to be presented in the engine. you can also make the scene brighter if there are no bright spots, simulating what happens when you get used to the dark.
@Bisqwit4 жыл бұрын
I am actually planning to cover dynamic exposure in a future video. It is one of the things that I wrote a proof of concept implementation for already years ago.
@Loleexer4 жыл бұрын
You're an absolute wizard! I cannot wait to be able to write that stuff myself. I have no idea what is going on but I absolutely love it.
@HA7DN4 жыл бұрын
- started watching - "Üdvözletem!" - wait what?! - restart vid - "Üdvözletem!" - Ok, I must be very tired... Restart vid, turn on captions... - Greetings! [in Hungarian] I thought I was going crazy again for hearing Hungarian! I sometimes confuse English and Hungarian, but this was unexpected! Your pronunciation is too perfect! Also: I was thinking about lightning since my friend shown me his university project (some complicated raycaster) and talked half an hour about how he used all the illumination laws he thought I know (but actually never heard of before), so I really welcome this vid!
@Pyovali4 жыл бұрын
Hungarian isn't that hard to pronounce for Finns
@Bisqwit4 жыл бұрын
Not sure. We do share some of the same phonemes, especially with the vowels, but Hungarian also has several consonants that Finnish does not have, and it uses them almost as liberally as Polish does, in a stark contrast to Finnish.
@HA7DN4 жыл бұрын
@@Bisqwit Are you learning the language?
@daneru4 жыл бұрын
@@Bisqwit Is finnish strictly SVO? Because in Hungarian it is quite flexible and the sentence might have totally different meaning when using SOV instead of SVO. Like "Én szeretlek téged" where "én" means "I", "szeretlek" means "love" and "téged" means "you". So if you change the order of the words according to SOV: "Én téged szeretlek" it can mean "I only love you". It depends on the context of course.
@Bisqwit4 жыл бұрын
@It’s My Life, Finnish word order is flexible, but the first words have more emphasis. The exact same what you explained works in Finnish too. “(Minä) rakastan sinua” = “I love you”, ”sinua minä rakastan” = “It is _you_ whom I love”; “rakastan minä sinua" or “kyllä minä sinua rakastan” = ”I do love you (despite your doubts)”. Kyllä=yes. “Niin (paljon) minä sinua rakastan” = ”I love you so (that much)”. “Niin minä rakastan sinua” = ”I love you in that (specific) manner”. Niin=so. “Niin, minä rakastan sinua” = ”So, I love you”.
@nickst27974 жыл бұрын
When i see Bisqwit + tutorial its an instant like.
@pavelperina76294 жыл бұрын
Tip: Shading equations make sense, but .... after long years, someone realized that RGB 128,128,128 is much darker than 50% gray. So more correct approach is to get input color in fragment shader (or cpp code), do gamma correction, e.g vec3 matDiffCol = pow(u_color,vec3(2.2)); // color of object passed by uniform then perform all the shading and color mixing and as a last step do inverse gamma correction fragmentColor = vec4(pow(color, vec3(1.0/2.2)), 1.0); As a result scene has more natural contrast cause all the shadows appear brighter. Same applies to image filtering. Imagine having 50% black and white pixels as random noise and when image is blurred and downsized, average values will be close to 128. Which is much darker gray than what you see in original image viewed from distance.
@Bisqwit4 жыл бұрын
Gamma correction will be addressed in the next episode, don’t worry.
@aliteomandemir59724 жыл бұрын
The series I waited for years :)
@هيفالعريف4 жыл бұрын
I'm just in love with bisqwit voice 😍😍
@motbus34 жыл бұрын
nice video Bisqwit. i dont remember a video comparing raytracing and other techniques. i guess you mentioned in some episodes some of them but never a in depth. i think it would be interesting subject, at least to me. nice work again man! keep doing this awesome videos. ps. i prefer that you show the refactoring process. otherwise if im following the videos i usely tend to get lost if some thing get changed too drastically.
@mapelsiroup56044 жыл бұрын
long time no see, i was quite happy to see another one of your videos you always inspire me so much :)
@adagas-caouchristian78754 жыл бұрын
Excellent and very educational video as always!
@bojilster50904 жыл бұрын
You've been putting out some great content recently. Hoping to fully understand this one day.
@lajoskorona35014 жыл бұрын
"Üdvözletem"... I love you for that
@muckymcfly4 жыл бұрын
thats really pretty, looking forward to the next video.
@CFM74 жыл бұрын
love the Axelay music
@silatjitsu79554 жыл бұрын
Terveisiä Unkarilta :) I like your videos! You are a true master of C++👍
@Bisqwit4 жыл бұрын
"Terveisiä Unkarilta" ≃ “Üdvözlet Magyarorszől” or something :-) It’s not the correct translation. In any case thanks for the comment :)
@1Bagoly14 жыл бұрын
Wow that üdvözletem surprised me wtf
@petroczizoltan65244 жыл бұрын
Me too :D great pronunciation!
@Bisqwit4 жыл бұрын
You can thank @Adolf1Extra for that :P
4 жыл бұрын
Haha, me too, "wtf, wrong video I clicked?" ;-P
@kevinlackokl4 жыл бұрын
Yeah lol I immediately scrolled down to the comment section too looking for this comment :D
@RegiJatekokMagazin4 жыл бұрын
:)
@re47274 жыл бұрын
Did you just say "üdvözletem?" Üdv barátom :D
@mikethered1234 жыл бұрын
Looks like the ending of System Shock 2. Amazing.
@sirpizza20444 жыл бұрын
Bisquit your a G👌
@jdolandev4 жыл бұрын
bless you and your work
@mikkoadato67984 жыл бұрын
is there any chance that you'll make a tutorial about sockets + lockstep simulation? how it is applied on RTS games
@Bisqwit4 жыл бұрын
What is lockstep simulation? I don’t think I have heard about that.
@mikkoadato67984 жыл бұрын
@@Bisqwit like the ones presented here: www.gafferongames.com/post/deterministic_lockstep/ www.gamasutra.com/blogs/DanielCollier/20151124/251987/Minimizing_the_Pain_of_Lockstep_Multiplayer.php
@SakuraJamm4 жыл бұрын
I am too new for this, Currently learning lua... this is making me crazy !!!
@sneakyfatcat4 жыл бұрын
Great video. Thank you!
@NonTwinBrothers4 жыл бұрын
Took me a while to realize -2 being a realistic exponent at the end was just the inverse square law, haha
@SimGunther4 жыл бұрын
Last time I was this early, you were writing _that_ terminal
@mohammedjawahri57264 жыл бұрын
I'm really loving this series and I think your decision to include the process of refactoring is amazing (it teaches a lot about how refactoring works and how to get better at it) very amateur question so excuse my ignorance haha, I was wondering what is the real point of a lambda function in a language like c++? is it purely syntactical sugar ? It's obvious how lambdas are good in functional languages and when the need arises for passing functions around but say at line139 at 4:55, why would it be better to wrap the code that gives you the point in a lambda function inside your current scope ? as opposed to the traditional way of simply wrapping that logic in a helper function and saying GetPoint() ? do lambdas really make things more readable ?
@Bisqwit4 жыл бұрын
There are a few things that would be much much more verbose to do with lambdas, such as closures (referring to or copying variables from the surrounding context) but the primary advantage of lambdas is that it allows keeping the code very close to its context, instead of shotgunning everything everywhere. Regular functions cannot be declared inside functions, so if you need to pass e.g. a comparator to another function, you have to place it far away from where it is actually used, even if it is used just once. One of principles of maintainable code is that you should not have things that are needed and things that need them far away from each others.
@lucabrito61554 жыл бұрын
I'm a beginner and didn't understand anything from this video. But that's pretty impressive and interesting stuff, tough.
@HuyQuangBui4 жыл бұрын
Nice Uralic greetings, Bisqwit.
@miroaja19514 жыл бұрын
nyt on kyllä niin suomalainen aksentti että huhhu
@xx_easyhdlpmcawpgod_xx72964 жыл бұрын
Nice Video!!!
@seawolf46064 жыл бұрын
Joel, do you think you'll ever try to get into VR development? The idea of rendering a nice cottage with a stream in a wooded forest with tall grass sound so nice
@balkid22014 жыл бұрын
5:04 what are this zero's and one's numbers? the ones in the unsigned vector string?
@Bisqwit4 жыл бұрын
It is an array of thirty-six integers in range 0-1. For each of 6 polygons that are the edges of a cuboid, I calculate two vectors: “right” and “down”. Each of these two (times six) vectors has three fields: X, Y, Z, and these fields have either value 0 or 1. So, 6×2×3 = 36 one-bit integers. For instance, for the first polygon, down = (1,0,0) and right = (0,0,1). I dislike long lists of number data when screen space is premium, so I packed them like this.
@balkid22014 жыл бұрын
@@Bisqwit תודה רבה לך!
@Botondar4 жыл бұрын
Woah, that hungarian welcome really freaked me out.
@Player-ub9tg4 жыл бұрын
Thanks man.... I hope, one day I will have same skills as you have :)
A beautiful video with a good explanation. How big is the binary when compiled at this stage and what are the minimum specs required during operation? Will you ever do a video on emulator resolution filters/upscalers?
@Bisqwit4 жыл бұрын
The program showcased in the end of this episode is 43392 bytes on my system (dynamic linking executable). It requires a video output device such as a graphics card, and a CPU and some memory. The compilation with full optimizations takes 3½ seconds on my system with max 440 MB RAM used. Scaling filters is not particularly a topic that has been on table. You are the first person to even talk about it.
@crooked81684 жыл бұрын
This guy is a genius !
@AgingAeroplanes4 жыл бұрын
Honestly the way the light shines thru surfaces like that looks a lot like subsurface scattering. Maybe a SSS hack when combined with the shadow system?
@DBGabriele4 жыл бұрын
Cool Stuff. For the next, episode will you implement shadow maps? (or the volumetric shadow?)
@nikhilgautam28574 жыл бұрын
which keyboard bisqwit use ??
@christianromero68154 жыл бұрын
Bisqwit my brother is a programmer and I asked him if it was possible to program at that speed. He told me that he was not sure but that he believed that your video was accelerated. However the top bar shows the time ... Are you really capable of crafting all that code and using all those quick commands with that speed? Your videos are great.
@Bisqwit4 жыл бұрын
Check the previous video, the refactoring one, where I discuss this.
@dookieduuk96864 жыл бұрын
Is there any way to contact you? We have project to finish, we are trying to refresh emulator for Ultimate Mortal Kombat 3 Arcade
@iani_20204 жыл бұрын
I have a feeling that your next tutorials will be about ray-tracing and global illumination.
@Bleenderhead4 жыл бұрын
Do the lighting shift around when the move off screen, since the positions of the interpolated vertices are based on clipping by the frustum?
@Bisqwit4 жыл бұрын
I don’t quite understand what you are asking about. The clipping is done on a _copy_ of the vertex data. It does not affect the world geometry in any manner.
@HadryanSalles4 жыл бұрын
I'm very intrigued to see what you gonna do to solve the shadowing problem in the next episode... maybe shadow mapping?
@SuperNolane4 жыл бұрын
How many light sources can be rendered using this technique. Dozens, hundred, thousands? I'm interested because I recently saw a game using so many light sources that I coudn't even count. Knowing something about computer graphics I still don't know how they did it.
@Bisqwit4 жыл бұрын
It’s only limited by your CPU power and executable file size.
@Spongyarob4 жыл бұрын
And now we can see from the comments how many hungarian subscribers you have :) Üdv!
@alfiewhitson77264 жыл бұрын
how could you modify this so as to take a webcam feed, find certain colour values of the image being received from the camera feed and then distort the shape of stuff based on the position and colour of pixels being received from a webcam in realtime. just curious
@Bisqwit4 жыл бұрын
I don’t think what you described counts so much as “modify this” as “create a totally different thing anew”.
@beastworm4 жыл бұрын
5:43 was that a Chubbyemu reference?? or just coincidence?
@venus007e62 жыл бұрын
what compiler so you use for c++?
@Bisqwit2 жыл бұрын
GCC, sometimes Clang.
@frognik794 жыл бұрын
But can it display Crysis maps?
@Bisqwit4 жыл бұрын
If you can load the mesh and the textures, sure.
@BadComoc4 жыл бұрын
what do all the symbols in the map array mean?
@Bisqwit4 жыл бұрын
As explained by the comment _literally on the line above said map,_ each symbol is an index to columns[].
@tobeypeters4 жыл бұрын
Wow ... This engine is looking amazing. Anyhow, an off topic request / wish. I'd give anything to get a Linux terminal from you ... Which has the ability to display title bar with the system theme or really the color gradient scheme you use in your code displayer. Also, needs the cool text increase / decrease effect you use. & The rapid cursor blinking.
@Bisqwit4 жыл бұрын
The terminal I made was livestreamed over KZbin. kzbin.info/aero/PLzLzYGEbdY5nKCfUgfk8tCO9veao_P1fV I also published its source code on GitHub. However, as you probably realize, terminal ≠ text editor. Terminal is just a channel through which you can run any number of different terminal-based programs, such as a text editor.
@domjanabi60064 жыл бұрын
i hope to be this good some day
@Veso2664 жыл бұрын
why do u use ... in c++ functions? (example usage: 11:23 line 208)
@Bisqwit4 жыл бұрын
The ellipsis is used to indicate a pack of zero or more things. For more information: en.cppreference.com/w/cpp/language/parameter_pack
@mebefog4 жыл бұрын
Üdvözletem :)
@velocityra4 жыл бұрын
Awesome vid as always! I'm Greek, here's the pronunciation corrections you asked for at 5:45 ;D 'γωνία': it's pronounced with intonation on the 'i' and with a lighter 'g' sound (like 'w' in 'wash') 'πολύς': your pronunciation threw me off at first, but then I realized that you pronounced it as you would in ancient Greece In modern Greek it would be pronounced like "polis" instead of "polus" (the greek letter ypsilon/'υ' is pronounced as "ea" in eat. "ου" however, would be as you pronounced it)
@Bisqwit4 жыл бұрын
Thank you! Actually my pronunciation for πολύς was off even for ancient Greek. It would have used /y/, which I do know how to pronounce. I just didn’t bother checking the relevant articles this time. What does “with intonation on the 'i'” mean?
@velocityra4 жыл бұрын
@@Bisqwit Intonation is variation in pitch. I suppose 'tone' would be the more appropriate linguistics term (in Greek it's "τόνος" too, which I originally thought was "intonation" in English). Anyway, regarding Greek tone, vowels with the ' mark on them like ί or ό as opposed to ι and ο are pronounced with higher pitch. From your video I noticed your intonation for 'γωνία' is higher on the 'α' at the end rather than only at the 'ί'. Sidenote regarding intonation: The above regarding ' -> high intonation (and the rest low), is the case with _modern_ Greek. _Ancient_ Greek had many types of intonation (3 iirc), and the rules were more complicated, both to write and speak.
@daneru4 жыл бұрын
Üdvözletem! :D
@lion1234 жыл бұрын
Didn't know G-Man did coding tutorials back in 2020...
@brendonanderson86734 жыл бұрын
Man you can break any coding interview
@Gildofaal4 жыл бұрын
When Bisqwit applies for a job, he interviews the company to see if they are worthy.
@Bisqwit4 жыл бұрын
_All_ interviews are two-way. You are interviewing the company as much as they are interviewing you. That’s why you should always come prepared with questions. Questions such as, what kind of challenges will you be facing, why did the last guy leave, which tools will you be using, what are the benefits, and so on.
@konstantinseurer26534 жыл бұрын
You should implement lambert shading (N • L)
@Bisqwit4 жыл бұрын
It is addressed in the next episode. It was not doable here because the lighting is too coarse (vertex, not pixel).
@draconic_slayer4 жыл бұрын
Bisqwit, please explore Rust! It’s thread safe, memory safe, fast, reliable, efficient, and correct. You will love the transition from C and C++ because it’s beautiful, expressive, and let’s the compiler worry about memory ownership for you! I would love to hear your thoughts
@jsd644 жыл бұрын
This is hardcore as fuck. Don't think I've ever seen another YTer write a renderer in C and without an IDE lmao. The only thing he used from the standard library was vector
@xavier94804 жыл бұрын
one day i wanna be good enough to write without using vs auto complete
@SomeRandomPiggo4 жыл бұрын
I'm still not sure if i want to use C++ or C lol, there seems to be much more support on the C++ side, but I don't like object oriented programming.
@Zackx087 Жыл бұрын
did you make like minecraft this vid?
@Bisqwit Жыл бұрын
I didn’t make minecraft
@kaleshchauhan34944 жыл бұрын
Wow
@pimpao9663 жыл бұрын
So you're a source engine lover too!
@mr.t98164 жыл бұрын
"Egg slicer!" What happened to the knives?
@Bisqwit4 жыл бұрын
Easier to visualize, that’s all.
@AlwaysTeachingable4 жыл бұрын
5:05 is that a C++20 concepts joke in the subtitles? xD
@Bisqwit4 жыл бұрын
I have no recollection of making that joke intentionally, so it must have been muscle memory at work while I was shortening the line for reading. I will leave it as is!
@ricardoalcantara58464 жыл бұрын
Wizard!
@DustMan8vD4 жыл бұрын
Every time I watch one of your videos I feel ashamed to call myself a programmer
@UncleJacki4 жыл бұрын
how can you type symbols that fast :/
@andtpfack82434 жыл бұрын
0:04 what did you just call me ?
@MashiroAlexis4 жыл бұрын
i just watch this video when i want to sleep XD
@polgar_tamas2 жыл бұрын
Üdvözletem!
@deniamnet22 жыл бұрын
Is there a source code?
@Bisqwit2 жыл бұрын
Yes, the link is in the video description.
@GiulioTopLad4 жыл бұрын
i'm dead after this video XD
@maciej123456783 жыл бұрын
why is this so slow rendering ? and block procesor to 100%?
@Bisqwit3 жыл бұрын
Because it does plenty of calculation and it does it on the CPU.
@maciej123456783 жыл бұрын
@@Bisqwit but on your video is fast i have i7 how to speed it up on grafics card ? Is No optimize or i compiled it wrong.
@tejonBiker4 жыл бұрын
Hey bisqwit give me a break :( just kidding, I am trying to finish the other videos of rasterization but with my own implementation on microcontrollers and suddenly this appears, continue with the good job, I will focus on this video when I finish the basic stuff on my implementation
@doug90004 жыл бұрын
i wish we had the control we have with cpus in the gpu too, software renderers are fun to program but is aways too slow and chip melting for modern standards. :(
@SomeRandomPiggo4 жыл бұрын
Here I'am at 3 comments. I recently moved to C++ from C# and came back here! Hi i guess!