Some time ago I came across some interesting post X:Rebirth – Geometric Lensflares by simonschreibt.de

In this post he described how X :Rebirth used vertex painting technics to create some lens flairs. Why is it interesting? Well because modern computers can do a great job in drawing triangles and geometry but they struggle a little bit while drawing textures. That is why you likely seen some bad texturing in games, or really poor texture quality on even highest settings – all these artifacts come from image compression. While textures can be beneficial on characters, props or assets, they can sometimes be not necessary on effects. Majority of effects in games are presented with simple shapes, like glow or streaks. If you try to use textures for effects you will find compression issues. Yes, the shape is simple but you need this simple shape in highest quality.

X: Rebirth team have faced this problem and they are decided to use vertex colouring for some effects. The only limitation they got was a triangle count. You see, if you want the best-looking effect possible you will be struggling with limitations. In case of textures, these limitations are compression, file size, and in the case of vertex paint – polycount of the model.

Each vertex has its own colour. Blender vertex paint

Triangle count is crucial for vertex paint. The colour in the model will be mathematically calculated from one vertex to another. It will be a gradient transition from one vertex to another, but you are bound with 1 colour per 1 vertex

So how to create effects using this vertex paint technics? It is actually pretty simple even if you are not artist at all. Yes, if you are pro in vertex painting you can create effects much more efficient (like they do it in X: Rebirth) but this is really time-consuming and I will discuss how to do everything semiautomatic.

If you dig down simonschreibt.de site, you will find another interesting vertex paint method used in Homeworld games. This idea of creating complex backgrounds entirely via vertex painting made me thinking about transferring some of my effects using blender.

So, Blender 3d nowadays has great features, but we need an old one. Blender 2.74 will be the best choice since newer blender does not support old types of baking. You also will need free plugin from chebhou Weight-and-Color (there is an option for you if you don’t want to use any plugin or old blender)

Load image in Blender 2.74 and duplicate model with your image. This model we will have to subdivide to pretty dense mesh.

Image uploaded as plane via an addon “Images as planes”

Subdivision surface used to subdivide mesh with simple subdivision

After that, you should add vertex colour to your h i-rez mesh so that baking tool will know where to put data.

Added vertex colour data

Baking parameters

Start the baking process by selecting your model with the image first and then select your hi-rez model. Go to baking tab and press Bake to Vertex color and press Selected to Active.

After the baking, you should see nice vertex colour bake on your model. You can create material for better visualization.

When baking is finished, press Space on your keyboard and type “weight & color “, use parameters: Vertex color to weight and color type: gray scale

Press space bar in object mode to get this menu

Now you need to add displacement modifier and use your newly created weight data as modifier determinator. What we just did is created heightmap based on your texture. We had to do this manipulation because blender uses some algorithms for decimating geometry. This way we tell blender that our geometry has shapes and blender will not treat our mesh as just a plane later on decimation process.

Displacement modifier

For clarity you can scale model down back to plane

It is time to add decimate modifier. This modifier will reduce t h e polycount of the model while keeping the overall shape. This step requires some manual tweaking.

Regular decimate

Decimate with determinator

After some tweaking and manual work, you can get pretty interesting results. For this example, I used some custom hi-rez model. I did here rough shape tracing with knife tool and then subdivide.

So this is how I get my vertex paint effects. You don’t need old blender or weight plugin for this. Everything can be done in modern blender, but there can be issues with displacement modifier if you try to use image as an input and you will not be able to use your determinator in decimation process.