166 points · by bhouston · 2w ago · 83 comments
I use hybrid techniques. I have a swarm of agents and external context where my plans are refined. This series of blog posts is extract from that refined external context. It is generally right as I have refined it over about two months now. Probably a hundreds of prompts and refinements. I am also a 30 year computer graphics veteran and the fifth largest contributor to three.js by commits of all time.
what i am saying is, an expressive scenegraph is just as important for what we call AAA quality as, recreating pipelined non-ubershader multipass deferred (modern) rendering
Babylon is great! If you like Babylon-react you may also like React three fiber, which is what Babylon-react was inspired by. I especially like the approach used by Babylon-lite. I would think a three-lite in the future would be amazing, but it is API breaking of course.
See 4 examples I posted yesterday: https://news.ycombinator.com/item?id=50514583
Without three.js the LLMs are more free to write whatever is appropriate for the specific project, instead of having to work around three.js:s architectural decisions when they don't match the thing being made. They further don't need any of three.s infra.
Whether or not those examples are AAA, they are proof IMO that the LLMs can do it without the libraries AND they can do it better without the shackles. Take the GTA like one above, the LLM split the city in 128 triangle chunks and culls them all on the GPU, taking inspiration from Nanite. Any feature you want they will happily recreate in 1 or 2 prompts. And no, you don't need any special knowledge. You just need to ask the LLM to optimize over a few prompts and it will figure out solutions.
I know people will jump to three.js defense because it's well loved and a great library. At the same time, so many people are acknowledging that so many libraries in general are no longer needed. See shopify getting rid of middleware because the LLM doesn't needed it: https://shopify.engineering/back-to-native
It's the same with 3d libraries and game engines. Epic sees the writing on the wall. They can tell that there's much less need for Unreal today than ever and while Unreal is great and provides a ton of tools etc, every day LLMs get better at reproducing all of it, meaning they can see it has a shelf life. I think the same is true of most of these graphics libraries and game engines from the last 15 years.
Who wants to re-write a glTF importer, a SSR algorithm, a UV unwrapped, a proper BRDF, etc. That can cost a lot of tokens. Might as well just bring that in and built on top of it your differentiator.
That said, inefficiencies in ThreeJS can come back to bite it long-term. It should aim to get simpler and faster.
I've written about this here: https://ben3d.ca/blog/coding-agents-underestimate-the-cost-o...
Disclaimer: not a 3d-specific comment though, more of my general experience.
I think Unreal is safe for a while just by virtue of having such an ungodly large amount of tools crammed into it that AAA studios actually using those tools are still better off starting from UE5 that their new hires already know than scratch, but for indies, the ship has already sailed imo and most people just haven't noticed yet.
For reference, my hobby graveyard has 20 years worth of crummy self-written game engines running the gamut from baby's first SFML C++ asteroids clone to raycasting vulkan monstrosities in pure Rust. I fed Kimi a list of crates I hand-picked and we planned the engine, then Deepseek Flash did all the work in a couple evenings. By the end of week 2, I had a fixed point deterministic physics engine, networking + client prediction + test suite ensuring determinism, an audio pipeline, immediate and retained mode GUIs, an editor build from them, a hybrid ECS, controller support, a custom hot-reloadable scripting language made to my exact specifications for prototyping, and a whole crate worth of integrations I told the AI it could build to help itself.
All the things I wanted, nothing I didn't, performance screams, all the gamedev parts and knobs and features work exactly the way I want them to. Best part is I actually own this engine and will never have to pay anyone else a dime to use it or beg devs not to do X/Y/Z. Total cost? 13% of a $10 OpenCode subscription's usage for the month. Total features I asked for that the AI could not provide: 0. I would literally never go back to using off the shelf stuff now
I kept scrolling through looking for the payoff and didn’t find it, lol, all the same, I appreciate the technical details and the effort behind that.
https://github.com/mrdoob/three.js/pull/34944 https://github.com/mrdoob/three.js/pull/34991 https://github.com/mrdoob/three.js/pull/35480 https://github.com/mrdoob/three.js/pull/35052 https://github.com/mrdoob/three.js/pull/35174 https://github.com/mrdoob/three.js/pull/35430 https://github.com/mrdoob/three.js/pull/35429 https://github.com/bhouston/three.js/pull/171
But the full payoff will be in a couple weeks time as everything lands and some of the more complex ones that tie everything together land.
Onward.
Technically it's Claude's work, at least for the blog parts.
That is an unsupported claim. For it to be ai psychosis it would have to be disconnected from reality and not work. But if it does work and it is grounded in reality, then it is just AI-assisted work.
People who write blogposts instead of handing them off to an llm? Are you listening to yourself? Go touch grass.
For me, I'm so used to reading AI tone/density now, it's fine. If I was looking for some deep heartfelt sentiment on Three.js and the community, then maybe then pure human authorship would be heralded.
Anyways, I'm building a Golang game engine. I've built these several times before over 30 years and the state-of-the-art changes and I only kept up with things that were relevant to my domain, such a data visualization and representations like Gaussian Splatting
So I loved seeing this. Yes, I read it with my eyes to learn. Then I told an LLM to read it and explore what would fold well into my engine. It helped fill holes in my knowledge (GI, SSR), as I'm not in the industry and not making scenes. So, Ben, despite the downvotes, keep building and sharing as there are people who will appreciate your manifestations.
- How do you do translucency? Depth sort and painter's algorithm in the CPU, order independent transparency in the GPU, or something else?
- How do are large scenes lit and shadowed without a cost of O(objects x lights)? This is where you tend to need access to a scene graph.
While a fun technical challenge, in games you just render translucency last and back to front. You can add some distortion when you render it by reading the beauty.
ThreeJS supports OIT but it costs a lot and unless you are doing specialty visualization, it isn't worth it: https://threejs.org/examples/?q=transp#webgpu_oit
> How do are large scenes lit and shadowed without a cost of O(objects x lights)?
I guess you could do clustered forward lighting. That can be added on top of this work. There is some work on that in ThreeJS.
I am proposing in this work to do light baking for GI, and then normal lights at run-time. I am not actually specifying how you do your GI bake (Ray Radiosity is the best engine in ThreeJS right now) or how you do your run-time lights.
Those are orthogonal to the design of this lighting pipeline.
The complement of deferred rendering is not ray tracing. Since you don’t put effort into your posts I will stop here.
but as a "goal" maybe regular deferred isnt the best target
BTW ray tracing and g buffers are orthogonal to each other. I see some comments thinking they contradict each other.
I thought I had the slightest idea about Three.js and computer graphics until this post burst that bubble!
If you intend no-one to use what you built except for LLMs, this is fine. If you intend for humans to read it and if you value your ideas in the context of other humans, you can't drop 15 pages of generated material. You can be a Nobel laureate and I will still feel like the text is a massive waste of time because I can't know if you even read it yourself.
This is a plan for moving ThreeJS towards this new pipeline. It isn't intended for teaching new people how to use ThreeJS in this area, rather it is a detailed and specific implementation plan, intended to be read by fellow computer graphics people, with justifications, that is half way towards being realized. It isn't intended for ThreeJS users to actually use this plan. It is intended to talk to other ThreeJS contributors/maintainers and other 3D experts so they can understand what is being done, and why. So that people can make sense of the stream of PRs I have been submitting.
I don't understand at all people who are immediately surrendering their entire voice, personality, audience, credibility, etc. to Claude? I mean at this point why not just rename the entire site to "Claude's Blog" and tell it to adopt the persona of a Graphics Developer and "Write a post a day".
Other people think of a blog more like substack or poetry where the whole point is to read what a human wrote.
A blog is the unedited voice of a person.
The lack of editing is central, because it's one person who's responsible for every word. When you click the Publish button you should feel butterflies, at least sometimes, because there's no one to pass the buck to. If someone else wrote the headline, or did a copy edit, or even reviewed what you wrote and critiqued it before it went out, it's still writing, but it is not a blog.
AI assistance is not the high order bit in whether something is a quality piece of work. Anyone saying otherwise is either blinded by ideology or a lacks real world experience with professionals using AI.
Neat article. My one comment in all of this is that so much of what makes AAA games and game engines is in the application of much more than just graphics themselves (and very often the graphics of AAA games are "understood" by the time they come out as to be technically uninteresting). And then there is all the texture work and dramatization done by the art department. The title in the article is a better reflection (ahrem) of the subject matter.
Not anti-AI on code, but LLMs are really not good at clear writing, and they are not getting better, so please write your own words if you wish to be heard, even if you feel they are clumsy or if you feel you are "not a good writer."
And even though it may feel like it is a waste of time, or that it can be done quicker with an LLM, the life returns are really high to you to have an audience knowing who you are and how you think about problems, and you're not going to get that with an LLM, so there's no point to writing about it at all if you're not going to be authentic.
I have written introductions to new features when they have landed, such as this https://ben3d.ca/blog/how-to-use-threejs-native-gaussian-spl..., but this current project is more of a technical justification, tracker, and guide for a major reworking of how ThreeJS does interior rendering that is in-progress. It is more for 3D nerds and ThreeJS contributors/maintainers so that they can understand the larger perspective behind the PRs I am submitting.
Ben already has that. I think he's perfectly justified in using AI assistance in this project.
This matches general AI supported work. We have the result but no idea how we got there and nobody learned anything valuable along the way. Shareholders never cared anyway so that's that done with.
So are compatibility, politics and maintainability the things that differentiate 'slop' from 'not slop' now?
Slop has no gravity - why would I use your slop, when I can create mine?
Hmm... Since spring, I have contributed Gaussian splats, uv unwrapping, and the light baker and much of material x support as well as ~70 other PRs. I am the fifth largest contributor by commits to threejs. I have contributed since 2012.
> this is almost pure slop and you may as well have just posted the prompt you used to generate it instead
The blog posts references dozens of PRs that I have made, many of which are accepted. It isn't just a random plan created by a single prompt but over 400 hrs of focused work. It was distilled by AI true, but it is a large project that is hard to keep track otherwise for one person. I have to jump from the high level plan down to specific implementation details, profiling, and memory usage while maintain backwards compatibility in each of these PRs to get them accepted.
if that changes, the biggest blockers to AAA use of three.js, for agents and humans alike, are the documentation and test holes for best practices and footguns in its existing features
there are outstanding requests for just examples, documentation, and/or test coverage of SSR, GI, reflection, Gaussian splats, virtual textures, multi-canvas rendering, lighting, even TSL (happy 2nd birthday, #29829)
it'd be a lot easier to stomach scope-creeping three.js out of its founding principles if that process included bringing support for already implemented table-stakes AAA features up to AAA level. and whatever benefits vibe-coding, or even measured use of AI to improve PRs, can bring to the codebase, they aren't going to be as effective in improving the already strained support and docs for those advanced features
It is quite possible in the way I outline in the post. I have everything prototyped and working, it is mostly just about getting it into ThreeJS in an incremental way that also respects maintainers wishes. It really isn't that much code, mostly reworking what ThreeJS has and replacing the parts that are problematic.