"Smoke" usually just drifts by and disappears quickly, so I couldn't really imagine recreating that movement with code.
But I found a YouTube video that simply showed how to create smoke movement with code, and it was strangely fun.
Today I'll casually explain this "Smoke Simulation" story.
So how do you program smoke movement?
Smoke sways along with the air flow, right? To teach that to a computer, you need to mathematically express air flow (fluid dynamics).
In the video, probably...
- They treat things like air "velocity" and "pressure" as numbers
- They calculate small changes over time
- That's why it looks like smoke is moving
That's how it seems to work.
I was more surprised than I expected that there are such clearly defined "rules for making things move."
The secret behind that "fluffy feeling" seen in the video
When you watch the video, there are moments when the smoke looks really natural, right? That's because...
The program carefully adjusts "smoke density" and "flow speed" to get closer to realism, apparently.
Smoke density is expressed through "color transparency," and how it gets lighter or darker contributes to that fluffy feeling.
Also, the key is that smoke movement isn't random but properly follows "air flow."
Programming is hard, but just watching is fun too
Honestly, watching this video, imagining "how do they create that movement from here?" was super fun.
I still don't understand the specialized formulas, but just realizing "there's logic to smoke movement" was a big discovery.
If anyone's interested in programming, watching videos like this first might make it easier to visualize, I thought.
In summary...
- Smoke simulation mathematically represents "air flow"
- Both movement and density are calculated in detail to recreate natural smoke
- Even without specialized knowledge, you can enjoy just watching and it broadens your imagination
Programming seems difficult, but this "watch and enjoy" approach is also valid, I realized.
Comments
リリー
あの人、頭良すぎる。
ベン
これ、ここ数年で一番すごい投稿かも。
ハンナ
これ見てると開発辞めたくなるわ。












