<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw" -->

---
title: Rayshader 1.0: Exit the Matrix | daily.dev
description: Rayshader 1.0 caches a scene's spatial metadata (heightmap, extent, CRS, zscale), so you no longer pass them to every call. Terrain can stay a spatial raster,...
canonical: https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Rayshader 1.0: Exit the Matrix | daily.dev
og:description: Rayshader 1.0 caches a scene's spatial metadata (heightmap, extent, CRS, zscale), so you no longer pass them to every call. Terrain can stay a spatial raster,...
og:url: https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw
og:image: https://api.daily.dev/og/posts/mJ4jyWhAW.png
og:image:alt: Rayshader 1.0: Exit the Matrix
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rayshader 1.0: Exit the Matrix

**[Hacker News](https://daily.dev/sources/hn)** · 32 min read · 0 upvotes · 0 comments

## Summary

Rayshader 1.0 caches a scene's spatial metadata (heightmap, extent, CRS, zscale), so you no longer pass them to every call. Terrain can stay a spatial raster, and roads, buildings and water can go in as spatial lines and polygons that are transformed and cropped automatically. New features include flexible lake and stream rendering, roads with lane markings and 3D interchanges solved under default rules of 14-foot clearance and 7% grade that users can customize, and low-poly human models at about 6 feet tall. plot_gg() now adds real 3D geometry on a ggplot base. Other additions are haze and radiance shading and Earth curvature.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.tylermw.com/posts/rayverse/rayshader-1-0-exit-the-matrix.html>

## Questions this post answers

### How do I add roads and buildings to a rayshader 3D map without manually transforming coordinates?

In rayshader 1.0, the scene caches the heightmap, extent, CRS, and zscale from the terrain, so spatial lines and polygons can be passed directly to render_*() functions. A road stays an sf line and is converted to the right coordinate system; buildings stay polygons and are cropped to the map's extent automatically.

_Developers mapping geospatial data in R can follow rayshader and the wider rayverse on daily.dev._

### How does rayshader 1.0 model 3D road overpasses and interchanges from OpenStreetMap data?

It uses OpenStreetMap's layer ordering to know which road crosses over which, then solves road elevations with constraints: crossing surfaces at least 14 feet apart, grades limited to 7%, and roads kept near the ground otherwise. Each connected region becomes a sparse quadratic problem built with igraph, sf, Matrix and osqp.

_If you build maps or spatial pipelines in R, daily.dev helps you keep up with tools like this._

### Can rayshader render separate lakes at different elevations instead of one global water level?

Yes. Rayshader 1.0's render_water() accepts a raster or polygon at any elevation and places it using the terrain stored in the scene. Methods include raster, polygon (default) and optimized, which fits a closed shoreline to the terrain mesh. The old single-level behavior remains as water_render_method = "legacy".

_Staying current on R visualization packages is easier when you follow them on daily.dev._

## Community take

How the wider developer community reacted, aggregated from 1 discussion and 14 comments across hackernews (as of 2026-11-28).

**TL;DR:** Commenters are largely impressed with the craftsmanship and visual quality of the release, with congratulations and praise for the roads/terrain solver, though a vocal thread debates whether such libraries are still necessary given LLMs can now generate similar 3D scenes.

**Sentiment:** 65% positive · 20% mixed · 15% skeptical

**The case for**

- The attention to detail and visual polish (roads, terrain, beauty) stands out compared to typical outputs.
- A library with sane defaults can save time versus prompting an LLM to recreate the same functionality from scratch.
- One builder working on a similar geospatial-to-3D pipeline found the write-up genuinely useful and plans to borrow some solutions.

**The pushback**

- Some question why anyone would use this when an LLM could one-shot a similar scene in ThreeJS or Raylib.
- Bundling a large R library stack feels unnecessary for simple one-off visualizations that only need to look right from one camera angle.
- A demo page had a poor loading experience on mobile, including shader compile stalls and a context-lost error.

**By community**

- hackernews (mixed): Praise for the craftsmanship and usefulness of the release is mixed with a pointed debate about whether LLMs make such purpose-built libraries obsolete.

**Hottest debate:** Whether hand-crafted libraries like this still matter when LLMs can reportedly one-shot similar 3D visualizations.

**Open questions**

- Whether USGS 3DEP lidar point clouds could be used to set elevated roadway heights, similar to another builder's approach.
- Whether the road interchange solver can be improved to handle ramps joining up more reliably.

**Highlights**

> LLMs are great at data ingestion, but far less reliable at creating beautiful output. Tools like rayshader cut down the model’s creative degrees of freedom, which is exactly what it needs to get good artistic results consistently. And you don’t have to bundle those libraries with the output. They’re what you use to generate it. You could probably one-shot a convincing terrain demo. forge3d (https://github.com/milos-agathon/forge3d) is already an attempt to vibe-code a Python recreation of rayshader. Getting to parity means recreating or integrating the whole spatial data stack, from projections and raster alignment to vector overlays, meshing, and 3D rendering. That gets complicated fast once you start throwing real data at it. The repo’s commit history gives you a sense of what “vibe-coding rayshader” actually entails. Separately, the roads in rayshader generally look good out of the box. They don’t have to be perfect to be useful.
> — [tylermw on hackernews](https://news.ycombinator.com/item?id=50672400)

> Why spend the money and time waiting for the LLM to stumble its way through a shoddy implementation you have to deslop when you can use a library that already has sane defaults? I'm curious how it'd go for you if you wanted your roads to look halfway decent from the available data without essentially replicating this package. Seems a false dilemma to me when you could point the LLM at a library and get your desired output in minutes rather than hours (and potentially improve the library for folks if it doesn't produce your intended result exactly).
> — [striking on hackernews · 1 comments](https://news.ycombinator.com/item?id=50671892)

> The author admits the real time sink is still data prep ("loading geospatial data is always a pain. Nothing I can do about that!") and that the road solver still need work, so pointing an LLM at the library doesn't solve everything either. Also a library has to solve the general case while a one-off deliverable only has to look right from one camera angle. If the goal is visualizations on a website that are supposed to grab a viewers attention or explain something, it doesn't make sense to bundle together 250MB of R-libs IMO.
> — [augment\_me on hackernews · 1 comments](https://news.ycombinator.com/item?id=50672080)

> This is super cool, congratulations on 1.0! I've been building something similar with https://worldkit.build. It's a pipeline that turns OpenStreetMap, USGS elevation and lidar data from the U.S. Geological Survey into an open world game in Godot (starting with San Francisco). I then use LLMs to model individual buildings, which was pretty successful in a previous project https://grandtreasureisland.vercel.app. Your detailed write-up is very helpful. I encountered similar problems with interchanges, ramps and water level, and I may end up borrowing some of your solutions. ;-) One question: have you tried using USGS 3DEP lidar point clouds for roads as well? I use them to set the height of elevated freeways in downtown San Francisco. I still haven't got the ramps to join up nicely, which is where your solver comes in.
> — [phpp on hackernews · 1 comments](https://news.ycombinator.com/item?id=50671878)

> Neat! The loading process was… not good though, on an iPhone. You need to add some progress bars. I have a fast connection but it just hangs around compiling shaders for a long time not giving you an idea of how long that will take and then I got hit with “gl context lost please refresh page” error prompt and then I did and it loaded much faster but then force reset the page near the end of loading and then did it all over again. Finally, I was dropped into the game (which looks and feels good)
> — [allthetime on hackernews](https://news.ycombinator.com/item?id=50673911)

**Source threads**

- [hackernews](https://news.ycombinator.com/item?id=50667371) · 104 points · 14 comments

## Similar posts on daily.dev

- [On Rendering the Sky, Sunsets, and Planets](https://daily.dev/posts/on-rendering-the-sky-sunsets-and-planets-d0iudopxi) · Hacker News · 0 upvotes · 0 comments
- [Custom Godot Shader Deforming Objects According to Terrain](https://daily.dev/posts/custom-godot-shader-deforming-objects-according-to-terrain-zf6me3jgr) · 80 LEVEL · 3 upvotes · 0 comments
- [Graphics Programming weekly - Issue 451 - August 16th, 2026](https://daily.dev/posts/graphics-programming-weekly---issue-451---august-16th-2026-db3ym93vp) · Jendrik Illner · 0 upvotes · 0 comments
- [From Flat to Spatial: Creating a 3D Product Grid with React Three Fiber](https://daily.dev/posts/from-flat-to-spatial-creating-a-3d-product-grid-with-react-three-fiber-sstsygdip) · Codrops · 1 upvotes · 0 comments

---

Tags: [#r](https://daily.dev/tags/r), [#data-visualization](https://daily.dev/tags/data-visualization)

[View this post on daily.dev](https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Rayshader 1.0: Exit the Matrix","url":"https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw"},"datePublished":"2026-11-27T22:49:58.011Z","dateModified":"2026-11-28T06:20:38.039Z","description":"Rayshader 1.0 caches a scene's spatial metadata (heightmap, extent, CRS, zscale), so you no longer pass them to every call. Terrain can stay a spatial raster,...","image":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","thumbnailUrl":"https://media.daily.dev/image/upload/s--2-1xRawN--/f_auto/v1722860399/public/Placeholder%2011","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"r,data-visualization","timeRequired":"PT32M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Rayshader 1.0: Exit the Matrix"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/rayshader-1-0-exit-the-matrix-mj4jywhaw#faq","mainEntity":[{"@type":"Question","name":"How do I add roads and buildings to a rayshader 3D map without manually transforming coordinates?","acceptedAnswer":{"@type":"Answer","text":"In rayshader 1.0, the scene caches the heightmap, extent, CRS, and zscale from the terrain, so spatial lines and polygons can be passed directly to render_*() functions. A road stays an sf line and is converted to the right coordinate system; buildings stay polygons and are cropped to the map's extent automatically. Developers mapping geospatial data in R can follow rayshader and the wider rayverse on daily.dev."}},{"@type":"Question","name":"How does rayshader 1.0 model 3D road overpasses and interchanges from OpenStreetMap data?","acceptedAnswer":{"@type":"Answer","text":"It uses OpenStreetMap's layer ordering to know which road crosses over which, then solves road elevations with constraints: crossing surfaces at least 14 feet apart, grades limited to 7%, and roads kept near the ground otherwise. Each connected region becomes a sparse quadratic problem built with igraph, sf, Matrix and osqp. If you build maps or spatial pipelines in R, daily.dev helps you keep up with tools like this."}},{"@type":"Question","name":"Can rayshader render separate lakes at different elevations instead of one global water level?","acceptedAnswer":{"@type":"Answer","text":"Yes. Rayshader 1.0's render_water() accepts a raster or polygon at any elevation and places it using the terrain stored in the scene. Methods include raster, polygon (default) and optimized, which fits a closed shoreline to the terrain mesh. The old single-level behavior remains as water_render_method = \"legacy\". Staying current on R visualization packages is easier when you follow them on daily.dev."}}]}
```

