Here is a picture of a scene:
And there is a working demo:
Cool story of creation
There are 3 factors, why this scene was created:
- A symphonic metal song (this is the main factor, yes);
- That forum thread
Watching the video with the song, I’ve had a wish to create a flag, similar to one that shown in the video.
Okay, so far so good. The flag has to look worn out. How to do it? I remembered about that forum thread and decided to use
.alphaTest just to make sure that it really works (I didn’t get why the topic starter of that thread didn’t want to use
.alphaTest, so I thought it simply doesn’t work in the latest revision. Yeah, I know it sounds silly, but I thought exactly like that )
Great. Now the flag needs more or less natural behaviour under the influence of wind blowing. Shaders? Meh! Who needs them?! Let’s make the scene really heavy
metal computational! In the first results of the Google search, there was a link to that library, which allows to generate perlin or simplex noise from two or three values.
Excellent. The flag looks worn out and flaps on the wind. But the scene needs something else. Background. Let’s make it, using the same noise library. All goes to CPU, no GPU acceleration! So, the noise library has good examples of visualization of noise, drawing it on a canvas. Thus, it was not so difficult to adapt an example for using it with
And the final touch is to embed the video from Youtube
As usual, in Firefox, the video starts automatically, in Chrome, you have to hit “play” to start it
It’s very doubtful to use the approach with dynamic geometries of noise, computed on CPU, in real application. The only use case I see is to generate, for example, a geometry of random landscape once and then use it.
And… that’s all