sam engel
sam engel
I'm a software engineer with a focus on creative audiovisual, spatial, and scientific tools. You can reach me at samuel.d.engel@gmail.com. I use he/they pronouns. You can find some things I've made on this web page!
Experiments in graphics and gpu compute for the web. Proofs of concept, paper/blog implementations, small-scale demos, etc. written using WebGL and WebGPU.
weekend raytracer
source
weekend raytracer
A rust implementation of Peter Shirley, Trevor David Black, and Steve Hollasch's Ray Tracing in One Weekend, with help from Daniel Busch's rust version of the book. I added on a few extras, including image-based lighting, high dynamic range, direct lighting with shadow rays, parallelization, and a BVH based on this blog post by Jacco Bikker. I also experimented with a surface area heuristic and sorted traversal for the BVH.
At the end of the 18th century, engineers in France constructed a network of optical telegraphs, allowing messages to be transmitted hundreds of miles in a matter of minutes. As a production tool for the short film Telegraph Tower, I wrote a blender script to programatically animate a model of a sempahore telegraph transmitting an arbitrary input string.
I also put together a simple web app version of the tool with additional animation options:
SDF Text is a small webgl and javascript tool for turning text into customizable word art:
It includes a live glsl shader editor that you can use to come up with new styles. I owe much of the inspiration and logic to Valve's 2007 paper on SDFs, Pedro Felzenszwalb and Dan Huttenlocher's paper on calculating SDFs, and The Book Of Shaders's practical write-up of shapes and shaping. At some point I may revisit this to replace the old cpu-side SDF generation with a gpu-side jump flood approach, but overall I'm pleased with how it came out! Here are some of my favorite results:
Crossword Corpus started as a complaint: why do words like ALOE, ERA, and OAT show up so often in crossword puzzles? It turned into a kind of blog/web app hybrid about language, data, and crossword puzzles.
To get started, I put together a scraper in bash and collected two and a half decades of puzzles, then read them with a home-grown .puz file parser. Once I could actually interpret the puzzles, I ingested them into a postgres database behind a node/express web app on heroku. The app hosts blog pages, exposes an api for running data analysis, and serves the results into tables and graphs by way of plotlyjs and HTML CustomElements. Once I could run tests and visualize findings, it was finally time to read up on corpus linguistics and get some answers.
Along the way I ran afoul of some data management problems. Brotli and gzip helped with the high network usage, and better data structure efficiency improved the performance of the large language corpora I was working with. On the front-end, I was happy to find that CustomElements and custom HTML events are a viable alternative to bulkier frameworks. I learned a lot about language, so give the blog a read if you're interested!
arsiliath compute workshop
arsiliath compute workshop
In December 2020 I took Arsiliath's workshop on creating biology-inspired simulations using compute shaders in Unity. We implemented algorithms from the literature on cellular automata, reaction-diffusion, physarum, primordial particle systems, flocking, etc. Here are some of my favorite results:
Checkerboard is a threejs/webgl take on a doodle I've done since I was a kid (it looks like this):
Initially conceived as an excuse to play with shaders, Checkerboard grew into a small-scale particle system driven by a physical simulation running on the gpu. I had a blast working out a Runge-Kutta integrator and some simple lens optics!
I made this freecell for my mom, who used to play religiously but couldn't find any simple, minimal versions online. My implementation owes its chassis and much of its polish to a Deck of Cards javascript library, which I overrode and extended to create the gameplay. I've included some aspects of progressive web apps like installability and a service worker for offline caching.
I built Waves for the Global Game Jam 2017. It's an expansion and variation on an existing threejs demo. No small part of the ~40 hours jamming time went towards creating the canvas/key control scheme and tuning the simulation for gameplay (there was a nasty energy leak from the input model). I stuck with pretty simple shader logic but I ended up happy with the look!
My friend Ethan Edwards and I collaborated on Robotanical for ProcJam 2016, although busy schedules left it in a somewhat unfinished state. The idea was to cultivate a virtual garden of plants grown by Lindenmayer systems and parsed into svg by a turtle renderer. The version here demonstrates the core functionality by implementing a few well-known L-systems.
Walk is an animation/experiment that attempts to fill a discretized grid by propagating a random(ish), non-self-intersecting path through it. Since the odds against that are pretty high, Walk is more like a movie of a computer painting itself into a corner over and over. Try changing the step pattern!
phenomenol
live project
phenomenol
I should probably explain the controls to you now. When I made Phenomenol back in 2014, I wanted it to be a sort of 3d line rider. There are two third-person points of view from which you can draw platforms in the space (mouse to draw, z to toggle pov). While in this drawing mode, you can control (using wasd) a marker that determines how far away from the camera the platforms will be placed. The idea is to place platforms so that the first-person character (wasd + mouse) can, by traversing them, collect the spinning cubes around the level. If you run out of platforms, don't worry; in first-person mode you can shoot (lmb) projectiles to collect/recall them. Last thing: those blue boxes on the ground in each corner will launch you into the air, which can be helpful. Phenomenol came out a tedious and unforgiving game, but if you approach it with patience it ~can~ be (strangely) compelling.
NB: Phenomenol was originally made in a much older version of unity, and rebuilding it for the post-flash era introduced some strangeness. Then again, it was pretty strange to begin with...
epr&d
live project
epr&d
For the Global Game Jam 2014, I teamed up with my friend Ethan Edwards to make EPR&D. There's always a theme for GGJ and in 2014 it was "We don't see things as they are, we see them as we are". I'd had this idea in my head for a while about a game whose mechanic only works when you can't see it work, and we decided to go with that.
NB: This is a rebuild of an old unity project and as such may have even more bugs than it did originally.