Rail Simulator Vegetation - A closer look
Derek Siddle, the Lead Artist on Rail Simulator, gives us a detailed account on how the Art team has tackled Vegetation as 3D objects in our virtual world.
If there is one thing Rail Simulator has a lot of, it’s trees - hundreds of square miles of them in fact! In addition to the trees, bushes, hedges and grasses all needed to be modelled and then presented appropriately for the different seasons. Some interesting aspects of the design are described below.
Grass
For the grasses we came up with a procedural solution that is rendered to a set distance of around 50m from the users’ camera view, far enough that it blends into the scene and near enough so that it does not impact too heavily on performance. The user can also set the density of each grass type so that various effects can be achieved. The procedural grass is also affected by the wind speed so that in a storm the grass will blow around violently, while it will move gently on a breezy summer’s day. Every terrain texture has a grass type assigned and as the terrain textures blend so do the grasses so that there is never a hard edge between boundaries.
Trees, bushes and hedges
From an early stage it was important to get the right look for the trees as they take up a large amount of space on the screen and are present in nearly every frame.
We have 3 layers of trees, near, mid and far. The far trees are lofted tree lines and cut outs. The Mid distance trees are simple cruciform shapes made from interlocking polygons to give the tree a 3d form from all sides.
For the near trees, we initially tried using a hybrid of modelled branches and alpha textured leaves but the early tests were not very successful. To get anywhere near the visual quality we required meant removing our initial limits on both polygons and textures.
After exploring a number of different ideas we decided to go with forward facing or viewer facing polygons for the bulk of the foliage, while the trunk and branches are modelled polygons.
We had seen this work in a number of other products but the trick was achieving the same results using our own technology. Material shaders had to be modified and optimised to allow us to use so many viewer facing polygons.
There are two types of viewer facing materials in Rail Simulator, ‘view facing’ and ‘upright view facing’. View facing allows the polygon to face the camera no mater what the angle, while upright view facing locks the polygon in the Y axis so that it is only allowed to swivel around the vertical axis - this is used on smaller shrubs and weeds.
Once the technology was decided, the artists then gathered substantial photographic reference material. From these photographs we made a number of different branch textures so that the tree would have enough variation to prevent visual repetition, then finally these textures were optimized and combined into one texture.
The next stage was to make an alpha mask, where the artist cut out the leaf detail and created negative space, which helps give the tree depth.
Once the texture was completed it was mapped onto a number of different sized polygons, these were then offset around one of the branches of the tree, making sure that the visual illusion was not broken from any angle. Once one branch was created, it was only a matter of cloning and rotating the polygon set to make a suitable looking tree.
Levels of detail were made only once we were happy with the overall shape. A Stencil shadow volume was also added to help ground the tree to the terrain. These near trees are only placed within about 50 metres of a track, the near trees would then merge into a group of similar looking cruciform mid distance versions.
Once the team were happy with the summer versions of the foliage, the other seasons had to be created. We were able to use same geometry for each season, because we were only swapping the texture of the leaves.
Rail Simulator Team

