Here’s a tricky problem; How can you write a vertex shader that will give a reasonable simulation of wind on any plant mesh? It’s easy to move vertices around, but much harder to make it look good. When there are millions of instances of grass, they need to be drawn as fast as possible, so it needs to be very compact and efficient. Any ideas?
If you have played Crysis, that is the effect I am going for.
Did not see crysis, but an idea :
animated 2d (horizontal) luminance noise (so it is almost a 3d noise) with scrolling. White move the foliage in the wind direction, black does not move, and greys are in between.
The animated 2d noise can be just precalculated as a couple of noise textures being dynamically interpolated.
GPU Gems 3 has an article from a Crytek guy, that explains how they do it. Basically you modulate the vertex-position with different functions and they weights, which function to apply how much, are stored in the mesh and thus artists can define the behaviour of the plants differently for leafs, branches, trunks etc.
GPU Gems 3 has an article from a Crytek guy, that explains how they do it. Basically you modulate the vertex-position with different functions and they weights, which function to apply how much, are stored in the mesh and thus artists can define the behaviour of the plants differently for leafs, branches, trunks etc.
I figured there was something like that going on, but how the heck does an artist control that?