The art of fake volumetrics - or how to make fluffy red pandas

Most objects in games tend to be kinda flat. The reason is that all objects in games consists of triangles and each triangle takes some time to display on the screen, so you should use as few of them as possible. But what if you need to display something that's not a flat surface, such as hair or smoke? Then you need to use a trick, which I don't think has a name, but we can call it fake volumetrics (I've heard the name "quad stacks" or "shells"). This is how it works:

Let's say you want to make a fluffy red panda:


This panda is flat, while real red pandas tend to be fluffy. To make it less flat you need to fake fur because you cant make each fur straw because it's way too complicated for games. You do this by rendering the panda multiple times, and each time you grow the size of the panda by making the mesh larger along the normals of each triangle. This is done step-by-step around 10 times. Each step you also change the transparency of the fur, so fur closer to the body is less transparent than the fur furthest away from the body. You now get a fluffy panda:


To avoid getting fur in the eyes and the nose you can simply use a texture telling the algorithm not to grow the triangles around the eyes and the nose.

With the same technique, you can make fake volumetric smoke/fog. You begin with a simple plane at the bottom, and then you add multiple planes on the top of the original planes while changing the transparency the higher up you are. And you end up with this:


If you need a better explanation of how to make fake volumetric smoke, you can watch this YouTube video: UE4 VFX For Games: Brute Force Volumetric Gases - Ground Fog & Vapor. The problem with this technique is that if you zoom in really close, you can see the individual fog planes:


To avoid this you can either add more planes, or make sure the player is staying far enough away from the smoke!

Comments