[Experiment] Grass with wind in Flyff

04/27/2019 19:51 Loicator2#1
I'm currently making some experiments to improve the visual feel of Flyff.

The idea with grass is to generate it from the alpha component of the ground_lawn001.dds terrain texture layer. I use the new OpenGL render engine made for FlyForFun.io ([Only registered and activated users can see links. Click Here To Register...]).

Here is the first version, we simply draw a static grass mesh:


To provide full support for GLES2/WebGL1 we do kind of "batch" rendering: we set the render states once and then call n times glDrawElements, but we could easily integrate hardware instancing.

Then we add a wind simulator to the skybox, computing a global wind direction we use to translate sky clouds and deform grass. We also add some random vegetation elements. This version will be probably added as an option in a future public release of the project:


If you never tried FlyForFun.io you can also see in action the shadow mapping working better than the faked one in the original game.

Next step is to affect more things with the wind like rain and trees (we need to create a skeleton and deform it). We could also add some fake volumetric clouds moving with the wind.

What do you think about it? :D