Game Engine Principle and Application-Terrain System

1. Use elevation maps to create game terrain

Heightmap
  • Grayscale pixel map
  • Contains only one color channel
    per pixel storage location of the ground from a height of
    ground black, white is the highest point
  • In addition to terrain data, it can also be used for bump mapping and displacement mapping

Made with a ps elevation map, and save the RAW format
Find also available online, but I did not find on their own to do a painting demonstration ,,, ah, ugly ,,, *
Insert picture description here
prompt review, do not forget when using ps format conversion Changed the picture mode to grayscale, otherwise it will not be displayed when importing

Create a new terrain in Unity and import the elevation map

Insert picture description here
Final result. . . Okay, it's ugly, this is usually the work of the artist
Insert picture description here

2. Unity terrain system creates terrain

Tool introduction:

  • Raise the terrain.
    Click shift to lower the terrain

Insert picture description here
Insert picture description here

  • Raise the terrain (with a maximum height limit)
    Insert picture description here
    Insert picture description here
  • Smooth terrain
    Insert picture description here
    Insert picture description here
  • Draw terrain

The first picture will be tiled, which is the base picture, and the second picture will draw some lines on it
Insert picture description here
Insert picture description here

  • Draw trees

Insert picture description here
Insert picture description here

Published 65 original articles · Liked 52 · Visitors 6212

Guess you like

Origin blog.csdn.net/qq_42577542/article/details/105431441