I have actually missed this more technical content a bit. Concise yet excellent explanation!
@pivotal-ai2 жыл бұрын
Yes these are wonderful and I learn so much. They're the most inspiring for me to work on games of my own. Since it feels much more tangible. Love to see more!
@landru272 жыл бұрын
I, for one, feel that this video was much more than just "a little bit interesting"! I gain a lot from you diving in on the technical details. It's particularly interesting when you cover how your approach to a certain graphical problem has become more sophisticated over the course of time and your projects. ... Don't get me wrong, though : it's also always great to see the dishes you cook, your balcony garden, and the landscape around where you live, like in a regular dev log! 🙂
@mr.norris38402 жыл бұрын
I agree
@UserUser-sh6wi2 жыл бұрын
Agree on the first half, but must disagree on the second. I find devlogs to be much more enjoyable when the irrelevant parts are cut out and all the focus is on the project.
@ceyhunuysal95092 жыл бұрын
Im literally watching for the cooking!
@Danuxsy2 жыл бұрын
With path tracing you don't have to deal with trying to fake all of this, it just works.
@mr.norris38402 жыл бұрын
@@Danuxsy But it still isn’t 100% accurate, and a lot of restricting assumptions have to be made
@cineblazer2 жыл бұрын
I really really love technical content like this. Maybe it's not the most popular amongst other subscribers but I'll always watch it! Super fascinating to someone like me who doesn't have any graphics programming experience but wants to learn.
@Krahfty2 жыл бұрын
From my experience, a lot of this kind of stuff is just the trial and error from normal development, get your hands on an engine and just start making something, you'll soon encounter these kinds of problems and you'll learn directly from trying to fix those types of problems 1st hand
@AjAce192 жыл бұрын
I really enjoy this kind of video! I know you can't always do technical stuff but its really interesting and cool to see stuff more in depth!
@MattieBW2 жыл бұрын
"technical and boring" sounds good to me :)
@jdh2 жыл бұрын
Another fix you could try for the shadow shimmering on movement is to add a small offset to the projection matrix for the shadow map that ensures that all world coordinates will always “snap” to the same shadow map texels, IIRC done by taking a fixed world space point (the origin) and transforming it into shadow space and then finding its offset from the center of a texel in shadow map space (where the texture sample round to) and using that, transformed back into shadow projection from shadow texture space, to offset the projection matrix. maybe a little complicated though when you already have a good enough solution :) the graphics are looking great!
@Assassin_Droid2 жыл бұрын
Helo there
@ThinMatrix2 жыл бұрын
Thanks for the idea, that makes a lot of sense! I'll have to give that a go next time when I work on the shadows :)
@Dannnneh2 жыл бұрын
Always nice to see your insightful comments.
@mrdiabeatis99434 ай бұрын
didn't see you there vro...
@massimogalliano83372 жыл бұрын
Seeing your project and this game take shape is heart-whelming!
@oamioxmocliox80822 жыл бұрын
;)
@davidberry82752 жыл бұрын
thanks very much for taking the time to do this. Love the insight of 3D graphics. While I'm a decent programmer this is outside my normal area of business applications. Its amazing how much processing can take place in every frame using GPU, while our business app processing seem very slow in comparison.
@SpikeStudio2 жыл бұрын
The solutions you come up with are always incredible
@recyclebinladen59032 жыл бұрын
Lol what? What do you think AAA games are made of then, and since decades?
@garole4 ай бұрын
Thanks for the helpful video! I was experiencing similar shadow issues in my project, and this really cleared things up,
@Seff22 жыл бұрын
Wow I never have seen such a high level explanation on how shadows work in 3d games. Thanks for this vid!
@MrA60602 жыл бұрын
it was looking great with the last graphics but now? holy smokey this is amazing. keep it up
@Mystixor2 жыл бұрын
Been using the basics of your old Shadow mapping tutorial in my own engine ever since. Some of these ideas you shared today are definitely worth looking into!
@ryanwood92882 жыл бұрын
Dude thank you for everything. Seeing your videos pop on to my timeline really brightens my day.
@erikbrendel32172 жыл бұрын
Have you heard of "Variance Shadow Mapping"? This is a simple mathematical way of achieving very smooth shadows without the need of introducing many samples, and it also solves the shadow-acne problem. Maybe this would be worth exploring for the game... :)
@MrAchterbahnfahrer2 жыл бұрын
Just an additional note to anyone reading the comment above: If you're considering variance shadow mapping, you should also take a look at moment shadow mapping. While variance shadow mapping only takes the first two moments of the distribution of depth values (i.e. their mean and variance) into consideration when calculating the shadow density, moment shadow mapping uses the first four moments, thus reducing the issues of light leaking caused by variance shadow mapping.
@Grimille2 жыл бұрын
One thing that was noticable in Equilinox and is curently noticable in Homegrown is the shadow movement not going along with the windy shader. Good video, I prefer by far when there is also technical involved in the video ! 😊
@ThinMatrix2 жыл бұрын
I've updated the Homegrown shadows so that they now sway in the wind too :)
@Grimille2 жыл бұрын
@@ThinMatrix great work ! 👊🏻
@elingranath2 жыл бұрын
As someone working on my own engine, videos like these are super interesting and I even prefer them a lot over the regular game dev videos since I already have a lot of experience with game programming. I'm just about to get started with shadows myself so this was a nice surprise to see in my recommendations!
@SomeNussi2 жыл бұрын
Here's what i can recommend for moving/resizing the shadowmap: keep it a bit bigger than the view area AND re-calculate it every frame (if the camera didnt move, you keep the current "target") instead of fully applying the "new" dimensions immediately, interpolate between the old and the new one in a ratio of about 85 to 15 with the new one being 85% responsible for the new image. This way you're getting rid of the sudden shifting and you're able to keep the shadow maps size much smaller than previously, improving the shadows quality
@ThinMatrix2 жыл бұрын
Thanks for the idea, I'll give that a try!
@cribalik2 жыл бұрын
I recommend 'jdh's answer instead, it's the fastest and arguably simpler than any other method. The idea is: only move the shadowmap in increments of its pixel size (in world space) docs.microsoft.com/en-us/windows/win32/dxtecharts/common-techniques-to-improve-shadow-depth-maps?redirectedfrom=MSDN Something like: bounds = CalcShadowMapBox(); // in worldspace float texel_size_in_world_space = bounds.width / shadowmap_resolution; // assuming shadowmap is square // snap to grid bounds.x0 = floor(bounds.x0 / texel_size_in_world_space) * texel_size_in_world_space; bounds.y0 = floor(bounds.y0 / texel_size_in_world_space) * texel_size_in_world_space; bounds.x1 = bounds.x0 + texel_size_in_world_space * shadowmap_resolution; bounds.y1 = bounds.y0 + texel_size_in_world_space * shadowmap_resolution; projection = ortho(bounds.x0, bounds.x1, bounds.y1, bounds.y0, bounds.z0, bounds.z1);
@AxisCoords2 жыл бұрын
Love your devlogs so much
@GingerBeker2 жыл бұрын
Amazing. Really few people can really know how difficult this stuff are. You rock!
@_miyu2 жыл бұрын
I really like your work on the shadows, especially reducing the calculations with an over sized box. I have a suggestion about how watering the crops gets rendered. Instead of the full square turning dark immediately, think of how rain, or the watering can would drop random droplets until it all gets filled in. It could be a quick animation that just darkens randomly sized circles until its all watered. Hope that helps, thanks for the great dev videos.
@ThinMatrix2 жыл бұрын
Thanks for the suggestion, that does sound nice!
@kiki-drawer26692 жыл бұрын
I don't code or create games at all but the way you talk about your work and explain simply means your videos are never boring no matter what element you focus on! I enjoyed this video just as much as all your others! Ty for working so hard!
@GamesBySaul2 жыл бұрын
This was super interesting honestly! Seeing how you go about tackling issues, to me is very cool, it's nice to see your train of thought with it all!
@bertrodgers24202 жыл бұрын
really enjoy the more technical videos as well as your normal ones. Would love to see more about what frameworks/libs you've used too
@zeztro2 жыл бұрын
I really enjoy these little updates. The content is laid back and I always look forward to seeing how the game is coming on.
@enotirab2 жыл бұрын
Loving the series. For what it is worth some of us love "technical and boring."
@kylemason012 жыл бұрын
Each step you make, the game just gets better and better. Keep it up!
@DarkFazy Жыл бұрын
This video was great, thanks so much. Both relaxing and also explained some ideas behind implementing shadows quite well.
@asherhaun2 жыл бұрын
This is the kind of devlog I subscribed for in the past. :D
@StephenLebed2 жыл бұрын
This was a really great video. I always enjoy your vids and would like to see more technical discussions as you go forward.
@sydryan95892 жыл бұрын
This is so fascinating, love your videos my man.
@KamranWali2 жыл бұрын
Awesome video! The shadow rendering already looks awesome. Really like how you go in detail to explain how each of the problem was tackled. Learnt something new today :) Looking forward to your next devlog. Keep it up! :)
@ThinMatrix2 жыл бұрын
Thanks, glad you liked it :)
@bejoscha2 жыл бұрын
Always interesting to see the technical details. Thanks.
@MichiGombocz2 жыл бұрын
This might be the best video by far done by yourself. Thank you for all the effort you put it every time, it pays off for the viewer and hopefully yourself as well!
@George-si6iv2 жыл бұрын
So happy that you are doing consistent uploads now! Been watching since you were developing Equilinox and watching your dev logs has never gotten boring!
@zachj11962 жыл бұрын
The shadows look so good! Even if it was a more technical devlog I love to see the progress on the game!
@falcowinkler24292 жыл бұрын
super interesting video. I love the deep dives into technical topics. so informative and very well explained!
@martinx90272 жыл бұрын
YEAH! Love this kind of insights of more technical stuff of the game, looking really good so far, Keep it up!!
@mischa78232 жыл бұрын
I do like the devlogs that go into technical detail a lot more.
@bigmistqke2 жыл бұрын
Waw the steps u made in the last videos really added a lot of life to the scene!
@NeilRoy2 жыл бұрын
Fascinating insights on how to do shadows. This was a good, general description of the problem, I like it.
@felixstrau78802 жыл бұрын
As a hobby game dev, I really enjoy this type of content. You don't have to go more into detail. But the overview of your thought process when implementing this features is really helpful.
@DEPHi32 жыл бұрын
I really like this kind of more technical videos. Good work.
@otoS972 жыл бұрын
Game looks amazing, I'm so happy after the graphical upgrade
@hernestpoissin69642 жыл бұрын
Hello ThinMatrix, I have started game dev with your OpenGL series and have learned a lot with you. Thank you! You do great work. For your shadow shimmering, what you need to do is to move the shadow camera by fixed increments, which correspond to the projection of the shadow texels on a horizontal plane. This completely removes the issue. Don't hesitate if I can help you back.
@_v532 жыл бұрын
Shadowing is so tricky but so satisfying. It was arround here I reached the end of my efforts to develop my own engine (i'll return to it - when time permits!). You've got a great workable solution here.
@simon-wt2 жыл бұрын
I haven't commented yet but this time I really want to just show you my gratitude for your work. This video is actually one of the most interesting videos I have seen yet! In graduate school I studied a lot of computer graphics theory and I really appreciate watching you implement these techniques and algorithms into your game. I Especially love the commentary you give and it's really nice to have the direct feedback on the game. Thank you Karl for taking us with you on this journey ❤ PS: I only watch around 2-5 videos a month but I won't ever miss on watching any of yours!
@Skeffles2 жыл бұрын
Fascinating to see how you approach shadows!
@eboatwright_2 жыл бұрын
Very interesting! Never even tried to write my own 3d renderer, kudos to you for adding this!
@JackTraynor142 жыл бұрын
Great video. I hope you can do more technical devlogs like this in the future.
@CodeParticles2 жыл бұрын
I remember getting into shadow mapping, and then later omnidirectional shadow mapping! I've been avoiding those concepts lately but it's only a matter of time before it's needed again, thank you for reminding me!! 👍👍
@henryford84332 жыл бұрын
Ok, I am a botanist, a retired plant population biologist, and I and a botanical artist wondered why people are plant blind, and discussed the potentiality of games based on plants, and Albert Durer’s turf, and the immersive Van Gogh exhibition in Bristol. Your ideas are interesting and I might come back for a chat some time. Henry F
@dekira35456 ай бұрын
can i know how the game project is going?
@Arkogelul2 жыл бұрын
Even if this one not the regular format, I really enjoyed that video. Thanks!!
@FloWritesCode2 жыл бұрын
Great video! Shaders in general have always been my weakness, so this was very interesting to watch :)
@0.lennart2 жыл бұрын
I always enjoyed watching your tutorial videos a few years ago. It's impressive how you improved. I would love to see a few new tutorials when you have some time. Keep up the great work :)
@williamist2 жыл бұрын
love the technical videos :D
@Xbookdetemprano2 жыл бұрын
Seeeee, me encantó! Sos un genio. amo aunque sea estos videos cortitos que son muy interesantes para aprender y motivarse! Muchísimas Gracias por el esfuerzo y la buena onda!
@blubloos2 жыл бұрын
Amazing dev log as always
@marcelbricman2 жыл бұрын
i love this technical material! even though i have an engine to do shadows for me, it it lovely to see these nice tricks ❤
@LifeOfMohammed2 жыл бұрын
Awesome work! Love the shadows!
@Sopiro2 жыл бұрын
This video makes me nostalgic when I was watching the opengl tutorial series you made! Awesome devlog :)
@Joern2902 жыл бұрын
Great video! Love the art style and the shadows! 😊
@kamathon2 жыл бұрын
This was super interesting, thank you. Please do more of these technical in-depth videos in the future! 😊
@Zyhorn2 жыл бұрын
Very fun and interesting. I love the technical explanation and wouldnt mind ever more 😀 thank you
@thehambone14542 жыл бұрын
Great video, glad you made one on this topic, I am going to to do some similar techniques for shadows after watching this! I like the art style a lot btw!
@Dannnneh2 жыл бұрын
I very much appreciate the technical insight.
@lucidmoses2 жыл бұрын
Now that you've done that, shadows from clouds should be pretty easy to add. Not sure it would be all that useful if it's not tied to groth or something but may make it look a bit more realistic (If that's what your after).
@AntonioNoack2 жыл бұрын
They add a new issue: clouds are typically transparent/translucent, so he best should do them in a separate pass, and then blend them with the normal shadows. Given that clouds may be procedural, and you probably can't see the sky anyway, you could completely do them in a shader function, and save the cloud shadow map.
@dennismakesgames2 жыл бұрын
Lovely, I do feel like shadows that are softer would really fit the art style, like Tunic, and the clouds that casts shadows would also be lovely :) Great work as always.
@MrOmega-cz9yo2 жыл бұрын
As others have mentioned, I too like these types of videos! Thanks!
@VetorDigital2 жыл бұрын
This is beginning to look nice, you are on the right track.
@georgeaggelopoulos77912 жыл бұрын
Excellent work as always. Thanks.
@igz2 жыл бұрын
Fascinating, and the game is looking great!
@nhuvunguyen45252 жыл бұрын
The only bad thing about watching your dev logs is that they inspire me to drop everything and make my own game engine
@leoingson2 жыл бұрын
One of your best videos of late! Tech content rules :)
@Simon-ik1kb2 жыл бұрын
loved this one. Really like those a little more technical videos. I understand basically... nothing. But still very interesting.
@ludi_642 жыл бұрын
Great video! really well explained in an interesting way. I feel like I learnt a lot about how shadows work in video games
@madao78652 жыл бұрын
Looking good. Also, the technical side is quite interesting.
@code-samu2 жыл бұрын
Hello. First of all, you are making your video in a great and instructive way, I wish you success in your new game (I wish I could solve the logic) :)
@hopperpl2 жыл бұрын
We use an additional approach with 2 shadow maps... the first is the wider scene which creates the pixely shadow map (the one you use), and a second is a narrower map which only contains a small part of the scene using a distance field around the camera (not the light source). Both maps are generated during the same rendering pass, the shaders just use 2 rendering targets. The 2nd map has a much higher resolution, you can think of it like a 2nd zoomed shadow map. During the final render, the shadow is then, based on distance again, sampled from the narrower or the wider map. This generates nice sharp shadows around the "camera" while having only blurry shadows far away, which you wont notice in the distance anyway. As a disclaimer, this will only work with 3rd person or 1st person rendering. For this game with a wide/far camera, the distance value for the narrow shadow map will be too large and the difference in shadow map resolution too small.
@realdlps2 жыл бұрын
I'm a game developer myself, not as good as you but I still enjoy making games and releasing them. In my opinion the more technical videos are interesting and I will watch the video asap
@weinsim38562 жыл бұрын
Wow, the graphics are starting to look really good
@dzima-create2 жыл бұрын
Karl this video was SUPER interesting! Very nice! The game now looks much better. As I heard some time in the past "Lighting is the sound of graphics". And indeed shadows add so much natural feel to the scene!! Actually I also have a video on my channel about shadow programming, but never mind! Good job!
@ThinMatrix2 жыл бұрын
Glad you liked it!
@gnramires2 жыл бұрын
Here's an idea: sample (say 7 or 9) lightmaps with a slight angle offset. The sun rays are approximately parallel at Earth, but the Sun does have a small apparent diameter, of approximately 1/2 degree (10 milliradians). By sampling the shadowmap in a "hexagon" of radius 1/4 degree (you can exaggerate this effect a few times for dramatic effect), plus maybe a point in the center, you get very nice soft shadows that also have a distance effect (they're softer when far from blocking objects). You can also achieve this by computing one shadow at a time (for a total of 7) like you're doing but averaging out the 7 results. Very interesting video, thanks :)
@dr33n2 жыл бұрын
It looks freaking amazing!
@alexgravenor2 жыл бұрын
One thing! Because it's outside, you actually might want less soft shadows (the sun is so bright and parallel, it's shadows are typically quite sharp). You may be able to do that with a cutoff on your sampling
@Phvli2 жыл бұрын
Good, concise explanations for the basic concepts! You'll probably want to look into Cascaded Shadow Mapping if your single map resolution is not enough.
@ownhaus2 жыл бұрын
Very interesting. I loved your tutorials and wish you had time to continue them.
@Achelon2 жыл бұрын
This is extremely interesting man!
@chadzulu43282 жыл бұрын
This was very interesting and educational too! Thanks
@pedro_mg2 жыл бұрын
very interesting, I enjoy these more technical ones a lot
@Draconicrose2 жыл бұрын
They look pretty good and I learned something more about development from this video.
@peterhickman3862 жыл бұрын
Along with the graphical upgrade it is looking much better now. Also nice technical content even if it is on a small detail
@guillaumequittet94182 жыл бұрын
Awesome job as usual! 💪 And crystal clear explanations 👌
@VegetableJuiceFTW2 жыл бұрын
I have always wondered how shadows are done. Neat!
@Botondar2 жыл бұрын
For PCF filtering: It looks like you're strictly checking whether each sample passes the shadow test or not, which means that A) you can only ever get a handful discrete values which depends on the number of samples you take and B) all the world-space fragments that land on the same texel in the shadow map will have a uniform shadow value which results in the blockiness. What you really want is to also weight the contribution of each shadow sample by how far it is from the actual location you're shading. In the case of 2x2 PCF filter for example where you have: |a, b| |c, d| you want to compute the shadowing factor with a proper bilinear filter, i.e. mix(mix(a, b, u), mix(c, d, u), v) where u and v are the bilinear weights from the bottom-left texel center, and a, b, c, d are 0.0 or 1.0 depending on whether that particular texel passes the shadow test or not. If - as you mentioned - you decide to use the built-in shadow texture functions in OpenGL then this is how it will actually compute the shadow weight, which should automatically give you nicer looking shadows. You might not even need to jitter the samples.
@AntonioNoack2 жыл бұрын
@6:48 this can be fixed, if you just add the bottom of the tree stump to your mesh Thinking about it: you even can move the tree a little down (or extend its roots), and it will be fixed; assuming you render the ground to the depth texture, which isn't necessary unless it has bumps steeper than the angle of the sun.
@GeryTeague2 жыл бұрын
Love your videos man!
@OriginalJetForMe2 жыл бұрын
I love the technical content!
@VictorGordan2 жыл бұрын
Great idea with the bigger area of the shadow map! Also, didn't know about the only rendering back faces trick, always just used an offset :)