I’ve been working on a car simulator in HTML (three.js, no build step), and the part I’m stuck on is tire smoke.
In GTA V and The Crew, the smoke pools in the wheel arch and gets shot backward along the car. I can’t get that pooling-then-ejecting behavior. Mine mostly drifts off the tyre.
What I have for the smoke so far
- Emission driven by actual tyre slip
- Instanced sprites with an animated flipbook atlas
- Soft particles, using a depth texture so puffs fade where they meet the road or body
- Spawn points at the contact patch, the back of the tyre, and inside the wheel arch
- Occluder shapes to hide puffs that are inside the body
- A live settings panel (press J) for tweaking size, speed, lift and so on
The rest of the game
- 6-DOF rigid body physics at 240 Hz, with independent suspension and tyre contacts, a slip-based tyre model, an LSD rear diff and a gearbox
- Ambient occlusion and bloom, a night mode, and one car (a McLaren F1)
- WASD to drive, Space for the handbrake, drag to orbit the camera, R to reset
Most of this isn’t in its final form and I’ll keep improving it. I have big plans for it: large scenic natural environments you can explore, a quick wheel menu, and plenty more.
I’ve been building it mostly with Claude. I’m not much of a coder, but I really enjoy making things. If you have feedback of any kind, I’d appreciate it, and I’d especially love to hear how you’d approach the smoke. Pointers on emitter setup, velocity or flow behavior, or how to keep puffs from clipping through the body would all help.
Download (opens from index.html, no server needed): https://buzzheavier.com/l7clox84p61e?lang=en
GitHub: VXZYSRR (VXZYS) · GitHub
