Painting a Character with Maths
Inigo Quilez13 HN recommenders · 2021–2025
458K views · tutorial · evergreen · Uploaded 2020-11-28
Inigo Quilez live-codes a cartoon character painting entirely from math, using signed distance fields in a Shadertoy shader. He explains each step of building the image from formulas.
HN repeatedly calls it a mind-blowing and accessible introduction to SDFs and procedural art from a master explainer.
1:25:348 Bit & '8 Bitish' Graphics-Outside the Box
GDC Festival of Gaming
24:26The Beauty of Bézier Curves
Freya Holmér
1:13:50The Continuity of Splines
Freya Holmér
3:36elevated by Rgba & TBC | 4k intro (FullHD 1080p demoscene demo)
Demoscene High-Quality Videos (Annikras)
45:35The Real Story Behind Wayland and X - Daniel Stone (linux.conf.au 2013)
Mladen Mijatov
1:10:00A Deep Dive into Nanite Virtualized Geometry
SIGGRAPH Advances in Real-Time Rendering
1:37:22Siggraph2019 Geometric Algebra
Bivector
1:00:49The Art of Code - Dylan Beattie
NDC Conferences
19 comments from Hacker News
Checkout this video by the author. It makes a full 3d complex scene out of a math formula, with step by step explanation [VIDEO]
This was a mind blowing example of math and art from last year - perhaps the live coding of the method was even more impressive than the outcome: [VIDEO]
If you don't have an understanding of signed distance fields, [VIDEO] is an amazing demo of their power. There are more videos about the fundamentals of SDFs at [LINK] The interesting thing about this paper is that they replace the mathematical SDF with a neural net that computes SDF_NN(x,y,z) => -1/1 and use this as a compression system for mesh based inputs. This feels like a graphical version of the [LINK] for NN-based text compression.
Demos are almost always generated and displayed at runtime. The music is composed of samples generated at runtime by additive synthesis which is just adding waveforms of differing frequencies together when you get down to it. It doesn't take many lines of code to produce CD quality instruments that can be arranged as a soundtrack. Today's 64k intros offload their drawing onto the GPU using shaders and a technique called raymarching which is a form of fixed-step raytracing that can be done in real time. Essentially the objects you see are painted with math: instead of thousands of vertices for a 3d fractal or a complex object, a formula is fed in to the ray marcher and it returns a shape with colors and lighting. Combining shapes using unions and intersections is then done and often the shape formula will take time as a parameter as well. To play with this concept yourself go to [LINK] and see how shader programs are rendered into incredible scenes with astonishingly few lines of code. For a wonderful look at the creation process, see the grandfather of raymarching Inigo Quilez create a selfie of a girl from scratch using formulas here: [VIDEO]
Agreed. Check out his incredible videos! Such as this mind-blowing one... [VIDEO] "Painting a Selfie Girl, with Maths"
I don't think that people only value the output. Take "Selfie Girl"[0] by Inigo Quilez people appreciate that it's a shader, even people that are not into programming (though they'd need to see the making of video[1]). [0] [LINK] [1] [VIDEO]
Inigo Quilez, the author of this slide, also has made in-depth videos [1] [2] which might be more accessible to who aren't familiar with shader languages. [1] [VIDEO] [2] [LINK]
It's very similar to writing shaders. Check out this video for some crazy stuff you can do with equations: [VIDEO]
Previous discussion: [LINK] (36 comments - sep 6th 2022). This video [1] linked there shows how far you can get with this technique. [1] [VIDEO]
He has a YouTube channel as well: [VIDEO] Also you may like Marble Marcher made by Code Parade, it's a game that uses a similar approach to rendering: [LINK]
Great write up. If anyone wants to explore SDFs more, check out Inigo Quilez - he's a master of this stuff and a great explainer. Painting a Character with Maths: [VIDEO] And plenty more on his website in article form: [LINK] Finally, Shadertoy, a graphics shader playground where you can see (and try!) a lot of this kind of stuff: [LINK]
Inigo Quilez does some incredible stuff with signed distance fields! Those don't use textures in the traditional sense, but see [VIDEO]
And, if we're suggesting Shadertoy, this video by one of its creators is probably worth watching: [VIDEO]
I see a Inigo Quilez link, I upvote! He's one of those incredible artist-engineer out there always pushing boundaries further and sharing his ideas and techniques publicly. If you have some time today, watch a few of his videos on his youtube channel, it's incredible to see his creation process in action: [LINK] For example, "Painting a character with maths" is mind-blowing and packed with SO MUCH educative content: [VIDEO]
Could you define "assets", please? What would you consider the assets in these videos by Inigo Quillez, for example? [LINK] [VIDEO]
Good to see high quality articles gaining traction. If the article looks too verbose, be sure to check out, as the author cites, Inigo Quilez's videos Painting a Landscape with Maths - [LINK] Painting a Character with Maths - [VIDEO] Bonus: Painting with Maths in Google Sheets - [LINK]
Check out 'Painting a Character with Maths' [1] (2020) by him, it's a very interesting video. [1] [VIDEO]
This is of course true, but have you ever seen Inigo Quilez's SDF renderings? It's certainly not scalable, but it sure is interesting [VIDEO]
Obligatory "this painting is a mathematical formula, a big function on the x and y coordinates of each pixel" video from Iñigo Quilez. [VIDEO]