- 282
- 96 388 511
Sebastian Lague
Denmark
Registrace 1. 10. 2011
Hello, on this channel I explore how to create stuff out of code. I hope you find some of it interesting!
Coding Adventure: Rendering Text
This... is text! Let's figure out how to draw it.
Starring: Bézier curves and (so many) floating point problems.
Source code: github.com/SebLague/Text-Rendering
If you'd like to support my work (and get early access to new projects) you can do so here:
www.patreon.com/SebastianLague
ko-fi.com/sebastianlague
Resources:
developer.apple.com/fonts/TrueType-Reference-Manual/
www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf
wdobbie.com/post/gpu-text-rendering-with-vector-textures/
Font and Music Credits:
github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/TextRendering
Chapters
0:00:00 Intro
0:01:58 The Font Directory
0:04:27 Loading Simple Glyphs
0:10:42 Bézier Basics
0:13:42 The Character Map
0:15:47 Implied Points
0:18:11 Compound Glyphs
0:20:25 Size and Spacing
0:21:27 Rendering Glyphs with Lots of Triangles
0:22:17 Optimized Curve Rendering (Loop-Blinn)
0:28:20 A Brief Look at SDF Rendering
0:30:33 The Counting Method
0:31:48 Ray-Bézier Intersections
0:34:09 Point in Glyph Test
0:36:35 Shader Time
0:38:37 Floating Point Problems
0:41:22 The Evil Artifact Detector
0:45:36 The Closest Curve Method
0:50:48 Curve Splitting
0:54:31 Defeating the Evil Artifacts
0:58:58 Anti-Aliasing
1:02:47 Performance and Legibility
1:05:11 The Counting Method Returns
1:09:45 Outro
Starring: Bézier curves and (so many) floating point problems.
Source code: github.com/SebLague/Text-Rendering
If you'd like to support my work (and get early access to new projects) you can do so here:
www.patreon.com/SebastianLague
ko-fi.com/sebastianlague
Resources:
developer.apple.com/fonts/TrueType-Reference-Manual/
www.microsoft.com/en-us/research/wp-content/uploads/2005/01/p1000-loop.pdf
wdobbie.com/post/gpu-text-rendering-with-vector-textures/
Font and Music Credits:
github.com/SebLague/Misc-Project-Info/blob/main/Coding-Adventures/TextRendering
Chapters
0:00:00 Intro
0:01:58 The Font Directory
0:04:27 Loading Simple Glyphs
0:10:42 Bézier Basics
0:13:42 The Character Map
0:15:47 Implied Points
0:18:11 Compound Glyphs
0:20:25 Size and Spacing
0:21:27 Rendering Glyphs with Lots of Triangles
0:22:17 Optimized Curve Rendering (Loop-Blinn)
0:28:20 A Brief Look at SDF Rendering
0:30:33 The Counting Method
0:31:48 Ray-Bézier Intersections
0:34:09 Point in Glyph Test
0:36:35 Shader Time
0:38:37 Floating Point Problems
0:41:22 The Evil Artifact Detector
0:45:36 The Closest Curve Method
0:50:48 Curve Splitting
0:54:31 Defeating the Evil Artifacts
0:58:58 Anti-Aliasing
1:02:47 Performance and Legibility
1:05:11 The Counting Method Returns
1:09:45 Outro
zhlédnutí: 528 866
Video
Bad Apple but it's a Fluid Simulation
zhlédnutí 427KPřed 4 měsíci
I tried rendering Bad Apple inside of a particle-based fluid simulation. (I recommend watching in 4K if you can, as video compression is not overly friendly towards all the little dots!) Full resolution video download: drive.google.com/u/0/uc?id=1zTmq8M0kHYqIuf72yGJvgYuWgE8aKmU3&export=download If you'd like to learn more about the fluid simulation, take a look at this video: czcams.com/video/r...
I Ran a Chess Programming Tournament, Here's How it Went!
zhlédnutí 497KPřed 4 měsíci
Let's have a look at the creative code behind some of the bots, watch their games, and find out who will ultimately emerge victorious. If you'd like to support my work, you can do so with a recurring or one-off contribution over here: www.patreon.com/SebastianLague ko-fi.com/sebastianlague The code for all the entries, as well PGN files for all the games played in the tournament can be found ov...
Coding Adventure: Simulating Fluids
zhlédnutí 1,6MPřed 7 měsíci
Let's try to convince a bunch of particles to behave (at least somewhat) like water. Written in C# and HLSL, and running inside the Unity engine. Source code: github.com/SebLague/Fluid-Sim If you'd like to support me in creating more videos like this, you can do so here: www.patreon.com/SebastianLague ko-fi.com/sebastianlague Resources: matthias-research.github.io/pages/publications/sca03.pdf w...
Coding Challenge Announcement: Tiny Chess Bots
zhlédnutí 239KPřed 9 měsíci
Hello! Here's a little coding challenge for anyone who'd like to take part: you have until October 1st to create a tiny chess bot in C# using the framework linked below. You can find more details about the challenge on that page as well. github.com/SebLague/Chess-Challenge This challenge is now over. You can find the results over here! czcams.com/video/Ne40a5LkK6A/video.htmlsi=xVjO6WsrSNLn_AAE ...
Coding Adventure: Making a Better Chess Bot
zhlédnutí 660KPřed 10 měsíci
Trying to improve an old chess bot by experimenting with various interesting techniques. You can play (or watch) the bot on lichess: lichess.org/@/CodingAdventureBot/playing This is a sequel to: czcams.com/video/U4ogK0MIzqk/video.html If you'd like to support my work (and get early access to new videos and projects) you can become a patron of the channel over here: www.patreon.com/SebastianLagu...
Answering Your Questions
zhlédnutí 298KPřed 11 měsíci
Let's talk about some stuff! My process for creating videos, unfinished projects, thoughts on Godot, and more. Support on Patreon: www.patreon.com/SebastianLague My (very crude) video tools: github.com/SebLague/VidTools Godot Marching Cubes Experiment: github.com/SebLague/Godot-Marching-Cubes Shapes by Freya: www.youtube.com/@Acegikmo acegikmo.com/shapes/ Music credits: github.com/SebLague/Misc...
Coding Adventure: Ray Tracing
zhlédnutí 1,1MPřed rokem
I tried creating a custom ray/path tracing renderer. Featuring: maths, shaders, and cats! This project was written in C# and HLSL, and uses the Unity game engine. Source Code: github.com/SebLague/Ray-Tracing Support the channel: www.patreon.com/SebastianLague Coding Adventures Playlist: czcams.com/play/PLFt_AvWsXl0ehjAfLFsp1PGaatzAwo0uK.html Learning Resources: raytracing.github.io blog.demofox...
Experimenting with Buses and Three-State Logic
zhlédnutí 568KPřed rokem
Let's figure out how to move data around inside our simulated computer. Featuring multiplexers, buses, and three-state logic. Series playlist: czcams.com/play/PLFt_AvWsXl0dPhqVsKt1Ni_46ARyiCGSq.html Simulation tool (work in progress): sebastian.itch.io/digital-logic-sim Source code: github.com/SebLague/Digital-Logic-Sim Support the channel: www.patreon.com/SebastianLague Resources and Inspirati...
Visualizing Data with 7-Segment Displays
zhlédnutí 1,2MPřed rokem
Displaying numbers is trickier than I expected! In this video we explore how to visualize the data inside of our simulated 4-bit registers, with the help of the double dabble algorithm and some seven segment displays. Series playlist: czcams.com/play/PLFt_AvWsXl0dPhqVsKt1Ni_46ARyiCGSq.html Simulation tool (work in progress): sebastian.itch.io/digital-logic-sim Source code: github.com/SebLague/D...
How to Create a Neural Network (and Train it to Identify Doodles)
zhlédnutí 1,8MPřed rokem
Exploring how neural networks learn by programming one from scratch in C#, and then attempting to teach it to recognize various doodles and images. Source code: github.com/SebLague/Neural-Network-Experiments Demo: sebastian.itch.io/neural-network-experiment If you'd like to support me in creating more videos (and get early access to new stuff), you can join my patreon here: www.patreon.com/Seba...
Polishing and Releasing My Tiny Geography Game
zhlédnutí 2,2MPřed 2 lety
I've been making some small tweaks and additions to my little geography game based on the great feedback I've received from all of you (thank you!). If you'd like to play the game, you can download it here: sebastian.itch.io/geographical-adventures The project source is over here: github.com/SebLague/Geographical-Adventures If you'd like to support my work (and get early access to new videos an...
Trying to Improve My Geography Game with More Real-World Data
zhlédnutí 3,7MPřed 2 lety
Continuing the geographical game journey with some performance improvements, bug fixes, graphical upgrades, and a variety of experiments. If you'd like to try running the game in its current state, there's a free download available here: sebastian.itch.io/geographical-adventures The project source code is available over here: github.com/SebLague/Geographical-Adventures If you'd like to support ...
I Tried Creating a Game Using Real-World Geographic Data
zhlédnutí 6MPřed 2 lety
A little experimental game I've been working on recently, where you fly around a tiny version of the world and deliver packages to various cities. Would love to hear any ideas you might have about how this could be taken further! The next episode about this project's development is now available here: czcams.com/video/UXD97l7ZT0w/video.html The source files for this project are available here: ...
I Spent a Week Making an AI's Video Game Idea
zhlédnutí 3,3MPřed 2 lety
I've recently been on a streak of unfinished projects, so I decided to focus one week on actually completing something anything! I thought it would be fun to make a small game, and so I asked an AI for some ideas... If you'd like to support me in making more of these programming / game dev videos, I have a Patreon page over here: www.patreon.com/SebastianLague Project Files: github.com/SebLague...
Complex Behaviour from Simple Rules: 3 Simulations
zhlédnutí 372KPřed 3 lety
Complex Behaviour from Simple Rules: 3 Simulations
Coding Adventure: Ant and Slime Simulations
zhlédnutí 1,9MPřed 3 lety
Coding Adventure: Ant and Slime Simulations
Coding Adventure: Procedural Moons and Planets
zhlédnutí 1,7MPřed 3 lety
Coding Adventure: Procedural Moons and Planets
I Created a (terrible) Video Game Console
zhlédnutí 2,4MPřed 4 lety
I Created a (terrible) Video Game Console
Breathtaking stuff. Beautiful.
Man keep updating these cool videos they are helping a lot thanks for your hard work
I have a fun idea, a drawback chess tournament, each bot is made with a random drawback it must deal with for the game.
15:34 this is so relatable, trying to optimize something only to finally find the actual problem making all your previous optimization work not matter at all
I feel like learning more geology in here
That debugging tool is awesome
Thank you so much for this! I think this is one of the first neural network videos that are fun and game-oriented, yet don't just gloss over the hidden layer and go "yeah it's machine magic it works" and then only focuses on the output and input. Very nice, helped a lot in grasping the concept. Please make more about other AI algorithms :D
crazy how all of this is basically just AND and NOT gates deep down
Just wait until you get into text layout, gets incredibly complicated with text wrapping, alignment and writing direction :D I’ve not found a program yet that handles bidirectional text perfectly
try leakyRelu and insert drop, stop.
I made a new chip called the SRNGAND which is a rng chip with 30 inputs to give your your PERFECT rng values for all needs, as long as you can fit in 30 inputs!
It was going to have 32 inputs but some weird stuff happened that forced me to lower it to 30 inputs.
this is a really good explaination!!!!!! thank you soo much!
how do we group the pins?
please continue the binary logic series with digital logic sim
fuck uni
"Anyway, what's going on with this tomato?" - Labastian Segue
Thank you Sebastian!
On the microsoft patent mentioned: patenting an algorithm does nothing actually prevent others from using it, only from profiting off of it, namely by competing with the owner of the patent. The ad sense profits from this video would not be in violation of the microsoft patent, to the best of my (not a lawyer) knowledge, as you are not competing with microsoft in any significant way.
Nice! I'm so happy to see someone else manage to try SPH from scratch. I found myself doing the same thing almost a year ago, trying to make it work on the CPU of a Raspberry Pi 4. I never did make it perfectly stable, and after seeing what you've done maybe I should go back and see what I can do about it again. I did notice that you're asking for suggestions, so here's my notes, though it's just coming from someone who was on the same level: * Aw cool, I've never seen the spatial hashing method in practice before! I just went with the linked list method, since I didn't go with a GPU. * To me, the reviews of SPH published by Monaghan, who was one of the first to use it, was really solid background on the topic, especially in regards to the math. Google Monaghan 2005. That one is free and online (though I thiiink he's written another one since? I'm not sure) * To solve the tradeoff between "jigglyness" and needing small timesteps, one thing that works is "incompressible SPH" (ISPH). What you and I have done is "weakly-compressible SPH" (WCSPH), where the stiffness constant is the big parameter that controls the compressibility--from gaseous to harder than water. ISPH is what enables the million-particle-scale sims of le déluge in the movies. Though, it's a great deal more complicated, and I've tried and failed at doing the IISPH paper, Ihmsen 2013, myself. (I'll get back to it, one day.) * In regards to the odd behavior at boundaries and floating objects on the water, there's a paper that kills two birds with one stone: Akinci 2012. It says ISPH in the title but it works for WCSPH too. All solids, including the walls, are simulated by putting particles on the surface. For me, it straight-up solved walls and bunching.
Hi bro, could I ask you which University have you graduated from, or is it necessary to study at some University to give into coding? I have self-studied some Java, and I guess I am quite good at it( at least I enjoy what I am doing ). Recently, I tried to apply to US, but it didn't quite work, so could you, or anyone here, suggest whether is it actually necessary to get a degree in Computer Science and where to study best for an International student from low-income background?
Floating Point numbers are useful but man, do they create a boatload of problems with them. All those edge cases you had to iron out reminds me of the shenanigans of invisible walls in Super Mario 64, which are also often caused by floating point imprecision, among other things.
I love it how the documentation for glyphs also describes how the Pen Tool in Photoshop works
Watching this for Minecraft
I took a similar course it was digital design and organization and still I need help I cant seem to understand anything is there any resources that I could learn with?
Ah, reading text to render text. How silly!
8 years later and these videos are so useful. Thanks man
Wow, so good. I hope Iif I can make like this video for my students
If anyone is still having the problem of the chunks not connecting after following this episode maybe check the normalize mode in the noise settings, you need it in global.
Add an animal that eats the foxes and is eaten by the rabbits. would be interesting
Love your videos🤩
what is the name of that program? edit: ok, i noticed its in the description
more
Inspired by your simulation I managed to make a 3D version if it czcams.com/video/7l62qNPOOCs/video.html
you NEED to continue this into a full game it would be super cool, love the idea of dodging planes that are trying to steal the package would make the game alot more playable and fun
The magic bitboards break my brain.. wat?
genius.. congrats from Brazil.. amazing videos
I was playing around with something very similar a while back, loading font files in Unity and converting them to Bezier - but I went the ear-clipping route. I was also attempting to calculate curve-path booleans, so if I had overlaps, I unioned all the paths together. Before ear-clipping, I would do the ray-casting to check if it was an inside or outside outline - then you can sum up what the Z component of each pair of node edges would cross-product. The sign gives you the overall shape winding (even if the object has hooks and concavities). Then, invert the path if it's the wrong winding. I also had floating precision nightmares. 💀
Hello! I really enjoy your videos, especially the ones where you go over the basics of how a computer works. I also like your "Digital Arithmetic" application, but I encountered some difficulties while using it. I hope you can help me, and here are a number of problems that arose when using your application: inability to scale (when trying to create a 16-bit kernel or more), in rare cases everything starts to glitch and works unpredictably, although there was no reason for it (this The problem was resolved by restarting the game). I am hope for your help Привет! Мне очень нравятся ваши видео, особенно те, в которых вы рассказываете об основах работы компьютера. Мне также нравится ваше приложение «Цифровая арифметика», но при его использовании я столкнулся с некоторыми трудностями. Надеюсь вы мне поможете, и вот ряд проблем, возникших при использовании вашего приложения: невозможность масштабирования (при попытке создания 16-битного ядра и более), в редких случаях все начинает глючить и работать непредсказуемо, хотя причин для этого не было (данная проблема решилась перезапуском игры). Я надеюсь на вашу помощь ❤❤❤❤
NICE! It's like patting your head and rubbing your tummy. 🤣
32:20 *splash*
59:53 u can do that with rgb channels. but if u rotate the rgb stripts it woould work diferent
man every time i stumble upon one of these they're so good.
It was really one of the best explanation that I've seen, thanks a lot ❤❤❤
This is beautiful
Can you make a tutorial?
Instead of just the usual volumetric of filtering, emitting and scattering, could we just make each point have BRDF properties? Your point data has the weights on it the shader could read and then with fragment each point as a gaussian blur.... oh wait, that is 3D Gaussian Splatting
There was a paper some time back that made the media. If you pour liquid soap, if it piles just right it will spontaneously spout little filaments of the soap like those tendrils.
This is amazing. I would love to be able to see this effect in VR. Is it possible for you to release the code for this version of the fluid simulation specifically? In case copyrighted metadata is a problem maybe just without it so that we would at least be able to create our own.
0:28 appretiation post.
I saved DIGITAL DISPLAY just like you did,but when i tried to ise later it was just a regular chip with 4 inputs and no outputs,is there any way to see the actual numbers directly?