Monday, December 3, 2012

Falling Snow

Until now, I didn't get much progress.  I only get the snow falling works partly.

The theory is simple. First generate random positions for snowflakes as well as scales. And then according to the depth of snow, calculate the alpha value of color. Essentially, a snowflake is just simple squares. What makes them look like snowflakes is the texture attached to the squares.

Although the method is simple, I encountered problems in the implementation. The biggest obstacle is that I am  a beginner for three.js library. Due to the fact that the three.js library is not complete yet, some tutorials codes even cannot run on my machine. I have to spend much time to fix it. That is exact the reason my snowflakes are still squares. I don't know why I could attach texture to the squares, although I did exactly as the tutorial. For the animation, as usual, I do it in the vertex shader.





No comments:

Post a Comment