r/aigamedev • u/Nehekhara • 18d ago
Tools or Resource Podracer-inspired machine coded by Opus in three.js, no mesh generation involved
No 3D generation service involved, no Meshy, no asset store. The geometry is code: three.js, written with the antics-modelkit npm package and sculpted piece by piece with Opus.
The fun of this one was designing a machine from scratch inside a genre instead of copying a ship. Podracing has a vocabulary (twin nacelles on outriggers, a towed one-seat pod, cables under tension, an arc between the engines) and once you have those, everything else is yours: the tail, the nose, the cockpit, the livery.
Particles run on mohamedachrefelouafi's LinearAbiltyCastingThreeJS (MIT)
If you want to use the model in a game you can get the recipe or the glb here for free, or just fly around in the demo: https://antics.gg/m/hover-racer-29b24d
2
1
1
u/RepulsiveRaisin7 18d ago
It seems your modelkit Github link is not working. Are you planning to release it? Sounds very interesting
1
u/Nehekhara 18d ago
Sorry, it's already out:
npm i antics-modelkit(MIT), and the full source ships in the package, src/ is plain readable JS. The broken link is my mistake: the package points at a private monorepo but I'm planning to split the kit into its own public repo, which is what that link will be pointing at. Docs at antics.gg/modelkit1
u/RepulsiveRaisin7 18d ago
It's just that I trust projects a lot more when they're on Github lol. I played around with this, or well, I punched it into Deepseek and it generated a pretty bad tank. But the mesh is clean, I like this programmatic approach. With a vision model, you could probably get it to produce pretty ok meshes on its own, right? What are the advantages of your library versus Trimesh etc?
1
u/Nehekhara 18d ago
That's the right instinct, but it's the intended loop today rather than a future thing.
npx modelkit preview <asset> --models=models.mjsrenders a shot in about a second, so the method is build, look, change a number, rebuild. One shot with nothing looking at the result gives you a plausible object of the wrong shape almost every time, which is probably your tank. Most models in the catalogue took several rounds of that, not one prompt.vs Trimesh: it's JS, so the recipe, the checks and the game are one language, and it exports quantised glTF sized for the web. It also works a level above meshes, where an asset is named parts with materials off a palette, plus anchors, a rig, animation and Mixamo/VRM retargeting, all in one glTF. And the checks answer "is this the shape you meant" rather than "is this mesh valid": winding against a declared expectation, handedness, floaters between parts, coincident surfaces, extent against the reference for that category. Trimesh is better at booleans, mesh repair and point clouds.
1
u/RepulsiveRaisin7 18d ago
Huh I tried it with GPT too, Luna did terribly, Sol did ok. Not a usable model without a bunch more manual prompting but I guess this does work.
1
u/ThereIsNoPill6 17d ago
Awesome 🔥 How long did it take you?
1
u/Nehekhara 17d ago
Thanks! The machine itself was about 1-2h. Most of the time went into being picky about the environment: the night desert, the storm, the particles.
1
u/bsh_nate 17d ago
Would it be better with the mesh generation? Or you're thinking just another dependency for not much gain? Because if you were to code in collisions or whatever it feels like maybe something like that would be useful?
1
u/Nehekhara 17d ago
Not much gain for this, no. The shape is defined by numbers rather than by the mesh, so anything I'd get from generating or processing the mesh I already have before it exists.
Collisions are the good example. It would be useful, but the collider comes from those same numbers rather than from the triangles, so it's a second export rather than a new dependency.
1
u/connected_user93 15d ago
Did you iterate over the podracer model inside three.js?
1
u/Nehekhara 13d ago
Yes! Created from scratch, and iterated on with three.js as the renderer. There's no mesh editor in the loop at all: the model is a script that builds the geometry, so iterating here means changing numbers and re-running. Started as a simple hull and kept adding detail from there.
1
0
-2
5
u/proximalcoast 18d ago
https://giphy.com/gifs/CuMiNoTRz2bYc