Painting a Character with Maths

Channel:Inigo Quilez · Length:24:46 · Published:2020-11-28 · Views:458669

Watch on YouTube

Summary

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.

Why HN recommends it

HN repeatedly calls it a mind-blowing and accessible introduction to SDFs and procedural art from a master explainer.

he's a master of this stuff and a great explainer. — HN, 2022

Computer graphics & rendering · Creative coding & generative art

Subtitles (excerpt)

[Music] hi i'm eniga quiles and together today we are going to be painting a girl taking a selfie with mathematics so let's jump straight to it and start by using a sphere to make the forehead of the girl we use the sdf representation of the sphere where sdf means sign distance function because it returns the distance from any point in space to the surface of the volume that it represents we will use sdfs for all of our sculpting work today because they are very easy to render on a computer by using re-marching link in the description then we define another sphere which will become the yaw so we make it smaller and place it a bit lower i'm combining the two spheres into a single 3d plot here by using the mean function which returns the smallest of two numbers because the distance to the whole shape is the smallest of the distances to the two spheres now we replace the jaw sphere with an ellipsoid which has not one but three radii that we can set separately that gives us a lot more control of the shape of the volume in fact we will make these three radii linear functions of y the vertical component of space such that we can't tune them until we get the shape we need now in order to blend the two spheres together into a smooth surface we will

On Hacker News

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 MUC… — dgellow, 2023-04
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] — nighthawk454, 2022-12
Agreed. Check out his incredible videos! Such as this mind-blowing one... [VIDEO] "Painting a Selfie Girl, with Maths" — gregsadetsky, 2021-08
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] — kn8a, 2021-01
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 … — sxp, 2021-01

Related videos