Unity3d game development from zero single row (three)-extreme speed Create a cool game terrain

Source: Internet
Author: User

Feed

Within the Unity workflow, terrain is an essential element. Regardless of whether the game or virtual reality will be used to all kinds of terrain effects, in this teaching we need to understand the basic concept of terrain production, in the unity of the terrain operation part of the need for a lot of practice. After familiar with these functions, I believe that the production and application of the game terrain will be more handy.

First look at the effect:



Environment: Windows7 64bit unity3d4.2.1

Required Resources: Terrain.raw


Create Project

File-New Project

Choose where project is stored, import skyboxed.unitypackage (Sky Box), Terrain assets.unitypackag (terrain), and tree creator.unitypackage (trees) at the same time.


Import a package again, this need to import an official tree, grass bag.



Create Terrain

In hierarchy, Creatte->terrain. In the scene, you take the initiative to produce a plane. This is the basic prototype used by the terrain by default. The various properties of the terrain are in the inspector on the right.


The terrain is usually made using Heightmap, where Unity3d is the. Raw file. In the raw file, the level map of gray scale is recorded, and the height of terrain is generated by the drop of gray scale.

Of course, it can also be created with its own terrain tool.

Still in the inspector. Click Import Raw ... Select the downloaded attachment Terrain.raw, do not modify whatever settings. Import the terrain height map directly by pressing the import.

After the map was imported, the original plane was converted into a high and low terrain, and then we were able to start sketching the texture on the terrain.


Terrain Texture

Now we need to draw some textures for the mountain, which is the fourth tool. The first is to import textures. Import four kinds, first of all the main ground, one is the grass, then the top of the stone texture, there is the foot of the texture.

It is best to import multiple textures. Set the brush, brush the approximate first, and then brush some details, draw out the effect is like:


At the foot of mountain



Peak



Species of grass

The fifth tool in the terrain (Script)


Since the package of terrain assets was previously imported, some trees can be imported directly here. The number of parameters is set in setting.

Then is to choose a variety of trees and brush.




The operation of plants is similar, the sixth tool, after importing some models can start to brush!






Several parameters of the brush, Brash size,opacity. Target Strenth are able to adjust their own look, very good understanding.

Brush the same time hold down shift is deleted.


Lights, sky boxes and fog and wind.

The last part to be added, although not part of the creation of the terrain, adds the true extent of the consolidation scenario.

The light of the words directly in the hierarchy create a directional lights just fine. Adjust the strength below.

The background of the camera is dark blue by default, and the following is the addition of the sky box to the camera. Select Main camera. In the inspector on the right, set up for example the following:



Then there is the sky.

Here the effect of the simplest global fog is used.

Edit->rendering setting settings such as the following:



The wind is set directly in the properties of the terrain to be able to, plus the wind after the plant can swing with the wind.



Here, a cool terrain is over, compile and execute, you can see the effect of the scene finally.



References

Ultimate Unity Terrain Maker-speed up the creation of gorgeous game terrain-http://www.narkii.com/club/thread-260061-1.html

"Unity3d Game Essential"

Unity3d game development from zero single row (three)-extreme speed Create a cool game terrain

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.