Unity3D game development 6: creating basic game scenario 3

Source: Internet
Author: User

In this article, we will introduce in detail the Unity terrain editor. Unity has a fully functional terrain editor, allows you to plot mountains, Canyon, plain, Highlands, and other terrain in real time with a paint brush. The Unity terrain editor also provides real-time rendering of surface texture, tree planting, and a large area of lawn layout. The terrain editor in Unity supports the Level of Detail function, which allows you to adjust the density of the terrain block mesh based on the distance between the camera and the terrain. Sparse grids are used for distant or flat terrain, and dense grids are used for near or steep terrain blocks.

Choose GameObject> Create Other> Terrain from the menu bar to Create a new Terrain, for example:


Next, let's take a look at the specific terrain component parameters, such:


The Terrain component contains 7 buttons, each of which is a different tool that can be used to plot Terrain fluctuations, surface textures, or additional details such as trees, grass, or stones.

The first three buttons are used to draw the terrain height, and the parameters are basically the same,

The first button is the raise/lower height button. When used, the tool increases or lowers the terrain according to the stroke settings, keep the mouse pressed to move the mouse continuously raise the height until it reaches the maximum height. If you want to reduce the height, hold down Shift and click the mouse, for example: (poor painting ~~ Second (second)


The second button is the spray button. This tool is used to specify a height and move any part of the terrain to reach this height. It is generally used to draw a smooth terrain, such as high ground or Canyon:


The third button is the smooth height button, which is used to soften the height difference of the area to make the terrain more smooth, such:


Brushes: Specifies the style of the brush used to draw the Terrain Height in height editing mode.

Brush Size: the Size of the Brush.

Opacity: opaque, between 0 and

Click the brush button, and then click the Edit Texture button in Texture. This button is used to specify, replace, and remove terrain textures, such:


A dialog box is displayed, such:


Texture: Texture, used to specify the image in the project resource as the terrain Texture,

Normal Map: Normal Map, used to specify the image in the project resource as the Normal Map matching the terrain texture

Size: Specifies the Size of the texture to be tiled in the Y axis. The larger the value is, the larger the texture is displayed on the terrain.

Offset: Offset. this parameter is used to specify the Offset Value of the texture on the X axis and Y axis. The larger the value, the larger the Offset distance of the texture on the terrain.

We add a terrain texture, such:


We then draw a turf texture on it, such:


Let's take a look at the button behind the brush, which is a tree planting button, which is used to plant trees on the terrain, such:


Bush Size: Brush Size

TreeDensity: tree density, used to control the spacing of tree objects. The larger the value is, the more dense the tree is and the smaller the spacing is. The value ranges from 10 to 100.

Color Variation: the random variable value that can be used for the Color of each tree. The value range is 0-1.

Tree Height: The base Height of the Tree.

Variation: tree height Random Variable

Tree Width: The baseline Width of the Tree.

Click the Edit Trees button to add trees, Bend Factor: Bending Factor, which is used to control the results of Trees affected by wind power, such:


After adding a tree, we can draw a tree on the terrain, for example:



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.