In this year's GDC found a very interesting speech, called Animating with Math, then realized, is to tell the vertex shader animation, a few classic examples, but the speaker did not give the code, but like Unreal engine node, so more clear
Before the blogger realized the water fluctuation algorithm through the vertex shader:
Unity3d to make his own water water effect (ii)
Vertex shader animations can reduce the overhead of animations and reduce the number of joint joint
The first examples are simple enough to start
About vertex color is a custom map that controls the various parameters that are described below
The next example is the "contraction" of a monster, which resembles a bubble-boiling, concave and convex dynamic effect.
The blue channel is the phase of the COS function, which controls the "time difference" of the bump action and the root cause of the boiling effect.
Red channel controls overall shrink size (degree)
The number of control phase variables can be added by adding channels to increase the variety and complexity of the bump effect
Examples of Unreal engines
The effect is as follows:
The next is the blogger favorite one effect, to achieve the wind fluttering hair, the effect of praise
Before in 14 siggraph Bungie Ta spoke the hair also spoke of this effect, called hair in DESTINY
A noise is added here, and the blogger is implemented by a blurred (for effect smoothing) noise map
As in the previous example,
Red channel: Flare intensity
Blue channel: Phase difference
The effect of the lovely Sierra sauce is as follows:
Strong flapping:
Slight flare
You can also use the map to achieve the overall change, can be used to simulate animation, animation and so on
The next example is to simulate the elasticity of a rope
Control amplitude by looseness and wire slack two variables
Implementation results:
There is no rope model at hand, and casually find a stone model stretched instead of ....
And then the last thing that really matters is spinning.
By multiplying each vertex with the following to rotate the object, the basic knowledge, do not know the quick to go to the evil complement mathematics
The implementation results are as follows:
Blogger's recent renderings:
Recent renderings
----by wolf96
Unity3d implementing Vertex animations