PCG에서 Spline으로 공간 제거
Actor 기반 Blueprint 생성
Spline Component 추가
PCG 노드로 가져오기 위해 블루프린트의 Detail - Actor - Tags에서 Element를 추가
(Element의 이름은 blueprint의 이름과 동일하게 사용한다)
Compile 후, Blueprint를 Level에 배치한다
양끝 점을 이동시켜 Spline 길이를 조절할 수 있다
조작하기 쉽도록 Spline을 약간 높여 배치한다
Spline을 PCG를 가로지르도록 배치한다
효율적인 Spline 작업을 위해 Static Mesh를 일시적으로 비활성화 시킨다
Get Spline Data
: Spline 정보를 가져온다.
Actor Filter : All World Actors
Actor Selection : By Tag
(Blueprint에서 제작한 Tag를 사용하기 위함)
Actor Selection Tag : PathSpline (Blueprint에서 제작한 Tag 이름)
Spline Sampler
Debug, Inspect를 켜 포인트 수 확인
Mode와 Subdivisions Per Segment 값 확인
Bounds Modifier 추가, Inspect로 Attribute 창 확인
BoundsMin과 BoundsMax 값이 각각 -1과 1로 현재 Y축의 길이가 2cm임을 알 수 있다.
Bounds Min과 Bounds Max 값 변경
Attribute 창에서 값 변화 확인
Bounds Modifier에 Debug하여 확인
쉬운 스케일 조절을 위해 Z축 스케일도 변경
Spline 점 추가하기
끝점 선택 상태에서 Alt를 누르며 Drag하면 추가된다
Spline Sampler의 Mode를 Distance로 변경
Distance Increment는 거리 증가 단위로 cm 기준이다.
ex) Distance Increment : 100 -> 매 100cm마다 포인트 생성됨
Projection
: Landscape 표면으로 투영. Projection Target의 Parameter는 Landscape Data이다.
Get Landscaped Data를 Projection Target의 Parameter로 연결하고 Debug한다
Spline Data를 Static Mesh의 Difference로 활용
Spline을 Static Mesh들의 Difference에 추가한다
Tree에도 Difference를 추가하여 Spline을 뺀다 (미관을 위해 Difference를 Multiply 전에 배치한다)
To Point
이미 다른 노드에 연결 되어있는 선 전체를 동시에 다른 노드로 이동시키기 위해 Ctrl을 누른 상태로 이동시킨다
Difference의 Density Function을 Binary로 변경
Projection의 Debug 해제 시
Multiple Spline
여러 개의 Spline을 동시에 사용할 경우, Get Spline Data - ✓ Select Multiple
Spline, Surface Steepness (가파른 정도)
Spline Sampler / Surface Sampler - Points - Point Steepness
Default : 0.5
숫자가 커질수록 가파른 정도가 심해지고, 포인트와 스플라인의 거리가 가까워진다.
Point Steepness : 0.0
Point Steepness : 0.5
Point Steepness : 1.0
'Unrea Engine Graphic > PCG' 카테고리의 다른 글
Unreal Engine PCG Detail (6) - Closed Spline (0) | 2025.03.18 |
---|---|
Unreal Engine PCG Detail (5) - Mesh Sampler, Subgraph (0) | 2025.03.17 |
Unreal Engine PCG Detail (3) - Parameter (2), Graph Instance (0) | 2025.03.14 |
Unreal Engine PCG Detail (2) - Foliage, Parameter (1) (0) | 2025.03.14 |
Unreal Engine PCG Detail (1) - PCG Node (0) | 2025.03.14 |