Hi all, I’m building a realistic driving game in three.js (6-DOF vehicle physics with slip-based tyres, runs from index.html with classic scripts). I have big plans for this once i can get the physics and visuals right. A large natural environment with roads through forests and deserts and mountains to drive along The part I’m stuck on is tire smoke.
In GTA V and The Crew, the smoke builds up inside the wheel arch, spills out around the tyre, and gets shot backward along the car’s side. Here’s an example of what I mean: https://www.youtube.com/watch?v=7abWV46tXJo
What I have now
- Instanced camera-facing sprites (
InstancedBufferGeometry) with a customShaderMaterial - A procedural flipbook atlas that animates over each puff’s life, broken up by drifting wisp noise
- Per-puff stretch along screen-space velocity (cheap motion blur) and sun lighting
- Soft particles: the scene renders to a render target with a depth texture, and puffs fade where they meet the road, tyres, or body
- Spawn points at the contact patch, on the back of the tyre, and inside the arch (about a third of puffs), plus invisible “occluder” shapes to hide puffs still inside the body
- Emission is driven by real tyre slip, and there’s a live settings panel (J) for amount, size, throw speed, lift, swirl and so on
What’s not working: it still doesn’t read as smoke filling the arch and pouring out. It looks like puffs drifting off the tyre instead of a mass of smoke being forced out and swept backward.
Questions
- How would you structure the emitter so smoke visibly collects in the arch and then ejects backward? Spawn volume, initial velocity, a pooling phase, or something else?
- Is a simple velocity field (e.g. curl noise plus a rearward bias from car speed) enough, or is it worth doing a small sim?
- Is there a cleaner way to hide puffs inside the body than occluder meshes and depth testing?
- Any tips on making smoke wrap around the wheel and body rather than passing through them?
I’ve built most of this with AI assistance and I’m not an experienced programmer, so explanations of the reasoning are appreciated as much as code. Happy to share more of the code or record a clip of the current result.
Download: https://buzzheavier.com/l7clox84p61e
GitHub: VXZYSRR (VXZYS) · GitHub
Thanks!
