Home Rush Rally 3 Rush Rally Origins Blog Portfolio About Terms

Terrain Materials

With the addition of the new mesh generation features, it was now time to make the rendering of the terrain to the next level up from Rush Rally 3. To do this I decided that the I would do most of the work through Terrain Editor, as it is easier and faster to work in. It's all well and good having a mesh generated that can be used in game, but that this only half of the problem. The main issue going forward from here is to make it look pretty and part of the game.

I decided that we would now encode the ability to splat materials onto certain parts of the terrain, thus making the terrain much more interesting, we basically encode a material on each triangle and then the code splits up the mesh based on these materials into separate sub sections (Roads, Rocks, water for example). From here it then splits up even more based on the actual textures used. This means we can make a terrain that is now covered in loads of materials. Of course we have to be careful because even though a modern day PC can handle this, a mobile phone will likely struggle so we still need to be careful when authoring the tracks.

The first thing to do was to allow the terrain editor to show us all the different versions of the data. For this we now allow us to show details about the generated mesh, the collision mesh used in game and the main renderable mesh. This makes debugging the procedural system much easier. We create the actual renderable that is used in game so we can see exactly how the final effect will look.

Even though this all looks to be one single mesh, it is all created based on the mesh being split into parts. Again we can now debug this from the terrain editor to see what is happening more at the code level. We have the ability to see all the different parts and how they fit together. Not only this, we have an option to show any "overlapping" parts. These are considered expensive because they require more gpu power to render, again modern PCs will have no trouble with this, however mobile phones we need to always be careful with.

The following screen shots show some simple parts rendering. The first is just the terrain. The second is the terrain with the rocks, the third shows all the parts with the overlapping shown in red.