Ray Marching for Dummies!

262K views · 7 years ago · tutorial · intermediate · evergreen

A beginner tutorial from The Art of Code on ray marching, a technique for drawing 3D scenes in a fragment shader. It builds up from the basic idea to rendered shapes without needing a 3D engine.

HN people recommend it as the step that shows how to get 3D out of fragment shaders, after a 2D beginner video and before the harder material.

“which isn't his but introduces how you get 3D out of fragment shaders”

2 comments from Hacker News

f
@feiss2023 · in “The model for coins in Super Mario Odyssey is simpler than in Super Mario Galaxy”
You can use SDFs (signed distance functions) to express your objects in a mathematical form. It has its pros and cons. One of the bigger cons is that most tools use the polygonal approach, so you'd have to build a lot from scratch. Lots of SDF examples in ShaderToy[2], and many introductory videos on YouTube (I specially recommend Inigo Quilez's channel[2] --co-creator of [1]--, and The Art of Code [3]) [1] link [2] link [3] ▶ this video
RecommendsView on HN
j
@jwatzman2022 · in “Source code for 4kb demoscene production “Elevated” released (2016)”
Indeed his videos are amazing. My recommendation though would be to start with the "beginner" video -- which is completely 2D but at least gets some ideas across. Then watch ▶ this video which isn't his but introduces how you get 3D out of fragment shaders. Finally just drink from the firehose -- link is fantastic, yes it's five hours but worth it. (Definitely come into that familiar with the idea of raymarching though... the first few minutes start off super basic but it goes to eleven real quick.)
RecommendsView on HN