Cigarette Smoke Effect Using Shaders
Posted3d agoActive1d ago
garden.bradwoods.iostory
informativeneutral
Game Prototyping3dDevelopment_tools
Key topics
Game Prototyping
3d
Development_tools
Cigarette Smoke Effect: Cigarette smoke effect using shaders
Snapshot generated from the HN discussion
Discussion Activity
Active discussionFirst comment
2h
Peak period
14
3-6h
Avg / period
3.7
Comment distribution26 data points
Loading chart...
Based on 26 loaded comments
Key moments
- 01Story posted
Jan 5, 2026 at 6:32 AM EST
3d ago
Step 01 - 02First comment
Jan 5, 2026 at 8:46 AM EST
2h after posting
Step 02 - 03Peak activity
14 comments in 3-6h
Hottest window of the conversation
Step 03 - 04Latest activity
Jan 7, 2026 at 6:41 AM EST
1d ago
Step 04
Generating AI Summary...
Analyzing up to 500 comments to identify key contributors and discussion patterns
ID: 46497589Type: storyLast synced: 1/5/2026, 7:30:51 PM
Want the full context?
Jump to the original sources
Read the primary article or dive into the live Hacker News thread when you're ready.
You could build this same set up in a particle system and then have convenient knobs (like physics) to turn on for higher quality instances.
With the right tech artist, this sort of shader is essentially what their job is. ShaderToy shows how much you can do with a quad and enthusiasm.
But I wonder if there's a way to combine both approaches? Like using smooth gradients for the base texture while applying some small-scale turbulent dynamics on top. It could add a nice touch of realism without going full-on simulation, which can get heavy on performance.
Also, have you found any tools or libraries that make working with these simulations more accessible? Sometimes it feels like there’s a barrier to entry with the math, but once you get it, the creative possibilities are endless!
Ooooo… we have smoke like it’s a 1930s billiards bar.
Here’s a few examples that use some fluid dynamics to make “smoke”
https://play.huwroberts.dev/advection/
https://www.shadertoy.com/view/DsKyWm
https://ghostinthecode.net/2016/08/17/fire.html
For fire, the import part is the flame, not the spark. It’s the same methods as above. Everything eventually lands on a 2D texture where you blur or blend it with the scene.
For smoke ribbons this works really well in screen space. For big plumes like mushroom clouds or physical clouds not so much. For those, volumetric SDF is the way to go with rayleigh marching and some gradient of grey.
Anyway, happy coding and enjoy playing with the rules of reality!
It works well in the image they use to demo it but the image shows a pipe where it actually looks right.
As an anecdote, I'm literally sitting with a lit cigarette in my hand right now, and the little smoke that comes from the cigarette itself, goes straight up.
How does it feel to be living my dream rn...
Many people are stuck in html land. I was. Webgl, threejs, @react-three/{fiber/drei} provide another dimension and shaders are the gateway.
Very highly recommended as a skill worth understanding (at least).
IYKYK (but only if you lived in Finland in the 1990s)
I did similar cigarette/ink-like smoke a few times in the VFX industry.
The first attempt was similar to yours using a grid: https://benhouston3d.com/siggraph/2005-2.html, but like yours it isn't that scalable (lots of memory and slow, but maps to GPUs well.)
The second approach, used in the Exocortex Slipstream VX plugin series, was much more efficient using "vortex method" thus not tied to a grid:
Demo video: https://vimeo.com/groups/slipstreamvx/videos/11901355
Harry Potter usage: https://benhouston3d.com/exocortex-intel-article-va10mag.pdf
Theory video: https://vimeo.com/69586020
The second method, vortices, can be mapped to GPUs via complex memory structures though:
https://vimeo.com/11928506
[1] https://www.damninteresting.com/ghoulish-acts-dastardly-deed...
—Property manager, currently renovating a decades-smoked unit — just absolutely disgusting (and the de-tar chemicals are harsh, while still requiring mechanical dislodging) — I've already suggested that a non-refundible $3,000 deposit become required, if nicotine indoors isn't outright-banned (I don't care about weed indoors — it doesn't leave behind yellow tar everywhere).
So glad that even after decades of minimal drug abuse, cigarettes were never one of my vices.