PCG Building
2m길이를 Transform Points로 Offset을 이동시켜 Difference를 통해 메쉬를 생성한다.
사용시에 Pivot의 위치가 중앙이 아니면 제대로 표현되지 않을 것이다.
PCG Landscape
Landscape 생성후
PCG Volume 생성.
Get Landscape Data - Surface Sampler
| Surface Sampler | 일반 그리드 패턴으로 서피스 데이터에 포인트를 샘플링합니다. 이 노드에는 다음과 같은 옵션이 있습니다.
|
Looseness : 기본 1. 0일경우 Extent의 길이 만큼, 1일경우 2배가 됨.
Attribute Filter를 생성하고, Material에 해당하는 Layer를 찾아서 이름을 넣어준다.
Type을 Float로 하고 Float Value를 설정하면, 해당 머티리얼이 색칠된 정도 0~1에서 Operator에 의해 >(초과) 0.6초과 일 경우만 생성되게 할 수 있다. 값을 1로 하고 Equal을 이용해서 1인 경우만 생성되게 하는 것도 가능하다.body lake를 넣으면, 이또한 Spline이라는 것을 알 수 있다.
따라서 Get Spline Data-Spline Sampler를 통해 사용할 수 있다.
PCG Mesh
Mesh Sampler를 쓰기위해
AttributeNoise와 Density Filter를 통해서, 얼마만큼 생성할지 조절 할 수 있다.
Normal To Density-Density Filter-Transform Points 이 세가지를 통해서, 물체를 붙일 때, Noraml을 1로 해놓았으므로 위를 향하도록 생성할 수 있다.
Get Actor Property를 이용해서 Density Filter의 값에 Property를 연결하면, 해당 값을 변수를 통해 조절 할 수 있다. Enum또한 Switch로 활용할 수 있다.
Create Points Grid를 사용한다.
Grid Extents 로 그리드를 늘리고
Cell Size로 간격을 조절할 수 있다.
참고
PCG 노드
https://dev.epicgames.com/documentation/ko-kr/unreal-engine/procedural-content-generation-framework-node-reference-in-unreal-engine#%EB%A9%94%ED%83%80%EB%8D%B0%EC%9D%B4%ED%84%B0
https://dev.epicgames.com/documentation/ko-kr/unreal-engine/procedural-content-generation-framework-node-reference-in-unreal-engine#%EB%A9%94%ED%83%80%EB%8D%B0%EC%9D%B4%ED%84%B0