Monday, 14 December 2015

How we handle terrain dressing

Terrain dressing is what we call the sprites which appear on the surface of the terrains where the cars can drive.

We create groups of terrain dressing objects, for instance one group for trees, one for bushes, one for foregroud bushes. These are stored in a .asset ScriptableObject database.
Each group contains a lot of parameters which determine how the dressing is generated.
These include horizontal spacing, offset ranges in Z (to create parallax) or Y (clouds, for instance), and scale ranges.
There's also a Max Slope Angle which determines what slope the objects should appear on. We don't want trees on steep slopes, but bushes can go there fine.

Added on to this is a script which is called per-object. I derive classes from a base Dressing Base script. When being placed, all DressingBase scripts are called in the object's hierarchy.

The two in use here are DressingPlacement and DressingColor.
DressingPlacement decides whether the object should take the angle of the surface (eg. for bushes) or not (eg. for trees). Also there's a random range which is added to the rotation of the object.
DressingColor simply modifies the color of various parts of the object randomly for variety.

When AutoUpdate is set on the terrain script, we can adjust the variables in the groups database and see the result in realtime in the editor.

Once we have a set of groups in place, and have decided how we want the particular game to look, we can duplicate the groups for other types of terrain.

Here we have 3 more terrains which are basically the same as the first one we made, with a few groups duplicated and modified:

Visit our Facebook page for the latest updates!

1 comment:

  1. For every internet user, all the instruments of this world are of great importance. While the number of internet sites, game sites, news sites and much more have turned into really attractive places in this sense, the number of people using the internet for entertainment purposes is not small at all. Because of this, teenagers and children can enter play sites in their free time and be adventurous with the sweetest characters. These characters, which are very famous and so sympathetic, also take part in friv games. In the world there are sites that collect such games under one roof and offer the best quality options to the players, as well as that offers the best games with the variety of services and offers that they provide within these sites. All the game options in this adress are made up of serious and impressive games.
    Players who enter the site with the friv plus option, which attracts all the attention, enjoy playing games. Especially when the most sympathetic characters are chosen and the adventure is a great pleasure, the situation also tastes different emotions from every direction. Excitement, happiness and adrenaline are also experienced. In addition, since there are no annoying advertisements on the pages where all these games are found, parents are aware that their children are having fun in a safe place.
    The friv site, which is prominent with both different and enjoyable game types, gives you the opportunity to have a pleasant time. In addition to that, you can also see the scores that you collect while playing with each other. It can also be seen that similar games are featured on the pages where each game is played. In other words, the most beautiful and sweetest game types are presented to the players. Offering free gaming opportunities, is striving to please all children and young people. Now you can have fun as you like.