I painted a Landscape with Mathematics

812K views · 4 years ago · demo · expert · evergreen

Inigo Quilez live-codes a whole ray-marched landscape in a pixel shader, using only math and signed distance fields. He builds up terrain, lighting, sky and atmosphere from formulas and explains each step as he goes.

HN offers it as a look at what a master of shader art can do and as the advanced next step after his beginner procedural graphics videos.

“If you want to see what the Masters can do with shaders, let me introduce you to Inigo Quilez and his shader art”

21 comments from Hacker News

f
@fasterik2023 · in “I drew these corals with mathematical equations”
Indeed, Inigo Quilez is "the guy" for this kind of stuff. He co-created ShaderToy and has worked on effects and modeling for multiple Pixar films. My favorite video of his is Painting a Landscape with Maths. ▶ this video He deserves to have at least as many subscribers as other math YouTube channels like Verisatium and 3Blue1Brown.
Strongly recommendsView on HN
s
@soupspaces2026 · in “Painting a Landscape with Mathematics [video]”
Submitted the video to Hacker News.
RecommendsView on HN
l
@lioeters2025 · in “Painting a Landscape with Mathematics [video]”
Submitted the video to Hacker News.
RecommendsView on HN
t
@thewanderer19832025 · in “VoxelSpace: Terrain rendering algorithm in less than 20 lines of code (2020)”
>It looks really good for such a simple algorithm. I love this! If you like that, you should check out Inigo Quilez ▶ this video Here is the shadertoy link with code link
RecommendsView on HN
t
@tombh2024 · in “Programming terrain from scratch using C++ and OpenGL by Shamus Young (2006)”
I just finished watching a live-coding session (from 2 years ago) by Inigo Quilez (ex Pixar), where he constructs an entire ray-marched landscape using only maths (mostly SDFs) in pure GPU shader code. The stream: ▶ this video The demo: link
RecommendsView on HN
z
@zengid2023 · in “Genuary 2024: Generative Art / Creative Coding Month”
Edit: Hey my bad the prompts for Genuary are all for making visuals, but I suppose they could be interpreted for audio too. My bad, but I'll leave my music-nerd rant below in tact in case anyone finds it useful ---------------- This is awesome, I didn't know about this but I've been subconsciously preparing for it over Christmas break. Here's what I've found useful: Music: - Eli Fieldsteel's intro to SuperCollider course is fantastic. SuperCollider language is kind of nice. Function literals are simply curly braces, `{}`, and the last expression is returned. It has pipe's for function arguments, so if you squint it kind of feels like Ruby or Rust. // a silly function. Note that paren "blocks" make evaluating multiple lines easier ( x = {|num| num.squared + 42 }; y = x.(0); ) If you've only ever used JavaScript, there's a lot of "wtf is this shit" moments, but otherwise it's really nice. I feel like SCLang is super powerful and want to use it for some projects. Here's Eli's course playlist: link - Sonic Pi is built on-top of SuperCollider, but it's MUCH easier to get started with making bleeps and bloops. Sam Aaron, who originally created Overtone (a Clojure front-end for SuperCollider) created Sonic Pi initially to teach kids computer programming and music, but now it's turning into a pretty nice live-coding setup. The language is basically a DSL extension of Ruby, and although it's very elegant, I feel like it's a little nerfed in terms of a full language when compared to SCLang, so I'm sticking with the latter for now. High recommend checking it out if you're new to making music or code. link - This 'Intro To Live Coding' vid from Alex McLean is great. Gives a good overview of a few fun tools out there that I won't mention here for sake of time (check out Gibber and Hydra for web-based coding things. Gibber is really slick). Alex invented Tidal Cycles, which I feel is like god-tier in terms of power and conciseness. Maybe I'll tinker with Tidal someday, but I want to start with SC. link Graphics - Processing is a great place to start: link - Great intro to programming shaders for art from kishimisu: link - Inigo Quilex invented ShaderToy among other things. I haven't watched this yet but I'm sure it's awesome: ▶ this video - Hydra looks pretty neat for live-coding graphics in the browser: link I was really hoping to find a platform that would allow for integrating a programmatic 'score' of music and drive visuals from it, like one step above just using the wave-form to trigger visuals.. I don't know if I've found what I'm happy with yet.. I think I'll try to hook up the OSC signals from SuperCollider with some visuals, but not sure. I want to use shaders if possible, and SC doesn't really support that. Gibber seems great but I'm not sure. Maybe Tidal has it, but the Tidal lang might take a while to learn. I want to use raw frequency values for the notes as much as possible, and that's really easy in SC. I don't want to be stuck using midi notes.
RecommendsView on HN
s
@sph2023 · in “Interactive intro to shaders”
Welcome to the Internet, superMayo! If you want to see what the Masters can do with shaders, let me introduce you to Inigo Quilez and his shader art: ▶ this video EDIT: I did not notice you are the author of this article. It's very well done, and I've been looking for more approachable and interactive tutorials on the arts of shader coding.
RecommendsView on HN
a
@antegamisou2023 · in “Painting with math: A gentle study of raymarching”
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 - ▶ this video Painting a Character with Maths - link Bonus: Painting with Maths in Google Sheets - link
RecommendsView on HN
s
@superasn2022 · in “Painting a Landscape with Maths [video]”
Submitted the video to Hacker News.
RecommendsView on HN
T
@Tomte2022 · in “Painting a Landscape with Maths”
Submitted the video to Hacker News.
RecommendsView on HN
d
@djmips2022 · in “Source code for 4kb demoscene production “Elevated” released (2016)”
Thankfully for the graphics the very person who did the graphics in this Elevated demo is very generous with their time. Inigo Quilez has many instructional videos on his channel in how to code procedural graphics from the very beginner to the advanced. I link a couple of examples. You can watch the more advanced video even as a beginner but trying yourself is easier at the beginner level. Beginner. link Advanced. ▶ this video Website. link
RecommendsView on HN
l
@lifthrasiir2022 · in “Making graphics in 4 kilobytes (2008) [pdf]”
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] link [2] ▶ this video
RecommendsView on HN