Version: 2023.1
언어: 한국어
터레인 스탬핑
브러시

터레인 레이어

A Terrain Layer is an Asset that defines a Terrain’s surface qualities. A Terrain Layer holds Textures and other properties that the Terrain’s Material uses to render the Terrain surfaces. Because Terrain Layers are Assets, you can reuse them on multiple Terrain tiles.

You can add Textures to the surface of a Terrain to create coloration and fine detail. Terrain GameObjects are often large, so it’s best to use a base Terrain Layer with Textures that tile over the surface and repeat seamlessly. You can use multiple Terrain Layers, each with different Textures, to build up interesting, varied Terrain surfaces.

The first Terrain Layer you apply to a Terrain automatically becomes the base layer and spreads over the whole landscape. You can paint areas with other Terrain Layers to simulate different ground surfaces, such as grass, desert, or snow. To create a gradual transition between grassy countryside and a sandy beach, you might choose to apply Textures with variable opacity.

모래 텍스처를 사용한 터레인
모래 텍스처를 사용한 터레인

터레인 레이어 생성

터레인 인스펙터에서 직접 터레인 레이어를 만들려면 터레인 인스펙터 상단 툴바에 있는 페인트브러시 아이콘을 클릭한 후 드롭다운 메뉴에서 Paint Texture 를 선택하십시오. 그런 다음 Terrain Layers 섹션의 하단에서 Edit Terrain Layers 버튼을 클릭한 후 Create Layer 를 선택하십시오.

터레인 인스펙터에서 레이어 만들기
터레인 인스펙터에서 레이어 만들기

To edit terrain layers from an overlay:

  1. In the Terrain Tools overlay, select Materials Mode Material Mode Menu button. Materials Mode tools display at the end of the Terrain Tools overlay.
  2. From the available Materials Mode tools on the Terrain Tools overlay, select Paint Texture Paint Texture.
  3. In the Tool Settings overlay, select Edit Terrain Layers.
Create Layer in Overlays
Create Layer in Overlays

Create Layer 를 선택하면 Unity가 Select Texture2D 창을 엽니다. 여기에서 터레인 레이어의 Diffuse 채널로 사용할 이미지를 선택하십시오. Normal Map 또는 Mask Map 텍스처를 터레인 레이어에 할당하려면 프로젝트(Project) 뷰에서 해당 터레인 레이어를 선택한 후 인스펙터(Inspector) 창을 사용하십시오.

또는 터레인과 자동으로 연결되지 않는 터레인 레이어 에셋을 만들기 위해 프로젝트(Project) 창을 마우스 오른쪽 버튼으로 클릭한 후 컨텍스트 메뉴에서 Create > Terrain Layer 를 선택할 수도 있습니다. 그런 다음 새 터레인 레이어에 대한 인스펙터 창에서 다양한 프로퍼티를 설정하십시오.

For information about how the number of Terrain Layers affects rendering performance, see Rendering performance. Even assigned Terrain Layers that you don’t actually paint onto the Terrain tile might impact the rendering performance.

터레인 레이어 추가

처음에는 터레인에 아무 터레인 레이어도 할당되어 있지 않습니다. 기본적으로 터레인은 터레인 레이어를 추가하기 전까지 체커보드 텍스처를 사용합니다.

프로젝트에서 터레인 레이어를 만든 후 Edit Terrain Layers 버튼을 클릭하고 Add Layer 를 선택하여 Select TerrainLayer 창을 여십시오. 그런 다음 이 창에 있는 터레인 레이어를 더블 클릭하여 터레인에 추가할 수 있습니다.

Terrain Layer 프로퍼티

Depending on the Material set in the Terrain Settings and the Render Pipeline in use, you might see different options and properties in the Inspector.

인스펙터의 터레인 레이어 설정
인스펙터의 터레인 레이어 설정
프로퍼티 설명
Diffuse 디퓨즈 텍스처는 터레인 레이어의 기본 컬러 텍스처를 나타냅니다. 디퓨즈 텍스처의 알파 채널은 다양한 용도를 가지고 있으며, 터레인 렌더링에 사용하는 활성 스크립터블 렌더 파이프라인과 셰이더에 따라 다릅니다.

예를 들어 고해상도 렌더 파이프라인(HDRP)와 유니버설 렌더 파이프라인(URP)은 알파 채널을 평활도에 사용합니다. 하지만 터레인 레이어에 마스크맵 텍스처가 있는 경우에는 디퓨즈 텍스처의 알파 채널을 밀도 값에 사용합니다.
Color Tint 디퓨즈 텍스처를 할당하면 Color Tint 라는 새로운 필드가 터레인 레이어 설정에 나타납니다. 컬러 피커 필드를 클릭하고 사용할 컬러를 선택하십시오.

Color Tint 는 HDRP 및 URP에서 이용할 수 있는 기능입니다.
Opacity as Density 일반적인 스플랫맵 가중치 또는 마스크맵의 높이 값 대신, 터레인 레이어에 있는 디퓨즈 텍스처의 알파 채널에 저장된 값을 사용하여 터레인 레이어를 렌더링할지 여부를 지정합니다. Unity는 레이어 블렌딩에 대한 임계값으로 알파 채널 값을 사용합니다.

Opacity as Density 는 HDRP 및 URP에서 이용할 수 있는 기능입니다. 이 옵션은 터레인의 터레인 릿 머티리얼에 대한 Enable Height-based Blend 옵션을 비활성화하고 터레인 레이어에 디퓨즈 텍스처와 마스크맵 텍스처를 할당하는 경우에 각 터레인 레이어에서 이용할 수 있습니다.
Normal Map The Normal Map Texture contains the normal information for your Terrain Layer. Unity uses this information in lighting calculations.

• If you don’t assign a Normal Map Texture and enable instancing in the Terrain Settings, the Terrain uses the normals generated from the Terrain heightmap.

• If you assign a Normal Map Texture and enable instancing, Unity uses the Normal Map Texture instead of the normals generated from the heightmap.

• If you disable instancing on the Terrain, the built-in Terrain Material uses normals generated from the Terrain geometry, even if you assign a Normal Map Texture on the Terrain Layer.
Normal Scale 노멀 맵 텍스처를 할당하면 새 Normal Scale 필드가 터레인 레이어 설정에 나타납니다. 이 값은 노멀 맵에 있는 노멀 값에 대한 스케일링 인자 역할을 합니다. 값이 0이면 노멀 맵에 저장된 노멀의 스케일이 0이고, 값이 1이면 노멀이 전체 스케일 또는 완전한 영향력을 미치고 있다는 의미입니다.

다음은 다양한 노멀 스케일 값의 예시와 결과입니다.
Normal Scale = 0 • 언패킹된 노멀 값에 0을 곱합니다.
• 노멀의 세기, 즉 길이가 0이 되고 조명 계산에 아무 영향도 미치지 않습니다. 터레인의 메시 삼각형이 메시 노멀을 조명 계산에 사용합니다.
Normal Scale = 1 • 언패킹된 노멀 값에 1을 곱합니다.
• 노멀의 세기가 100%입니다.
Normal Scale = 2 • 언패킹된 노멀 값에 2를 곱합니다.
• 노멀의 세기가 200%이고, 노멀 스케일 1을 가진 노멀보다 두 배 더 뚜렷하게 나타납니다.
Normal Scale = –1 • 언패킹된 노멀 값에 –1을 곱합니다.
• 노멀의 세기가 100%이지만 음수화되므로, 노멀이 노멀 스케일 1을 가진 노멀의 반대 방향을 가리키도록 만듭니다.
Mask Map 고해상도 렌더 파이프라인(HDRP)과 유니버설 렌더 파이프라인(URP)에 포함된 TerrainLit 셰이더가 이 마스크맵 텍스처 데이터를 사용합니다. 커스텀 터레인 셰이더도 사용자 정의 목적(예: 앰비언트 오클루전, 높이 기반 블렌딩)을 위해 이 텍스처를 사용할 수 있습니다.

HDRP 및 URP TerrainLit 셰이더의 경우 마스크맵 텍스처의 RGBA 채널은 다음과 같습니다.
R 메탈릭
G 앰비언트 오클루전
B 높이
A 평활도(디퓨즈 알파가 밀도가 됨)
Channel Remapping 마스크맵 텍스처를 할당하면 Channel Remapping 이라는 이름의 새로운 헤딩이 터레인 레이어 설정에 나타납니다. 이 헤딩의 옆에 있는 삼각형을 클릭하면 최소 및 최대 RGBA 값에 대한 필드가 표시됩니다. Unity는 이 범위를 사용하여 마스크맵 텍스처의 각 채널에 값을 다시 매핑합니다.
Specular 터레인 레이어의 스페큘러 하이라이트 컬러입니다.
Metallic 터레인 레이어의 전체 메탈릭 값입니다.
Smoothness 터레인 레이어의 전체 평활도 값입니다.
Tiling Settings 터레인 레이어가 사용하는 모든 텍스처에 적용되는 타일링 설정입니다.
Size 터레인 공간의 텍스처 크기와 해당 텍스처 타일링 빈도를 나타냅니다.
Offset Unity가 터레인 레이어의 각 텍스처에 대한 샘플 위치에 적용하는 기본 오프셋입니다.

텍스처 페인팅

Unity는 추가되는 첫 번째 터레인 레이어를 전체 랜드스케이프에 적용합니다. 여러 개의 터레인 레이어를 추가하는 경우 페인트 텍스처 툴을 사용하여 후속 텍스처를 터레인에 적용하십시오.

터레인 레이어 없이 새 터레인 타일을 추가하고 페인팅하는 경우 시스템은 선택된 터레인 레이어를 새 터레인 타일에 자동으로 추가합니다. 이 터레인 레이어가 첫 번째이므로, 해당 텍스처가 기본 레이어가 되고 전체 터레인 타일을 채웁니다.

터레인 인스펙터의 Brushes 에 이용 가능한 브러시를 표시하는 상자가 있고, 그 아래에 Brush SizeOpacity 옵션이 있습니다. 이 툴에 대한 자세한 내용은 터레인 생성 및 편집을 참조하십시오.

렌더링 성능

터레인 타일에 할당하는 터레인 레이어 수는 렌더러의 성능에 영향을 미칠 수 있습니다. 터레인 레이어의 최대 권장 개수는 프로젝트가 사용하는 렌더 파이프라인에 따라 다릅니다.

  • If your Project uses the Universal Render Pipeline (URP) or Built-in Render Pipeline, you can use four Terrain Layers per Texture pass, with no limit on the number of passes. This means that though you can to use as many Terrain Layers as you want, each pass increases the time spent rendering the Terrain. For maximum performance, limit each of your Terrain tiles to four Terrain Layers.

  • If your Project uses the High Definition Render Pipeline (HDRP), you can add up to eight Terrain Layers per Terrain tile, and the system renders them in a single pass. No additional passes are possible. If you add more than eight Terrain Layers, they appear in the Unity Editor but are ignored at run time.


  • 2021–01–27 페이지 수정됨

  • Color Tint 및 Opacity as Density 프로퍼티에 대한 정보 업데이트됨

TerrainLayer

터레인 스탬핑
브러시
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961