In a game this is likely done as simply a prerendered animated texture (atlas).
Perhaps in a modern AAA game you might try a GPU particle system with 10k+ particles.
Back in the days of the PS2, you’d just take a couple of long triangle strips, give them a twist or two, then UV-animate a static texture up through them.
awww, cool effect but I was half hoping for fluid dynamics simulation of the smoke with a lorenz fractal. What I've done is render the "smoke" to a framebuffer then apply some velocity to create some small vorticities.
Cool! But the title made me think that "cigarette smoke effect" made me think that it was about health issues, and I clicked because I was curious about how shaders could be related to that.
There is the smoke part - worth seeing, the shader part - well worth exploring (shaders make you see the world in a different way , then there is the learning part. The site is very interactive so it allows you to see one, do one and maybe teach one.
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).
I'm not sure you can say one behaves one way and the other not, surely depends on lots of variables.
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.
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:
As a very young person using an acquired copy of Photoshop with very little knowledge of graphic design, the Filter > Render > Clouds was something that I would never have guessed at just how useful and how often I would actually end up using it after many many hours in the chair.
Attention aspiring landlords: please consider how expensive it is to remediate a property after years of indoor nicotine use (let alone the health effects to adjoining units, if any). Do whatever you want inside your own house, I don't care.
—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.
16 comments
[ 15.3 ms ] story [ 1222 ms ] threadMany 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.
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.
IYKYK (but only if you lived in Finland in the 1990s)