Ray Marching

Simon has set his first steps towards creating a 3D renderer. What’s a 3D renderer? 3D rendering is a process of converting 3D models into 2D images on a computer. Simon wants to build his 3D renderer using ray marching algorithms.

“That’s a most unusual technique that’s used for that. Normally you would use rasterization”, Simon explains. What on earth is that? Rasterization simply means taking an image described in a vector graphics format and converting it into a raster image, i.e. a series of pixels, dots or lines. But Simon doesn’t use rasterization. He uses ray marching. So what is ray marching?

“Ray marching is an algorithm to shoot a ray until it hits the scene. Normally it’s done with ray tracing, but ray marching gives us extra possibilities”.

Simon’s code: https://editor.p5js.org/simontiger/sketches/drEtQDq66

Simon explaining his ray marching sketch in a video
the tiny algorithm to define a distance to a circle
the larger algorithm to define a distance to a square

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s