claude-code-arcane 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/README.md +54 -6
- package/agents/game/ue-blueprint-specialist.md +125 -0
- package/agents/game/ue-gas-specialist.md +133 -0
- package/agents/game/ue-umg-specialist.md +131 -0
- package/dist/cli.js +5 -0
- package/docs/SKILLS-CATALOG.md +42 -3
- package/docs/USER-GUIDE.md +2 -2
- package/hooks/detect-unreal.sh +90 -0
- package/package.json +1 -1
- package/profiles/unreal-dev.yaml +97 -0
- package/rules/gamedev/unreal-code.md +125 -0
- package/skills/install-mcp/SKILL.md +135 -46
- package/skills/install-mcp/references/unreal-operations.md +55 -0
- package/skills/ue-actor-component-architecture/SKILL.md +509 -0
- package/skills/ue-actor-component-architecture/references/actor-lifecycle.md +301 -0
- package/skills/ue-actor-component-architecture/references/component-types.md +592 -0
- package/skills/ue-ai-navigation/SKILL.md +526 -0
- package/skills/ue-ai-navigation/references/behavior-tree-patterns.md +392 -0
- package/skills/ue-ai-navigation/references/behavior-tree-workflow.md +107 -0
- package/skills/ue-ai-navigation/references/custom-bttask.md +104 -0
- package/skills/ue-ai-navigation/references/eqs-reference.md +423 -0
- package/skills/ue-animation-system/SKILL.md +521 -0
- package/skills/ue-animation-system/references/anim-notify-reference.md +486 -0
- package/skills/ue-animation-system/references/locomotion-setup.md +550 -0
- package/skills/ue-async-threading/SKILL.md +433 -0
- package/skills/ue-async-threading/references/thread-safety-guide.md +213 -0
- package/skills/ue-async-threading/references/threading-patterns.md +345 -0
- package/skills/ue-audio-system/SKILL.md +527 -0
- package/skills/ue-audio-system/references/audio-setup-patterns.md +700 -0
- package/skills/ue-blueprints/SKILL.md +134 -0
- package/skills/ue-blueprints/references/communication.md +82 -0
- package/skills/ue-character-movement/SKILL.md +475 -0
- package/skills/ue-character-movement/references/cmc-extension-patterns.md +335 -0
- package/skills/ue-character-movement/references/movement-pipeline.md +189 -0
- package/skills/ue-cpp-foundations/SKILL.md +533 -0
- package/skills/ue-cpp-foundations/references/components-and-gc.md +107 -0
- package/skills/ue-cpp-foundations/references/container-patterns.md +544 -0
- package/skills/ue-cpp-foundations/references/delegate-patterns.md +497 -0
- package/skills/ue-cpp-foundations/references/gameplay-classes-cpp.md +136 -0
- package/skills/ue-cpp-foundations/references/property-specifiers.md +306 -0
- package/skills/ue-data-assets-tables/SKILL.md +527 -0
- package/skills/ue-data-assets-tables/references/asset-loading-patterns.md +306 -0
- package/skills/ue-data-assets-tables/references/data-driven-design.md +378 -0
- package/skills/ue-editor-tools/SKILL.md +523 -0
- package/skills/ue-editor-tools/references/detail-customization-patterns.md +395 -0
- package/skills/ue-editor-tools/references/editor-module-setup.md +480 -0
- package/skills/ue-game-features/SKILL.md +477 -0
- package/skills/ue-game-features/references/experience-system.md +222 -0
- package/skills/ue-game-features/references/game-feature-patterns.md +308 -0
- package/skills/ue-gameplay-abilities/SKILL.md +518 -0
- package/skills/ue-gameplay-abilities/references/ability-task-reference.md +391 -0
- package/skills/ue-gameplay-abilities/references/gameplay-effect-reference.md +397 -0
- package/skills/ue-gameplay-abilities/references/gas-setup-patterns.md +369 -0
- package/skills/ue-gameplay-framework/SKILL.md +466 -0
- package/skills/ue-gameplay-framework/references/framework-class-map.md +243 -0
- package/skills/ue-input-system/SKILL.md +394 -0
- package/skills/ue-input-system/references/cpp-setup.md +131 -0
- package/skills/ue-input-system/references/enhanced-input-workflow.md +117 -0
- package/skills/ue-input-system/references/input-action-reference.md +731 -0
- package/skills/ue-mass-entity/SKILL.md +476 -0
- package/skills/ue-mass-entity/references/mass-entity-patterns.md +319 -0
- package/skills/ue-mass-entity/references/mass-fragment-reference.md +119 -0
- package/skills/ue-materials-rendering/SKILL.md +526 -0
- package/skills/ue-materials-rendering/references/material-parameter-reference.md +216 -0
- package/skills/ue-materials-rendering/references/post-process-settings.md +383 -0
- package/skills/ue-module-build-system/SKILL.md +487 -0
- package/skills/ue-module-build-system/references/build-cs-reference.md +418 -0
- package/skills/ue-module-build-system/references/common-build-errors.md +381 -0
- package/skills/ue-naming-conventions/SKILL.md +142 -0
- package/skills/ue-naming-conventions/references/asset-name-modifiers.md +233 -0
- package/skills/ue-naming-conventions/references/content-structure.md +83 -0
- package/skills/ue-networking-replication/SKILL.md +452 -0
- package/skills/ue-networking-replication/references/replication-patterns.md +526 -0
- package/skills/ue-networking-replication/references/rpc-decision-guide.md +393 -0
- package/skills/ue-niagara-effects/SKILL.md +531 -0
- package/skills/ue-niagara-effects/references/niagara-data-interfaces.md +491 -0
- package/skills/ue-niagara-effects/references/niagara-parameter-types.md +153 -0
- package/skills/ue-niagara-effects/references/niagara-workflow.md +115 -0
- package/skills/ue-packaging/SKILL.md +116 -0
- package/skills/ue-physics-collision/SKILL.md +423 -0
- package/skills/ue-physics-collision/references/collision-channel-setup.md +218 -0
- package/skills/ue-physics-collision/references/trace-patterns.md +499 -0
- package/skills/ue-procedural-generation/SKILL.md +505 -0
- package/skills/ue-procedural-generation/references/pcg-node-reference.md +381 -0
- package/skills/ue-procedural-generation/references/procedural-mesh-patterns.md +940 -0
- package/skills/ue-project-context/SKILL.md +305 -0
- package/skills/ue-sequencer-cinematics/SKILL.md +506 -0
- package/skills/ue-sequencer-cinematics/references/sequencer-patterns.md +629 -0
- package/skills/ue-serialization-savegames/SKILL.md +524 -0
- package/skills/ue-serialization-savegames/references/save-system-architecture.md +705 -0
- package/skills/ue-state-trees/SKILL.md +489 -0
- package/skills/ue-state-trees/references/state-tree-mass-integration.md +184 -0
- package/skills/ue-state-trees/references/state-tree-patterns.md +321 -0
- package/skills/ue-testing-debugging/SKILL.md +520 -0
- package/skills/ue-testing-debugging/references/automation-test-patterns.md +387 -0
- package/skills/ue-testing-debugging/references/profiling-commands.md +357 -0
- package/skills/ue-ui-umg-slate/SKILL.md +431 -0
- package/skills/ue-ui-umg-slate/references/common-ui-setup.md +484 -0
- package/skills/ue-ui-umg-slate/references/widget-types.md +487 -0
- package/skills/ue-world-level-streaming/SKILL.md +518 -0
- package/skills/ue-world-level-streaming/references/streaming-patterns.md +414 -0
- package/templates/gamedev/unreal-project-context.md +107 -0
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
# PCG Node Reference
|
|
2
|
+
|
|
3
|
+
PCG nodes are categorized by their `EPCGSettingsType` enum value. Each node is a `UPCGSettings` subclass paired with a `FPCGElement` (or `IPCGElement`) that performs the actual work. Nodes connect through typed pins carrying `UPCGData`-derived objects.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Data Flow Model
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
[Actor/Landscape/Spline Input] --> [Sampler] --> [Filter/Density] --> [Spawner] --> [Output]
|
|
11
|
+
|
|
|
12
|
+
[UPCGPointData]
|
|
13
|
+
TArray<FPCGPoint>
|
|
14
|
+
Each point has:
|
|
15
|
+
FTransform Transform
|
|
16
|
+
float Density (0..1)
|
|
17
|
+
FVector BoundsMin
|
|
18
|
+
FVector BoundsMax
|
|
19
|
+
FVector4 Color
|
|
20
|
+
int32 Seed
|
|
21
|
+
int64 MetadataEntry
|
|
22
|
+
float Steepness
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Data flows between nodes as `FPCGTaggedData` entries in an `FPCGDataCollection`. Each entry carries:
|
|
26
|
+
- `Data` — pointer to `UPCGData` subclass
|
|
27
|
+
- `Pin` — `FName` matching the target pin label
|
|
28
|
+
- `Tags` — `TSet<FString>` for filtering
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Standard Pin Labels
|
|
33
|
+
|
|
34
|
+
| Label constant | String value | Usage |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `PCGPinConstants::DefaultInputLabel` | `"In"` | Default input pin |
|
|
37
|
+
| `PCGPinConstants::DefaultOutputLabel` | `"Out"` | Default output pin |
|
|
38
|
+
| `PCGPinConstants::DefaultParamsLabel` | `"Overrides"` | Overridable parameter input (was `"Params"` before 5.6) |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Node Categories and Settings Types
|
|
43
|
+
|
|
44
|
+
### InputOutput (`EPCGSettingsType::InputOutput`)
|
|
45
|
+
|
|
46
|
+
**Get Actor Data** (`UPCGDataFromActorSettings`)
|
|
47
|
+
- Collects spatial data from actors tagged with a PCG tag.
|
|
48
|
+
- Produces: `UPCGSpatialData` (volume, surface, spline depending on actor components).
|
|
49
|
+
- Key fields: `ActorSelector` (tag, class, or explicit reference), `bParseActor`.
|
|
50
|
+
|
|
51
|
+
**Get Landscape Data** (`UPCGLandscapeData`)
|
|
52
|
+
- Wraps landscape heightfield as a surface for sampling.
|
|
53
|
+
- Produces: `UPCGLandscapeData`.
|
|
54
|
+
|
|
55
|
+
**Get Spline Data** (`UPCGSplineData`)
|
|
56
|
+
- Wraps `USplineComponent` as PCG spline data.
|
|
57
|
+
- Can be used as a surface boundary or point source.
|
|
58
|
+
- Produces: `UPCGSplineData`, `UPCGSplineInteriorSurfaceData`.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
### Sampler (`EPCGSettingsType::Sampler`)
|
|
63
|
+
|
|
64
|
+
**Surface Sampler** (`UPCGSurfaceSamplerSettings`)
|
|
65
|
+
- Scatters points on a surface (landscape, mesh, spline-bounded area).
|
|
66
|
+
- Key fields:
|
|
67
|
+
- `PointsPerSquaredMeter` — density of scatter
|
|
68
|
+
- `PointExtents` — bounding box half-size per point
|
|
69
|
+
- `Looseness` — boundary tolerance (0 = strict inside)
|
|
70
|
+
- `bApplyDensityToPoints` — use surface density to reject points
|
|
71
|
+
- `Seed` — deterministic seed for scatter
|
|
72
|
+
- Produces: `UPCGPointData`
|
|
73
|
+
|
|
74
|
+
**Spline Sampler** (`UPCGSplineSamplerSettings`)
|
|
75
|
+
- Generates points along a spline or inside a spline boundary.
|
|
76
|
+
- `Mode`: `Edge` (along spline), `Interior` (inside closed spline).
|
|
77
|
+
- `Dimension`: `OnSpline` (1D), `OnHorizontalSurface` (2D), `OnVolume` (3D).
|
|
78
|
+
- Key fields: `NumSegments`, `SubdivisionCount`, `Fill` mode.
|
|
79
|
+
- Produces: `UPCGPointData`
|
|
80
|
+
|
|
81
|
+
**Volume Sampler** (`UPCGVolumeSamplerSettings`)
|
|
82
|
+
- Samples points in 3D space within a volume.
|
|
83
|
+
- Key fields: `VoxelSize`.
|
|
84
|
+
- Produces: `UPCGPointData`
|
|
85
|
+
|
|
86
|
+
**Point Grid** (`UPCGCreatePointsGridSettings`)
|
|
87
|
+
- Creates a regular grid of points.
|
|
88
|
+
- Key fields: `CellSize`, `NumCells`, `Center`.
|
|
89
|
+
- Produces: `UPCGPointData`
|
|
90
|
+
|
|
91
|
+
**Point Sphere** (`UPCGCreatePointsSphereSettings`)
|
|
92
|
+
- Creates points on or inside a sphere.
|
|
93
|
+
- Key fields: `NumPoints`, `Radius`, `bFillSphere`.
|
|
94
|
+
- Produces: `UPCGPointData`
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
### Filter (`EPCGSettingsType::Filter`)
|
|
99
|
+
|
|
100
|
+
**Density Filter** (`UPCGDensityFilterSettings`)
|
|
101
|
+
- Removes points below a density threshold with optional random culling.
|
|
102
|
+
- Key fields: `LowerBound`, `UpperBound`, `bInvertFilter`, `Seed`.
|
|
103
|
+
|
|
104
|
+
**Attribute Filter** (`UPCGAttributeFilterSettings`)
|
|
105
|
+
- Filters points by metadata attribute comparison.
|
|
106
|
+
- Key fields: `TargetAttribute`, `Operator` (`==`, `!=`, `<`, `>`, `<=`, `>=`), `ConstantValue` or `OtherAttributeSource`.
|
|
107
|
+
|
|
108
|
+
**Bounds Check** (`UPCGCullPointsOutsideActorBoundsSettings`)
|
|
109
|
+
- Removes points outside the owning actor's bounding box.
|
|
110
|
+
- No required configuration beyond the node itself.
|
|
111
|
+
|
|
112
|
+
**Point Filter** (generic `UPCGFilterByAttributeSettings`)
|
|
113
|
+
- Keeps or removes points based on arbitrary attribute predicate.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Density (`EPCGSettingsType::Density`)
|
|
118
|
+
|
|
119
|
+
**Density Noise** (`UPCGAttributeNoiseSettings` applied to density)
|
|
120
|
+
- Modulates point density using Perlin noise or other noise modes.
|
|
121
|
+
- Key fields: `NoiseMode` (`Perlin`, `Value`, etc.), `Frequency`, `Seed`, `InvertSourceDensity`.
|
|
122
|
+
|
|
123
|
+
**Density Remap** (`UPCGAttributeRemapSettings`)
|
|
124
|
+
- Remaps a numeric attribute from one range to another.
|
|
125
|
+
- Key fields: `SourceAttribute`, `InRange`, `OutRange`, `ClampOutput`.
|
|
126
|
+
|
|
127
|
+
**Blur** (`UPCGBlurSettings`)
|
|
128
|
+
- Blurs point attributes by averaging neighbor values.
|
|
129
|
+
- Key fields: `Iterations`, `KernelSize`.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
### Spawner (`EPCGSettingsType::Spawner`)
|
|
134
|
+
|
|
135
|
+
**Static Mesh Spawner** (`UPCGStaticMeshSpawnerSettings`)
|
|
136
|
+
- Takes `UPCGPointData` and spawns `UHierarchicalInstancedStaticMeshComponent` instances.
|
|
137
|
+
- Key fields:
|
|
138
|
+
- `MeshEntries` — weighted list of `FSoftObjectPath` mesh assets
|
|
139
|
+
- `bOverrideDescriptors` — override ISM component properties per mesh
|
|
140
|
+
- `InstancePackingMode` — `StaticMesh`, `Actor`, or `ISM`
|
|
141
|
+
- Uses `FPCGProceduralISMComponentDescriptor` (USTRUCT) for per-mesh ISM settings.
|
|
142
|
+
|
|
143
|
+
**Actor Spawner** (`UPCGSpawnActorSettings`)
|
|
144
|
+
- Spawns `AActor` subclasses at point positions.
|
|
145
|
+
- Key fields: `TemplateActor`, `SpawnMode` (bOverlapExisting, etc.), `PostSpawnFunction`.
|
|
146
|
+
|
|
147
|
+
**Create Spline** (`UPCGCreateSplineSettings`)
|
|
148
|
+
- Creates a `USplineComponent` from input point positions.
|
|
149
|
+
- Key fields: `bCreateFromInputPositions`, `SplineType`.
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### Metadata (`EPCGSettingsType::Metadata`)
|
|
154
|
+
|
|
155
|
+
**Create Attribute** (`UPCGCreateAttributeSettings`)
|
|
156
|
+
- Adds a named metadata attribute to all points.
|
|
157
|
+
- Key fields: `OutputAttributeName`, `Type` (Float, Int, Vector, etc.), `DefaultValue`.
|
|
158
|
+
|
|
159
|
+
**Copy Attributes** (`UPCGCopyAttributesSettings`)
|
|
160
|
+
- Copies one or more attributes from source data to output.
|
|
161
|
+
- Key fields: `SourceAttributeNames`, `DestinationAttributeNames`.
|
|
162
|
+
|
|
163
|
+
**Attribute Noise** (`UPCGAttributeNoiseSettings`)
|
|
164
|
+
- Applies noise to any float/vector attribute.
|
|
165
|
+
- Key fields: `TargetAttribute`, `NoiseMode`, `Frequency`, `Amplitude`, `Seed`.
|
|
166
|
+
|
|
167
|
+
**Attribute Remap** (`UPCGAttributeRemapSettings`)
|
|
168
|
+
- Remaps attribute values between ranges with optional curves.
|
|
169
|
+
|
|
170
|
+
**Attribute Cast** (`UPCGAttributeCastSettings`)
|
|
171
|
+
- Casts attribute type (e.g., float to int, FVector to FVector2D).
|
|
172
|
+
|
|
173
|
+
**Break Transform** (`UPCGMetadataBreakTransformSettings`)
|
|
174
|
+
- Decomposes `FTransform` attribute into Translation, Rotation, Scale attributes.
|
|
175
|
+
|
|
176
|
+
**Make Transform** (`UPCGMetadataMakeTransformSettings`)
|
|
177
|
+
- Composes Translation, Rotation, Scale attributes into `FTransform`.
|
|
178
|
+
|
|
179
|
+
**Math Operations** (`UPCGMetadataMathsOpElementSettings`)
|
|
180
|
+
- Float/vector math: Add, Subtract, Multiply, Divide, Min, Max, Abs, Clamp, etc.
|
|
181
|
+
- Key fields: `Operation`, `InputA`, `InputB` (attributes or constants).
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
### ControlFlow (`EPCGSettingsType::ControlFlow`)
|
|
186
|
+
|
|
187
|
+
**Branch** (`UPCGBranchSettings`)
|
|
188
|
+
- Routes data to one of two output pins based on a bool attribute or parameter.
|
|
189
|
+
- Pins: `In`, `OutTrue`, `OutFalse`.
|
|
190
|
+
|
|
191
|
+
**Switch** (`UPCGSwitchSettings`)
|
|
192
|
+
- Routes data to N output pins based on an int or enum attribute.
|
|
193
|
+
|
|
194
|
+
**Boolean Select** (`UPCGBooleanSelectSettings`)
|
|
195
|
+
- Selects between two data inputs based on a bool parameter.
|
|
196
|
+
|
|
197
|
+
**Wait** (`UPCGWaitSettings`)
|
|
198
|
+
- Waits for upstream tasks to complete before forwarding data.
|
|
199
|
+
- Used to enforce ordering in asynchronous graphs.
|
|
200
|
+
|
|
201
|
+
**Quality Branch** (`UPCGQualityBranchSettings`)
|
|
202
|
+
- Branches based on current scalability/quality level.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
### Subgraph (`EPCGSettingsType::Subgraph`)
|
|
207
|
+
|
|
208
|
+
**Subgraph** (`UPCGSubgraphSettings`)
|
|
209
|
+
- Executes a nested `UPCGGraph` as a subgraph node.
|
|
210
|
+
- Key fields: `SubgraphGraph` (asset reference), parameter overrides via `FPCGOverrideInstancedPropertyBag`.
|
|
211
|
+
- Subgraph pins match the subgraph's own input/output node pins.
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### PointOps (`EPCGSettingsType::PointOps`)
|
|
216
|
+
|
|
217
|
+
**Copy Points** (`UPCGCopyPointsSettings`)
|
|
218
|
+
- Copies points from one dataset to positions defined by another (source into target).
|
|
219
|
+
- Key fields: `CopyMode` (FixedRotation, InheritRotation, etc.).
|
|
220
|
+
|
|
221
|
+
**Combine Points** (`UPCGCombinePointsSettings`)
|
|
222
|
+
- Merges two point datasets into one output.
|
|
223
|
+
|
|
224
|
+
**Collapse** (`UPCGCollapseSettings`)
|
|
225
|
+
- Merges nearby points into single representatives.
|
|
226
|
+
- Key fields: `CollapseRadius`.
|
|
227
|
+
|
|
228
|
+
**Attract** (`UPCGAttractSettings`)
|
|
229
|
+
- Displaces points toward or away from attractor points.
|
|
230
|
+
- Key fields: `Weight`, `Radius`, `FalloffType`.
|
|
231
|
+
|
|
232
|
+
**Bounds Modifier** (`UPCGBoundsModifierSettings`)
|
|
233
|
+
- Adjusts `BoundsMin`/`BoundsMax` per point.
|
|
234
|
+
- Key fields: `BoundsMode` (Set, Add, Scale), `Bounds`.
|
|
235
|
+
|
|
236
|
+
**Apply Scale to Bounds** (`UPCGApplyScaleToBoundsSettings`)
|
|
237
|
+
- Applies point scale to its bounds for accurate spatial queries.
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
### Grammar (`EPCGSettingsType::Generic` — Grammar namespace)
|
|
242
|
+
|
|
243
|
+
**Spline to Segment** (`UPCGSplineToSegmentSettings`)
|
|
244
|
+
- Converts a spline into discrete linear segments (points at control points).
|
|
245
|
+
|
|
246
|
+
**Subdivide Spline** (`UPCGSubdivideSplineSettings`)
|
|
247
|
+
- Inserts additional control points along a spline at regular intervals.
|
|
248
|
+
|
|
249
|
+
**Subdivide Segment** (`UPCGSubdivideSegmentSettings`)
|
|
250
|
+
- Subdivides linear segments into smaller sub-segments.
|
|
251
|
+
|
|
252
|
+
**Select Grammar** (`UPCGSelectGrammarSettings`)
|
|
253
|
+
- Applies L-system–style grammar rules to select/transform points.
|
|
254
|
+
|
|
255
|
+
**Duplicate Cross Sections** (`UPCGDuplicateCrossSectionsSettings`)
|
|
256
|
+
- Duplicates points at cross-section intervals along a spline.
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
### Blueprint Custom Nodes (`EPCGSettingsType::Blueprint`)
|
|
261
|
+
|
|
262
|
+
Derive from `UPCGBlueprintBaseElement`. Key configuration:
|
|
263
|
+
|
|
264
|
+
```cpp
|
|
265
|
+
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Settings|Input & Output")
|
|
266
|
+
TArray<FPCGPinProperties> CustomInputPins;
|
|
267
|
+
|
|
268
|
+
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Settings|Input & Output")
|
|
269
|
+
TArray<FPCGPinProperties> CustomOutputPins;
|
|
270
|
+
|
|
271
|
+
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = Settings)
|
|
272
|
+
bool bIsCacheable = false; // false if node creates actors/components
|
|
273
|
+
|
|
274
|
+
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = Settings)
|
|
275
|
+
bool bRequiresGameThread = true; // true for actor spawn, component add
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The `Execute` function signature:
|
|
279
|
+
```cpp
|
|
280
|
+
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "PCG|Execution")
|
|
281
|
+
void Execute(const FPCGDataCollection& Input, FPCGDataCollection& Output);
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## Graph Parameter System
|
|
287
|
+
|
|
288
|
+
Graph-level parameters (`FInstancedPropertyBag UserParameters` on `UPCGGraph`) allow exposing typed parameters to instances and Blueprints.
|
|
289
|
+
|
|
290
|
+
```cpp
|
|
291
|
+
// Read a parameter by name (typed template)
|
|
292
|
+
TValueOrError<float, EPropertyBagResult> Result =
|
|
293
|
+
Graph->GetGraphParameter<float>(TEXT("SpawnRadius"));
|
|
294
|
+
if (Result.HasValue())
|
|
295
|
+
{
|
|
296
|
+
float Radius = Result.GetValue();
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
// Write a parameter
|
|
300
|
+
Graph->SetGraphParameter<float>(TEXT("SpawnRadius"), 250.f);
|
|
301
|
+
|
|
302
|
+
// For instances, overrides are tracked per-property:
|
|
303
|
+
GraphInstance->UpdatePropertyOverride(Property, /*bMarkAsOverridden=*/true);
|
|
304
|
+
GraphInstance->ResetPropertyToDefault(Property);
|
|
305
|
+
bool bOverridden = GraphInstance->IsPropertyOverridden(Property);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Parameter change events (`EPCGGraphParameterEvent`):
|
|
309
|
+
`GraphChanged`, `GraphPostLoad`, `Added`, `RemovedUnused`, `RemovedUsed`, `PropertyMoved`, `PropertyRenamed`, `PropertyTypeModified`, `ValueModifiedLocally`, `ValueModifiedByParent`, `MultiplePropertiesAdded`, `UndoRedo`, `CategoryChanged`.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
313
|
+
## PCGComponent Generation Modes
|
|
314
|
+
|
|
315
|
+
From `EPCGComponentGenerationTrigger`:
|
|
316
|
+
|
|
317
|
+
| Value | Behavior |
|
|
318
|
+
|---|---|
|
|
319
|
+
| `GenerateOnLoad` | Generates once when component registers (BeginPlay or editor load) |
|
|
320
|
+
| `GenerateOnDemand` | Only generates when `Generate()` or `GenerateLocal()` called explicitly |
|
|
321
|
+
| `GenerateAtRuntime` | Managed by `UPCGSubsystem` runtime scheduler; budget-limited per frame |
|
|
322
|
+
|
|
323
|
+
Input source (`EPCGComponentInput`):
|
|
324
|
+
- `Actor` — uses the owning actor's bounds and components
|
|
325
|
+
- `Landscape` — uses the landscape as the primary spatial input
|
|
326
|
+
- `Other` — custom `UPCGData` provided programmatically
|
|
327
|
+
|
|
328
|
+
Dirty flags (`EPCGComponentDirtyFlag`): `Actor`, `Landscape`, `Input`, `Data`, `All`.
|
|
329
|
+
Call `NotifyPropertiesChangedFromBlueprint()` to mark dirty and trigger conditional regeneration.
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Hierarchical Generation (HiGen)
|
|
334
|
+
|
|
335
|
+
Enable on `UPCGGraph`:
|
|
336
|
+
```cpp
|
|
337
|
+
bool bUseHierarchicalGeneration = true;
|
|
338
|
+
EPCGHiGenGrid HiGenGridSize = EPCGHiGenGrid::Grid256; // default grid cell size
|
|
339
|
+
uint32 HiGenExponential = 0; // shifts grid sizes up by this exponent
|
|
340
|
+
bool bUse2DGrid = true; // 2D grid (XY plane) vs 3D volumetric
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
Grid sizes available: `Grid16`, `Grid32`, `Grid64`, `Grid128`, `Grid256`, `Grid512`, `Grid1024`, `Grid2048`, `GridUnbounded`.
|
|
344
|
+
|
|
345
|
+
Nodes run at the minimum of all incoming data grid sizes. Use `Get Grid Size` nodes to force execution at a specific resolution.
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
## ISM Descriptor (PCG Spawner)
|
|
350
|
+
|
|
351
|
+
`FPCGProceduralISMComponentDescriptor` (USTRUCT from `Components/PCGProceduralISMComponentDescriptor.h`) controls per-mesh ISM properties when spawned by the Static Mesh Spawner node:
|
|
352
|
+
|
|
353
|
+
Key settings mirrored from `UInstancedStaticMeshComponent`:
|
|
354
|
+
- `StaticMesh` — mesh asset
|
|
355
|
+
- `OverrideMaterials` — material slots
|
|
356
|
+
- `InstanceStartCullDistance` / `InstanceEndCullDistance`
|
|
357
|
+
- `InstanceLODDistanceScale`
|
|
358
|
+
- `bUseGpuLodSelection`
|
|
359
|
+
- `NumCustomDataFloats` — per-instance float channels
|
|
360
|
+
- Collision preset, body instance settings
|
|
361
|
+
|
|
362
|
+
---
|
|
363
|
+
|
|
364
|
+
## Compute (GPU) Nodes
|
|
365
|
+
|
|
366
|
+
PCG supports GPU-accelerated nodes via `UPCGComputeKernel` (UE 5.4+). These nodes implement `EPCGSettingsType::GPU` and execute HLSL kernels on the GPU point buffer. Useful for mass transforms, noise sampling, or attribute operations at millions of points.
|
|
367
|
+
|
|
368
|
+
Key classes: `UPCGComputeKernel`, `UPCGComputeSource`, `FPCGDataBinding`, `FPCGDataDescription`.
|
|
369
|
+
|
|
370
|
+
GPU nodes are identified by returning `EPCGSettingsType::GPU` from `GetType()` (override in your settings class) and must reference a `UPCGComputeKernel`-derived kernel asset with matching data binding descriptors.
|
|
371
|
+
|
|
372
|
+
---
|
|
373
|
+
|
|
374
|
+
## Determinism Checklist
|
|
375
|
+
|
|
376
|
+
For reproducible procedural results:
|
|
377
|
+
1. Set a fixed `Seed` on the `UPCGComponent` (or use actor position as seed input).
|
|
378
|
+
2. Use `GetSeedWithContext` in custom Blueprint nodes rather than `FMath::Rand`.
|
|
379
|
+
3. Ensure custom nodes set `bIsCacheable = true` when outputs depend only on inputs + seed.
|
|
380
|
+
4. For multiplayer: use `Generate(bForce)` (NetMulticast) not `GenerateLocal`.
|
|
381
|
+
5. Sort input point arrays before processing — order from `GetActorPCGData` is not guaranteed to be stable across platforms.
|