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!
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).
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...
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:
[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.
lelandfe•1d ago
orphea•1d ago
wvbdmp•1d ago