TechNewsReel
Live

Karpathy uses Opus 5 to generate 5,500 lines of 3D code for Lord of the Rings scene

A new experiment with LLM-generated 3D worlds signals a shift from simple benchmarks to complex, ephemeral environments.

TechNewsReel Newsroom · August 2, 2026

Andrej Karpathy has demonstrated a significant leap in agentic engineering by using an LLM to procedurally render a literary scene into a 3D environment. The experiment marks a transition from basic generative tests toward the creation of complex, hyper-custom digital worlds.

Using the Opus 5 model, Karpathy tasked the AI with rendering the first paragraph of The Lord of the Rings into a 3D scene via Three.js. To achieve this, the model was provided with a 1 million token budget, costing approximately $10. The resulting output was a massive 5,500 lines of code designed to orchestrate polygon assets and animations to bring the text to life. According to Karpathy, the process took the model roughly two hours of execution time.

The shift to 'vibe coding'

This experiment represents a departure from traditional LLM benchmarks. Karpathy noted that the industry is moving past simple tests, such as asking a model to "create an svg of pelican on a bicycle," which has become a common baseline for SVG generation. Instead, this project highlights a move toward "vibe coding," where LLMs provide the stamina and patience required for tedious, high-volume coding tasks that human developers would typically avoid due to the sheer effort involved.

"LLMs have all the stamina and patience in the world," Karpathy stated, describing the shift from tasks that "no one would ever do" to those that are now viable because they are essentially free in terms of human labor.

Implications for personalized media

The ability to generate functional 3D worlds on demand suggests a future of personalized, ephemeral entertainment. If LLMs can reliably transform text into interactive environments, it could lead to the rise of "ephemeral GTAs" or immersive story worlds where users enter as characters. Such a capability could potentially disrupt the traditional model of centrally produced media from major studios by allowing for instant, user-driven world-building.

The perception bottleneck

Despite the success of the code generation, Karpathy identified a critical limitation in the current state of AI: the audit loop. He noted that LLMs currently struggle to verify their work in 3D or game environments because they cannot natively perceive video or live gameplay. Instead, they must rely on slow, screenshot-based feedback to understand if the rendered scene actually matches the intended vision. This gap in sensory perception remains a primary hurdle for fully autonomous game and world development.

Sources

Get a notification when a big story breaks. A few a day at most — no spam.