Monday, February 22, 2016

unity - How do I create this windblown snow effect?


How do I create this snowy wind kind of effect, where wisps of snow appear to blow through the air close to the ground?


I have seen this in several games like Skyrim, the new God of War, but I don't know what name to call it by.


Example of windblown snow visible against a cliff face Example of windblown snow visible against a cliff face


I found this God of war gameplay https://youtu.be/b7u59Iutb0c



Answer



Note: I have not used Unity yet, so here's my very high-level/conceptual answer:


Aside from simply spawning particles in a particular area/direction, it looks like Skyrim is using another technique where a semi-transparent "blown snow" texture is quickly scrolling across a flat mesh coming off the ground.



The mesh would be completely stationary, but the texture on it would be scrolling quickly in the direction of the wind. To make a texture scroll across a mesh without moving the mesh itself, just translate the vertices' UV coordinates over time. To make the effect repeat correctly, you'll have to set edge sampling of the texture to 'repeat' or the equivalent (if this is not already the default).


Also, since the mesh you'd be using would be 'paper thin' you may want to disable backface culling on the object in order to see the gust effect from both sides.


Final note: You may want to fade the effect out as it gets closer to the edges of the mesh, otherwise it may look like a cutout. This can be done via the mesh itself. Add extra vertices and triangles near the edges of the mesh, then set the color attributes on the outermost vertices to completely transparent.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...