Hyper Light Studios
v1.0.1Unity 2021.3+Last updated: Feb 2026

Core Concepts

3. Pile Profiles

A PileProfile is a ScriptableObject that controls every aspect of pile generation.

Creating a Profile

Assets > Create > PileGen > Pile Profile

Or use a preset:

  • Assets > Create > PileGen > Rock Pile Profile
  • Assets > Create > PileGen > Book Stack Profile
  • Assets > Create > PileGen > Wood Pile Profile
  • Assets > Create > PileGen > Debris Pile Profile

Profile Fields

FieldDescription
Pile NameDisplay name shown in the inspector
Poly Art ShadingToggle between Standard (Triplanar) and Biome (Palette) shading
Material OverrideGlobal fallback material for Standard Mode
Default Style (Biome)Global fallback biome/palette for Biome Mode
Shape RulesArray of shape definitions (what objects to generate)
LayersList of layer rules (how many, what scale, rotation)
Placement RulesRadius, overlap, ground contact settings
Distribution CurvesDensity, height, and scale falloff curves

Pile Profile — Shapes Browser The Shape Browser showing the full Shape Rule list with thumbnails, type badges, and quick-add dropdown.


4. Shape Rules

A Shape Rule defines a single type of object that can appear in the pile.

Base Primitives

PrimitiveDescriptionBest For
Cube6-faced box, configurable subdivisionsCrates, books, bricks
SphereUV sphereBalls, rounded objects
IcosahedronSubdivided icosahedronRocks, debris, organic shapes
RockConvex hull with Voronoi noiseNatural rocks, boulders
CylinderCapped cylinder, supports wall thicknessLogs, pipes, cans
TorusDonut ringRings, wreaths, donuts
PipeHollow cylinderTubes, hollow pipes
PlaneFlat quadCards, sheets, fabric
Extrude2D silhouette extruded along a Bézier pathPlanks, curved beams, custom shapes
LatheRevolution surface from profile curveBottles, vases, jars
CompoundMulti-part assembled shapeCrates, chairs, tables
PrefabAny external model/prefabCustom meshes, imported models

Shape Rule — General Settings The Shape Rule inspector showing primitive selection, size settings, deformation options, and material/biome assignment.

Primitive-Specific Options

Each primitive exposes its own resolution and topology controls:

PrimitiveKey Options
CubeSubdivisions (1–5 per face)
CylinderSides, Height Segments, Wall Thickness, Cap Top/Bottom, Hollow Bottom
SphereSubdivision Level (0–3)
IcosahedronSubdivision Level (0–3)
PlaneSubdivisions (1–6)
TorusTube Radius, Radial/Tube Segments
PipeSides, Wall Thickness, Cap Top/Bottom

Size & Pivot

  • Size Min/Max — Random range for dimensions (X, Y, Z).
  • Uniform Scale — Forces X, Y, and Z to scale together.
  • Pivot Y Offset — Shift the vertical pivot. Use -0.5 for bottom-aligned, 0.5 for top-aligned.
  • Native Scale (Prefabs) — Uses the prefab's original export scale instead of normalizing.
  • Arc Degrees — For cylindrical shapes: 360 = full shape, 180 = half shape.

Deformation Settings

Applied to the CPU mesh after generation:

SettingDescription
Vertex NoiseRandom displacement of vertices (organic look)
Noise FrequencyScale of the noise pattern
Bend AmountCurve the mesh along one axis
FlattenSquash the mesh vertically
BevelInset faces with multi-segment rounding
Chip AmountRemove random chunks from edges
Chip Seed OffsetVary which edges get chipped

Shape Rule — Modifiers Panel The Shape Modifiers section with per-shape deformation variance controls.

Deformation Variance

Each deformation parameter has a Min/Max range. PileGen picks a different random value within that range for every generated piece, giving natural variation without manual overrides.

Shape Rule — Randomize Settings The Randomize panel showing per-parameter variance ranges for deformation.

Behavior Flags

FlagDescription
Flat BiasReduce rotation variance — piece stays mostly upright
StackablePiece can be placed on top of others

Per-Shape Material / Biome

Each shape can override the profile's default material or biome style. Leave empty to inherit the profile's global setting.

Weight

Controls how likely this shape is to be picked relative to others in the profile. Higher weight = more frequent.


5. Layers

Layers control how many pieces are placed and how they're arranged. A typical pile has 2–3 layers:

LayerTypical Use
BaseLarge pieces at the bottom, high count
MidMedium pieces filling gaps
TopSmall accent pieces on top

Layer Settings

FieldDescription
Layer NameDisplay label
CountNumber of pieces to place
Scale MultiplierMin/max scale range for this layer
Rotation VarianceHow much random rotation (0 = upright, 1 = chaotic)
Vertical JitterRandom Y offset
Surface AlignmentHow much pieces align to the ground normal (0–1)
Allowed Shape IndicesWhich shapes can appear in this layer (empty = all)

Managing Layers

In the Pile Profile inspector:

  • Click + Add Layer to add a new layer
  • Click × to remove a layer
  • Use ↑ ↓ arrows to reorder layers

Pile Profile — Layers Tab The Layers tab showing Base and Mid layers with count, scale, rotation, and placement settings.


6. Placement Rules

Controls where pieces are placed within the pile's footprint.

Footprint Shape

ShapeDescription
CircleStandard circular pile radius
RectangleRectangular footprint defined by X and Z dimensions

Footprint Gizmo — Circle Scene view showing the circular pile footprint gizmo with radius indicator.

Footprint Gizmo — Rectangle Scene view showing the rectangular pile footprint gizmo with X/Z size handles.

Footprint Options

FieldDescription
RadiusPile radius in world units (Circle mode)
Rectangle SizeX and Z extents in world units (Rectangle mode)
Max Placement RetriesAttempts per piece before giving up
Center HeavyBias placement toward the center
Edge HeavyBias placement toward the edges

Ground Contact

FieldDescription
Sink DepthHow far pieces sink into the ground
Prevent Ground PenetrationAdjust height so corners don't clip through
Precise Ground CheckSample multiple points for accurate ground height
Slope LimitMaximum slope angle (degrees)
Slope Slide StrengthHow much pieces slide downhill on slopes
Raycast HeightHow high above to start ground raycasts
Surface MaskLayer mask for ground detection

Overlap

FieldDescription
Overlap ToleranceHow much overlap is allowed (0 = none, 1 = full)
Use OBB CollisionUse oriented bounding boxes for precise overlap checks

Pile Generator — Placement Tab The Placement overrides panel showing footprint shape, radius, ground contact, and overlap controls.

Local Placement Overrides

On the Generator component, toggle Use Local Placement Overrides to take full control of every placement setting directly on the Generator object, independent of the profile's defaults. A Copy all from Profile button pre-fills all values from the currently assigned profile.

Pile Profile — Placement Tab The Pile Profile's Placement tab showing footprint shape, ground contact, overlap, and slope settings.


7. Distribution Curves

Three AnimationCurve fields control how pieces are distributed (defined in the Pile Profile):

Density Curve

  • X axis: Distance from center (0 = center, 1 = edge)
  • Y axis: Probability of placement (0 = never, 1 = always)
  • Default: Higher density at center, tapering to edges

Height Curve

  • X axis: Distance from center
  • Y axis: Maximum height at that distance
  • Default: Tallest at center, lower at edges (natural pile shape)

Scale Curve

  • X axis: Distance from center
  • Y axis: Scale multiplier
  • Default: Larger pieces at center, smaller at edges

The Distribution Curves card is visible in the Generator's Generation tab even without using local overrides, and can be edited inline.