[Tutorial] Ultimate Unity Terrain maker-blazing-fast creation of gorgeous game terrain

Source: Internet
Author: User
In the Unity workflow, the 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, It requires a lot of practice in the Terrain Operations section of unity. After familiar with these functions, I believe that the production and application of the game terrain will be more handy.
Create a new catalog, tick the Terrain Assets Resource Bundle (the Tree creator and water can join in), press Create to start creating the project.





Start creating terrain, press terrain > Create terrain, automatically generate a plane within the window, which is the basic prototype used by the terrain by default.





Select the terrain > Set Resolution feature to view the basic parameters set by the default terrain, and provide a variety of settings in this menu:


Terrain width: The width of the terrain

Terrain Height: Height of terrain

Terrain Length: Size of terrain

Heightmap Resolution: The resolution used by the terrain height picture.
Detail Resolution: This value is used to control the level of grassland and the resolution of the added detail model. The higher the value, the better, but it will consume a lot of memory, can cause serious delay, most of which we will control the value between 128 to 256 will get a test of the beginning of the terrain.

Detail Resolution per Patch: Detail setting value for each patch

Control Texture Resolution: Controls the resolution of the map texture.

Base Texture Resolution: Controls the ground-based texture resolution of the base map.
In the first practice, we first use the default standard values for terrain rendering, directly press set Resolution to complete the confirmation.



The terrain (Script) in the Inspector panel is about all the feature settings for the entire terrain, with the top seven buttons as the main function area, and left-to-right button functions, respectively:

1.Raise and Lower terrain– plots the terrain surface roughness, such as pressing Shift while the drawing process is down.

2. Paint height– Terrain Height

3. Smooth The terrain height– smooth terrain surface

4 Paint the Terrain texture– plot surface map

5.Place trees– Plant Tree function

6.Place Plant,stone and other small foliage– planting flowers and terrain surface objects

7.terrain– terrain-related parameter setting





After confirming that the set Resolution setting value is the default setting value, select the Import heightmap–raw function. 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.


Select the downloaded attachment Terrain.raw, do not change any settings, press import directly into the terrain height map.



After the map is imported, the original plane is converted into a high-low terrain, and then we can begin to plot the texture on the terrain.





Press the Paint the terrain texture > Edit Texture > Add texture to drag the sand (BEACH2) to the Splat field.


Drag the decal in and press ADD to complete the import action, directly covering a layer of sand-like surface on the terrain.





Now we need to import the second poster to increase the green texture on the terrain ramp, drag grass (Hill) to Splat,tile Size x and Y to 10 after pressing add Texture, press Add to complete the import, and add a second texture to the textures small window.


Press the green texture thumbnail to select the map to draw, in the Settings field, set ***sh Size to 60,opacity set to 50,target strength set to 0.9, and then start the texture drawing on the ramp.










Using the same method to draw the same green texture on the slope block of the terrain, after the completion of a large area of slope texture, select the original sand map, set the ***sh Size to 5,opacity set to 50,target strength set to 1, on the ramp to draw the road shape.





When drawing a ramp, use a smaller brush to draw the basic lines first, and then push the camera angle for more detail adjustments.





Add a third map texture cliff (layered Rock), Tile size x and y set to 50,***sh size set to 15,opacity set to 40,target strength set to 0.4, It is then plotted at the junction of the ramp and the ground, allowing it to produce a fused texture effect.


When you draw the junction texture, set the Target strength to 0.4 to achieve a translucent fusion, and then lower the value of about 0.25, and then use the brush to dilute the edge near the ground, so that the junction can produce more realistic terrain surface texture.


Next, you need to place plants and flowers on the terrain, link to the official website http://unity3d.com/support/resources/assets/terrain-assets Download the Terrain Assist Resource pack, use assets > Import Packages > Custom Package Imports a resource bundle.





When importing a resource bundle, you can preview and tick the desired object content, confirm that all the resources are checked and press import, the system will take some time to import the resources, and then the resource directory of the terrain assets will appear in the project panel after completion.




Press Place Trees > Edit Trees. > Add tree and then load the palm (Group) model and we're going to use this coconut tree as the object for planting.





Adjust the size and density of the brush in the setting bar of the tree, set the value of the function as follows:

SH size– Brush Range

Tree density– density of trees

Color variation– Change Control

Tree height– Tree Height

variation– Height Variation (causes it to produce highly varied trees)

Tree width– width of trees

variation– Wide-height variation (causes it to produce trees of varying widths)




After setting the value of the tree brush, we can start to brush the coconut tree on the terrain, we planted the coconut tree in the lower area, the higher the number is less, one principle is to brush the dense area first, and then lower the Tree density value brush other parts.


In the process of tree planting, there may be some areas that do not need to be planted to be brushed, the elimination of the way as long as the SHIFT key to brush off the extra trees.





Once the first tree has been planted, add a second tree model, press edit Trees>add tree, load the thintree in the Terrain Assets resource bundle, and modify the brush settings as follows:





Beginning to brush out the distribution of the second tree, using the same operation mode with the SHIFT key for regional planting, it must be noted that the tree density numerical control.





Press Place Plants,stones. > Edit Details. > Add Grass Texture, drag terrain Assets > Terrain Grass > Grass to Detail Texture.


Adjust the grass settings as follows, set the health color and dry color to white, billboard to the checked state, press Add to complete the import.





To adjust the brush and strength of the grass, it is important to note that the value of the target strength is adjusted, and the higher the value, the higher the density of the plant, starting with the first value from 0.15 to 0.25.









Now we pull the camera away to a distance, and we'll find that the painted plants suddenly disappear because the details in the terrain are limited to a range, and by pressing the Settings for the terrain to find relevant settings for the terrain, we can draw > Detail The display distance of the distance is increased to 250 (maximum) so that more detail can be seen in the scene.





Detail density is used to set the density display scale of the details, setting the value to 0 is not displayed at all. Tree Distance shows the distance of trees in the camera, and the smaller the number, the less it looks from the camera, which is similar to the role of clip plane in 3d software.





Press Edit Detail > Add Grass Texture Load terrain Assets > Grass > Fern and continue to add some flowers to the terrain. In addition to using Grass maps as a way to grow, you can also add detail models to The three-dimensional effect of the scene, press Edit > Add Detail Mesh, drag the terrain Assets > Tree ambient-occlusion > Bananaplant to the Detail field, set the value to adjust as follows, Hea Lth, Dry color is set to light green and dark gray respectively, Render mode select vertex Lit (vertex coloring), press Add to complete the import.





Adjust the ***sh size to 4,opacity to 0.06,target strength to 0.0625, and then brush a small amount of plant on the terrain.




Finally, add a decorative plant, the terrain Assets > Grass > Whiteflowers dragged to the detail texture set the following values respectively, the health, Dry color is set to white and light gray, Press Add to complete the import.





After the introduction of the terrain on the painting of the fourth plant, in the process we can be based on the height and range of the terrain to switch between different plants, and then with the SHIFT key to cut off the extra parts, and finally get an ideal terrain effect.





At last, the whole terrain can be made by adding the sky background and atomization effect in the scene.




Terrain.raw

0 Bytes, download number: 897

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.