Sebastian Lague
Sebastian Lague
  • 282
  • 96 388 511
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
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...
Coding Adventure: Terraforming
zhlédnutí 1,4MPřed 2 lety
Coding Adventure: Terraforming
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: Chess
zhlédnutí 3,7MPřed 3 lety
Coding Adventure: Chess
How Do Computers Remember?
zhlédnutí 6MPřed 3 lety
How Do Computers Remember?
Exploring How Computers Work
zhlédnutí 3,4MPřed 3 lety
Exploring How Computers Work
Coding Adventure: Atmosphere
zhlédnutí 1,1MPřed 3 lety
Coding Adventure: Atmosphere
Coding Adventure: Procedural Moons and Planets
zhlédnutí 1,7MPřed 3 lety
Coding Adventure: Procedural Moons and Planets
Coding Adventure: Solar System
zhlédnutí 834KPřed 4 lety
Coding Adventure: Solar System
Coding Adventure: Portals
zhlédnutí 1,3MPřed 4 lety
Coding Adventure: Portals
My First 10 Years of Game Development
zhlédnutí 1,3MPřed 4 lety
My First 10 Years of Game Development
Coding Adventure: Game Idea Generator
zhlédnutí 850KPřed 4 lety
Coding Adventure: Game Idea Generator
I Created a (terrible) Video Game Console
zhlédnutí 2,4MPřed 4 lety
I Created a (terrible) Video Game Console
Coding Adventure: Clouds
zhlédnutí 1,2MPřed 4 lety
Coding Adventure: Clouds
Coding Adventure: Boids
zhlédnutí 1,6MPřed 4 lety
Coding Adventure: Boids

Komentáře

  • @LemonSteak
    @LemonSteak Před 39 minutami

    Breathtaking stuff. Beautiful.

  • @user-qe2nx9nw7h
    @user-qe2nx9nw7h Před 3 hodinami

    Man keep updating these cool videos they are helping a lot thanks for your hard work

  • @chickenlittle5527
    @chickenlittle5527 Před 5 hodinami

    I have a fun idea, a drawback chess tournament, each bot is made with a random drawback it must deal with for the game.

  • @TheGeniziz
    @TheGeniziz Před 5 hodinami

    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

  • @RandomDude00001
    @RandomDude00001 Před 8 hodinami

    I feel like learning more geology in here

  • @afailable
    @afailable Před 9 hodinami

    That debugging tool is awesome

  • @zaponium5584
    @zaponium5584 Před 19 hodinami

    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

  • @ConnorRK-sl9gl
    @ConnorRK-sl9gl Před 21 hodinou

    crazy how all of this is basically just AND and NOT gates deep down

  • @randomizednamme
    @randomizednamme Před dnem

    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

  • @duracell211
    @duracell211 Před dnem

    try leakyRelu and insert drop, stop.

  • @onewithnomoneyies1625

    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!

    • @onewithnomoneyies1625
      @onewithnomoneyies1625 Před dnem

      It was going to have 32 inputs but some weird stuff happened that forced me to lower it to 30 inputs.

  • @heerakagrawal3176
    @heerakagrawal3176 Před dnem

    this is a really good explaination!!!!!! thank you soo much!

  • @nadiamargarida5247

    how do we group the pins?

  • @codmj-nz7gs
    @codmj-nz7gs Před dnem

    please continue the binary logic series with digital logic sim

  • @mohannadab2684
    @mohannadab2684 Před dnem

    fuck uni

  • @whynotanyting
    @whynotanyting Před dnem

    "Anyway, what's going on with this tomato?" - Labastian Segue

  • @Mballs2478
    @Mballs2478 Před dnem

    Thank you Sebastian!

  • @pug_gamer137
    @pug_gamer137 Před dnem

    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.

  • @colonelwatch9220
    @colonelwatch9220 Před dnem

    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.

  • @bilol_abdilxayev
    @bilol_abdilxayev Před dnem

    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?

  • @metroidnerd9001
    @metroidnerd9001 Před dnem

    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.

  • @don_marcel
    @don_marcel Před dnem

    I love it how the documentation for glyphs also describes how the Pen Tool in Photoshop works

  • @GhostRyder2008
    @GhostRyder2008 Před 2 dny

    Watching this for Minecraft

  • @khuloodalnaqbi
    @khuloodalnaqbi Před 2 dny

    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?

  • @jajoothecoolman
    @jajoothecoolman Před 2 dny

    Ah, reading text to render text. How silly!

  • @jmlopezponce
    @jmlopezponce Před 2 dny

    8 years later and these videos are so useful. Thanks man

  • @MS_02
    @MS_02 Před 2 dny

    Wow, so good. I hope Iif I can make like this video for my students

  • @felipedemarchi8927
    @felipedemarchi8927 Před 2 dny

    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.

  • @hinahammad1047
    @hinahammad1047 Před 2 dny

    Add an animal that eats the foxes and is eaten by the rabbits. would be interesting

  • @user-dy5pu8jx8v
    @user-dy5pu8jx8v Před 2 dny

    Love your videos🤩

  • @bestboytubeOFC
    @bestboytubeOFC Před 2 dny

    what is the name of that program? edit: ok, i noticed its in the description

  • @lazartomic5800
    @lazartomic5800 Před 3 dny

    more

  • @SevickV
    @SevickV Před 3 dny

    Inspired by your simulation I managed to make a 3D version if it czcams.com/video/7l62qNPOOCs/video.html

  • @Snack_NotTheory
    @Snack_NotTheory Před 3 dny

    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

  • @Dalroc
    @Dalroc Před 3 dny

    The magic bitboards break my brain.. wat?

  • @phillipefonseca4105

    genius.. congrats from Brazil.. amazing videos

  • @Reavenk
    @Reavenk Před 3 dny

    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. 💀

  • @nightcore_senpai
    @nightcore_senpai Před 3 dny

    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-битного ядра и более), в редких случаях все начинает глючить и работать непредсказуемо, хотя причин для этого не было (данная проблема решилась перезапуском игры). Я надеюсь на вашу помощь ❤❤❤❤

  • @pdsmart
    @pdsmart Před 3 dny

    NICE! It's like patting your head and rubbing your tummy. 🤣

  • @morwar_
    @morwar_ Před 4 dny

    32:20 *splash*

  • @DNFplays
    @DNFplays Před 4 dny

    59:53 u can do that with rgb channels. but if u rotate the rgb stripts it woould work diferent

  • @Oblivaddict
    @Oblivaddict Před 4 dny

    man every time i stumble upon one of these they're so good.

  • @godlyradmehr2004
    @godlyradmehr2004 Před 4 dny

    It was really one of the best explanation that I've seen, thanks a lot ❤❤❤

  • @oscarsanroman9369
    @oscarsanroman9369 Před 5 dny

    This is beautiful

  • @chirurdp3454
    @chirurdp3454 Před 5 dny

    Can you make a tutorial?

  • @kenjinks5465
    @kenjinks5465 Před 5 dny

    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

  • @kenjinks5465
    @kenjinks5465 Před 5 dny

    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.

  • @DanielPramel
    @DanielPramel Před 5 dny

    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.

  • @marhola100
    @marhola100 Před 5 dny

    0:28 appretiation post.

  • @nizarbk866
    @nizarbk866 Před 5 dny

    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?